Operating system
Windows
System version
7.22
Installation type
Third-party graphical clients that advertise themselves as using sing-box (Windows)
If you are using a graphical client, please provide the version of the client.
No response
Version
Description
sing-box Bug 总结
环境:
Windows 10
多网卡环境:有线网卡(断开)+ USB热点网卡
有一条永久路由指向不可达网关 192.168.20.1
实际出口是移动热点(无默认网关)
V2RayN 7.22.1 + sing-box,启用 TUN 模式,auto_detect_interface: true
Reproduction
Bug 现象:
第一次启动 TUN 必定失败:
ERROR network: missing default interface
FATAL: start inbound/tun[tun-in]: configure tun interface: Cannot create a file when that file already exists.
第二次启动成功。
根本原因:
auto_detect_interface 探测默认接口时,找到了永久路由指向的不可达网关 192.168.20.1,探测失败后直接退出,没有 fallback 到其他可用接口。
第二次成功是因为第一次失败后 TUN 接口文件已残留,第二次启动直接使用残留接口,绕过了有问题的探测逻辑。
期望行为:
auto_detect_interface 应该遍历所有网络接口,跳过不可达的,选择实际可用的接口,而不是遇到第一个失败就退出。
Logs
Supporter
Integrity requirements
Operating system
Windows
System version
7.22
Installation type
Third-party graphical clients that advertise themselves as using sing-box (Windows)
If you are using a graphical client, please provide the version of the client.
No response
Version
Description
sing-box Bug 总结
环境:
Windows 10
多网卡环境:有线网卡(断开)+ USB热点网卡
有一条永久路由指向不可达网关 192.168.20.1
实际出口是移动热点(无默认网关)
V2RayN 7.22.1 + sing-box,启用 TUN 模式,auto_detect_interface: true
Reproduction
Bug 现象:
第一次启动 TUN 必定失败:
ERROR network: missing default interface
FATAL: start inbound/tun[tun-in]: configure tun interface: Cannot create a file when that file already exists.
第二次启动成功。
根本原因:
auto_detect_interface 探测默认接口时,找到了永久路由指向的不可达网关 192.168.20.1,探测失败后直接退出,没有 fallback 到其他可用接口。
第二次成功是因为第一次失败后 TUN 接口文件已残留,第二次启动直接使用残留接口,绕过了有问题的探测逻辑。
期望行为:
auto_detect_interface 应该遍历所有网络接口,跳过不可达的,选择实际可用的接口,而不是遇到第一个失败就退出。
Logs
Supporter
Integrity requirements