Skip to content

Windows 11 + WSL 环境多网卡导致无法开启 TUN 模式(默认出口网卡识别失败) #26

@6Leokk

Description

@6Leokk

问题描述

我是在 Windows 11 主机上使用(系统已开启 WSL2)。在这种情况下由于系统里会存在多个网络适配器/虚拟网卡(例如:Wi‑Fi、以太网、WSL/Hyper‑V vEthernet、VPN/TAP 等),开启 TUN 模式 时会报错并导致无法启用。

Image

报错信息:

Could not determine the default outbound network interface. Please check that Wi-Fi/Ethernet is connected, then try again.

复现步骤

  1. Windows 11 中启用 WSL2(系统会出现 vEthernet(WSL) 等虚拟网卡)
  2. 确保系统存在多网卡/虚拟网卡(Wi‑Fi + 以太网/或 VPN/或 vEthernet 等)
  3. 在 XrayUI-dev 中开启 TUN 模式
  4. 出现上述报错,TUN 无法启动

期望行为

在 Windows 11 + WSL(多网卡/虚拟网卡)环境下:

  • 能正确识别“默认出口网卡”(default outbound interface),TUN 可以正常开启;或
  • 提供可选项让用户手动选择出口网卡/指定接口;或
  • 输出更明确的诊断信息(当前检测到哪些网卡、为什么无法判定默认出口)。

环境信息

  • OS:Windows 11
  • WSL:已开启(WSL2)
  • 网络环境:多网卡/虚拟网卡(如 Wi‑Fi + vEthernet(WSL) + 可能的 VPN/TAP 等)
  • XrayUI-dev 版本:latest(如有需要欢迎维护者告知需要补充 commit/tag )

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions