SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
18.47k stars 2.21k forks source link

WinSW 注册服务后,自动启动报错 #264

Closed mrzhiin closed 1 year ago

mrzhiin commented 1 year ago

Welcome

Description of the problem

使用 WinSW 注册为服务开机启动,启动报错。

WinSW 配置:

```xml singbox singbox\sing-box.exe run -D singbox\etc singbox\logs ```

Version of sing-box

```console sing-box version 1.1-rc1 Environment: go1.19.3 windows/amd64 Tags: with_gvisor,with_quic,with_wireguard,with_utls,with_clash_api Revision: f687c25fa9e604750e3e97ce7cdfba732f4d4dbf CGO: disabled ```

Server and client configuration file

```console { "log": { "disabled": false, "level": "error" }, "outbounds": [ { "tag": "direct", "type": "direct" }, { "tag": "dns", "type": "dns" } ], "inbounds": [ { "type": "tun", "inet4_address": "172.19.0.1/30", "inet6_address": "fdfe:dcba:9876::1/126", "auto_route": true, "sniff": true, "sniff_override_destination": true, "domain_strategy": "prefer_ipv6", "stack": "gvisor" } ], "dns": { "servers": [ { "address": "https://223.5.5.5/dns-query", "detour": "direct" } ], "disable_cache": false, "disable_expire": false }, "route": { "rules": [ { "outbound": "dns", "protocol": "dns" } ], "final": "direct", "auto_detect_interface": false, "default_interface": "WLAN" }, "experimental": { "clash_api": { "external_controller": "127.0.0.1:9090", "secret": "", "store_selected": true } } } ```

Server and client log file

```console ERROR[0000] router: no route to internet FATAL[0002] start service: initialize inbound/tun[0]: configure tun interface: set ipv4 address: Element not found. ```
nekohasekai commented 1 year ago

没有提供此类支持。

mrzhiin commented 1 year ago

原因似乎是因为适配器里启用了 npcap 这些东西,删除所有非系统自带的后正常了。