Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Tun模式在双内核下无法工作,sing-box和xray之间的socks连接不正常 #5293

Open
2 tasks done
BnqDzj opened this issue Jun 30, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@BnqDzj
Copy link

BnqDzj commented Jun 30, 2024

预期情况

Tun模式正常启动,sing-box和xray之间socks连接正常

实际情况

在打开Tun模式后sing-box服务启动失败,流量不再经过v2rayn

复现方法

  1. V2rayN v6.49 latest
  2. Sing-box v1.10.0-alpha.18 latest
  3. 本地Socks监听端口为 “7890”
  4. 开启UDP 为开启状态
  5. Tun模式设置 Strict Route 启用额外端口监听 启用IPV6 均为开启状态,Stack设置为"system" Mtu设置为"9000"
  6. Core类型均为 "Xray"
  7. 系统代理为“自动配置系统代理”
  8. 路由选择为“V3-全局(Global)”
  9. 打开Tun模式

日志信息

Microsoft Windows NT 10.0.22631.0 - 64
Start service(2024/06/30 14:51:47)...
Xray 1.8.16 (Xray, Penetrates Everything.) 9432a60 (go1.22.4 windows/amd64)
A unified platform for anti-censorship.
2024/06/30 14:51:48 Using default config: E:\Program Files\v2rayN\guiConfigs\config.json
2024/06/30 14:51:48 [Info] infra/conf/serial: Reading config: E:\Program Files\v2rayN\guiConfigs\config.json
2024/06/30 14:51:48 [Warning] core: Xray 1.8.16 started
2024/06/30 14:51:48 tcp:127.0.0.1:2188 accepted tcp:91.108.56.142:443 [socks -> proxy]
2024/06/30 14:51:48 tcp:127.0.0.1:2190 accepted tcp:91.108.56.142:80 [socks -> proxy]
2024/06/30 14:51:48 tcp:127.0.0.1:2189 accepted tcp:91.108.56.142:80 [socks -> proxy]
2024/06/30 14:51:48 tcp:127.0.0.1:2187 accepted tcp:91.108.56.142:443 [socks -> proxy]
2024/06/30 14:51:48 127.0.0.1:2185 accepted tcp:127.0.0.1:0 [api -> api]
2024/06/30 14:51:50 127.0.0.1:2201 accepted //www.google.com:443 [http -> proxy]
2024/06/30 14:51:52 tcp:127.0.0.1:2211 accepted tcp:raw.githubusercontent.com:443 [socks -> proxy]
2024/06/30 14:51:52 tcp:127.0.0.1:2212 accepted tcp:raw.githubusercontent.com:443 [socks -> proxy]
2024/06/30 14:51:53 tcp:127.0.0.1:2220 accepted tcp:20.42.144.52:443 [socks -> proxy]
2024/06/30 14:51:53 tcp:127.0.0.1:2229 accepted tcp:23.192.228.15:80 [socks -> proxy]
2024/06/30 14:51:53 tcp:127.0.0.1:2231 accepted tcp:23.44.73.221:443 [socks -> proxy]
panic: extending out of bound
goroutine 2104 [running]:
github.com/xtls/xray-core/common/buf.(*Buffer).Extend(...)
github.com/xtls/xray-core/common/buf/buffer.go:126
github.com/xtls/xray-core/proxy/shadowsocks.(*AEADCipher).EncodePacket(0xc002059a40?, {0xc00271e230?, 0xc002059a40?, 0x1adcd28?}, 0xc002059a40)
github.com/xtls/xray-core/proxy/shadowsocks/config.go:178 +0x232
github.com/xtls/xray-core/proxy/shadowsocks.EncodeUDPPacket(0xc0021b5d78, {0xc0021a600a, 0x1fdb, 0x8?})
github.com/xtls/xray-core/proxy/shadowsocks/protocol.go:232 +0x15b
github.com/xtls/xray-core/proxy/shadowsocks.(*UDPWriter).WriteMultiBuffer(0xc00204b2f0, {0xc0020c2850?, 0xc001c34e80?, 0xc0021b5e30?})
github.com/xtls/xray-core/proxy/shadowsocks/protocol.go:336 +0x145
github.com/xtls/xray-core/common/buf.copyInternal({0x1acd040, 0xc0020d9a10}, {0x1ace3a0, 0xc00204b2f0}, 0xc00204b308)
github.com/xtls/xray-core/common/buf/copy.go:99 +0x164
github.com/xtls/xray-core/common/buf.Copy({0x1acd040, 0xc0020d9a10}, {0x1ace3a0, 0xc00204b2f0}, {0xc0021b5f58, 0x1, 0x0?})
github.com/xtls/xray-core/common/buf/copy.go:116 +0x98
github.com/xtls/xray-core/proxy/shadowsocks.(*Client).Process.func5()
github.com/xtls/xray-core/proxy/shadowsocks/client.go:170 +0x1a5
github.com/xtls/xray-core/common/task.Run.func1(0xc001fef830?)
github.com/xtls/xray-core/common/task/task.go:28 +0x28
created by github.com/xtls/xray-core/common/task.Run in goroutine 2017
github.com/xtls/xray-core/common/task/task.go:27 +0xdb
+0800 2024-06-30 14:51:54 ERROR [2657117589 271ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
+0800 2024-06-30 14:51:54 ERROR [1574258483 272ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
+0800 2024-06-30 14:51:54 ERROR [2890152993 273ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
+0800 2024-06-30 14:51:54 ERROR [281955391 262ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
+0800 2024-06-30 14:51:54 ERROR [686921454 273ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
+0800 2024-06-30 14:51:54 ERROR [584236276 272ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
+0800 2024-06-30 14:51:54 ERROR [1501204560 272ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
+0800 2024-06-30 14:51:54 ERROR [377037760 236ms] inbound/tun[tun-in]: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
FATAL[0006] start service: initialize rule-set[1]: initial rule-set: geosite-geolocation-!cn: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs": read tcp 127.0.0.1:2212->127.0.0.1:7890: wsarecv: An existing connection was forcibly closed by the remote host. | initialize rule-set[1]: initial rule-set: geosite-category-ads-all: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs": read tcp 127.0.0.1:2211->127.0.0.1:7890: wsarecv: An existing connection was forcibly closed by the remote host.

额外信息

No response

我确认已更新至最新版本

我确认已查询历史issues

@BnqDzj BnqDzj added the bug Something isn't working label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant