-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
任意门 tproxy 模式无法透明代理 IPv6 TCP #48
Comments
你的架构是?等下给你发个测试版 |
客户端是 linux-arm32-v7a,服务端 linux x64 |
都试一试(我倾向于第二次上传的),顺便看看会不会影响 UDP |
第一个,TCP UDP 都不通了,日志无记录 |
看日志专用版本,请把日志发上来,看看有没有 success 字样 |
同样是看日志版本,我没有复现错误的环境,只能这样试了,麻烦及时反馈 |
两个都是这样,不过 no such file or directory 错误变成了 invalid argument
|
请问你是任意门开启tproxy + ip6tables tcp tproxy + ip6tables udp tproxy的配置吗? |
是的 |
这可能是个bug。据群友提供的方法,你可以暂时把 任意门tproxy 改为 redirect(ip6tables iptables规则不需要改),应该就能连上了。待修复之后,再换回tproxy |
测试无效 |
研究了一下,重写了相关代码,试试有没有问题 |
现在没有 getsockopt 错误了,但是 TCP 目标端口是错的,忘了 htons?
|
有点奇怪,IPv6 地址正确吗?IPv4 有没有问题? |
发现就是大小端的问题, IPv4 TCP 直接识别不出目标 IP 了
|
目前不能确定不同架构上 syscall 返回端口的字节序,好像有点棘手 |
TCP 目标 IPv4 估计也是类似的问题,我是取 16 个字节中前 4 个字节,但是按照你机器上的顺序,可能要取后 4 个字节才对 我试试能不能利用这个特性让它 work |
先试试这个版本在你的机器上是否正常,包括 IPv4 |
我用同样的iptable测试完全可用(就是你的 v2fly/v2ray-core#320 设置),包括1.0.0版本开始. |
其实昨天我一直有个疑惑,即你设置的是 tproxy,而我改的是 redirect,为什么也会生效?还以为是 followRedirect 覆盖了设置 直到群友指出,你的配置是错的, 对于 redirect,文档的描述是“仅支持 TCP/IPv4 和 UDP 连接”,我还发现了这个 v2ray/v2ray-core#1309 (comment) 但根据我昨天的研究和修改,为 redirect 增加 TCP/IPv6 支持并不是不可能做到的,所以这成了新的目标 |
原来如此,加到 |
你这里的 iptables 是 tproxy 吗?应该会 err 才对啊(而不只是端口错误 |
你没有修改sockopt到streamSettings之前,xray应该一直是保持redir模式的(默认,因为你写的tproxy位置错了没生效). |
配置文件见 v2fly/v2ray-core#320
客户端,服务端均为 Xray 1.1.2
IPv6 TCP 无法代理,出现以下错误
IPv6 UDP 正常
The text was updated successfully, but these errors were encountered: