SagerNet / sing-box

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

win 11 tun 模式下,可以正常使用,但是任务栏 wifi 图标变成地球,tun0 状态是“无法访问 Internet” #283

Closed GeorgeRudd closed 1 year ago

GeorgeRudd commented 1 year ago

Welcome

Description of the problem

访问其他网站都没问题 查看日志发现 13.107.4.52:80 不通,这个好像就是检测网络连通性的。 防火墙专用公用都打勾了

Version of sing-box

```console $ sing-box version sing-box version 1.1.1 Environment: go1.19.4 windows/amd64 Tags: with_gvisor,with_quic,with_wireguard,with_utls,with_clash_api Revision: 8afb8ca7eb8aa52e7a3b44253be0f3df9474fa64 CGO: disabled ```

Server and client configuration file

```console { "log": { "disabled": false, "level": "warn", "output": "sing-box.log", "timestamp": true }, "dns": { "servers": [ { "tag": "1.1.1.1", "address": "1.1.1.1", "detour": "proxy-out" }, { "tag": "223.5.5.5", "address": "223.5.5.5", "detour": "direct-out" } ], "rules": [ { "geosite": "cn", "server": "223.5.5.5" } ], "final": "1.1.1.1", "strategy": "ipv4_only" }, "inbounds": [ { "type": "tun", "tag": "tun-in", "inet4_address": "172.19.0.1/30", "inet6_address": "fdfe:dcba:9876::1/126", "auto_route": true, "strict_route": true, "sniff": true } ], "outbounds": [ { "type": "vmess", "tag": "proxy-out", "server": "ip", "server_port": 80, "uuid": "uuid", "security": "auto", "alter_id": 0, "packet_encoding": "xudp", "transport": { "type": "ws", "path": "/path", "headers": { "Host": "domain.com" }, "max_early_data": 2048, "early_data_header_name": "Sec-WebSocket-Protocol" } }, { "type": "direct", "tag": "direct-out", "domain_strategy": "ipv4_only" }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns-out" } ], "route": { "geoip": { "path": "geoip.db" }, "geosite": { "path": "geosite.db" }, "rules": [ { "protocol": "dns", "outbound": "dns-out" }, { "geosite": [ "cn", "private" ], "geoip": [ "cn", "private" ], "outbound": "direct-out" }, { "geosite": [ "geolocation-!cn" ], "outbound": "proxy-out" } ], "final": "proxy-out", "auto_detect_interface": true } } ```

Server and client log file

```console ERROR [2185660182] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10000: read tcp 192.168.2.170:5383->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5383->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10000: use of closed network connection ERROR [1870094370] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10001: read tcp 192.168.2.170:5385->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5385->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10001: use of closed network connection ERROR [2763723028] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10026: read tcp 192.168.2.170:5453->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5453->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10026: use of closed network connection ERROR [2913833551] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10025: read tcp 192.168.2.170:5452->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5452->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10025: use of closed network connection ERROR [2413322672] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10027: read tcp 192.168.2.170:5458->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5458->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10027: use of closed network connection ERROR [3395196965] inbound/tun[tun-in]: upload: readfrom tcp 192.168.2.170:5500->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10039: use of closed network connection | download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10039: read tcp 192.168.2.170:5500->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. ERROR [1876359751] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10041: read tcp 192.168.2.170:5502->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5502->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10041: use of closed network connection ERROR [3127917834] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10040: read tcp 192.168.2.170:5501->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5501->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10040: use of closed network connection ERROR [2501197264] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10042: read tcp 192.168.2.170:5508->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:5508->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10042: use of closed network connection ERROR [2266303791] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10054: read tcp 192.168.2.170:13080->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:13080->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10054: use of closed network connection ERROR [2332287025] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10062: read tcp 192.168.2.170:13111->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:13111->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10062: use of closed network connection ERROR [949154594] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10063: read tcp 192.168.2.170:13113->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:13113->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10063: use of closed network connection ERROR [3415457298] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10067: read tcp 192.168.2.170:13135->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:13135->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10067: use of closed network connection ERROR [301879119] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10066: read tcp 192.168.2.170:13134->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:13134->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10066: use of closed network connection ERROR [1195979278] inbound/tun[tun-in]: download: readfrom tcp4 172.19.0.1:5379->172.19.0.2:10065: read tcp 192.168.2.170:13133->13.107.4.52:80: wsarecv: An existing connection was forcibly closed by the remote host. | upload: readfrom tcp 192.168.2.170:13133->13.107.4.52:80: read tcp4 172.19.0.1:5379->172.19.0.2:10065: use of closed network connection ```

开启 tun 之后的 ipconfig

Windows IP 配置

未知适配器 tun0:

   连接特定的 DNS 后缀 . . . . . . . :
   IPv6 地址 . . . . . . . . . . . . : fdfe:dcba:9876::1
   IPv4 地址 . . . . . . . . . . . . : 172.19.0.1
   子网掩码  . . . . . . . . . . . . : 255.255.255.252
   默认网关. . . . . . . . . . . . . : ::
                                       0.0.0.0

无线局域网适配器 本地连接* 1:

   媒体状态  . . . . . . . . . . . . : 媒体已断开连接
   连接特定的 DNS 后缀 . . . . . . . :

无线局域网适配器 本地连接* 10:

   媒体状态  . . . . . . . . . . . . : 媒体已断开连接
   连接特定的 DNS 后缀 . . . . . . . :

无线局域网适配器 WLAN:

   连接特定的 DNS 后缀 . . . . . . . : lan
   IPv6 地址 . . . . . . . . . . . . : 公网ipv6
   临时 IPv6 地址. . . . . . . . . . : 公网ipv6
   本地链接 IPv6 地址. . . . . . . . : fe80::a374:1b5f:11a8:310%15
   IPv4 地址 . . . . . . . . . . . . : 192.168.2.170
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   默认网关. . . . . . . . . . . . . : fe80::8ac3:97ff:fe51:d32d%15
                                       192.168.2.1
GeorgeRudd commented 1 year ago

让 www.msftconnecttest.com 这个域名走 223.5.5.5 解析