mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-08 21:45:01 +03:00
968beb4432
* feat(core): support AUTO detection and manual selection for BindInterface (#10519) - Implements the 3-state design agreed in #10519: 1. Empty: do not bind interface, preserve existing behavior. 2. AUTO: automatically detect default active physical network interface and bind to it. 3. Specific interface: prioritize user-selected network interface. - Centralizes interface resolution in NetworkUtils.GetRealBindInterfaceName(). - Supports AUTO in CoreConfigContextBuilder, Singbox, and V2ray template services. - Adds comprehensive unit tests covering AUTO detection, context validation, and config generation. * refactor: optimize AUTO bindInterface resolution and add mock-based tests - Resolve AUTO interface once in CoreConfigContextBuilder and store in CoreConfigContext.ResolvedBindInterface as single-source-of-truth - Downstream sing-box and Xray outbound/TUN services consume ResolvedBindInterface directly - Unify TrimEx and case-insensitive check via NetworkUtils.IsAuto to tolerate user input whitespace - Log and issue validator warning when AUTO fails to resolve any physical adapter - Extract pure SelectDefaultInterface function with NetworkInterfaceCandidate for deterministic, mock-based unit testing - Add comprehensive unit tests covering Ethernet vs Wi-Fi preference, no-gateway fallback, and virtual adapter filtering * refactor(network): filter non-IP NDIS interfaces and simplify AUTO bindInterface resolution * fix(ui,network): align BindInterface ComboBox width and refine physical NIC matching * Update CoreConfigContextBuilder.cs --------- Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>