-
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
Xtls vision reject vless-tcp-tls+Mux #1567
Conversation
感谢 PR,测试可行吗?建议不动回落,把取 firstBytes 移到函数里,因为它们的含义不一样。另外需要判断一下长度,防止 panic。 |
Off-topic, but: Xray-core/proxy/vless/inbound/inbound.go Line 518 in f571aa7
Is characters a typo of characteristics ?
|
目前这个函数只给 Vision 用,TCP TLS 的首包一定是 header+payload(尤其是 UDP 一定有 payload),所以可以默认返回 true,防止有先发 header 再发 payload 的实现(我记得 clash 是这样,长度特征超级明显,不知道现在改了没),刚好会绕过这个限制。 |
(当然,要改为先判断 RequestCommandMux) |
Mux 时首包一定是 VLESS header + Mux header + 可能的 Mux payload(UDP 一定有),不过有 Mux header 就够我们判断了。 |
It hasn't changed yet. Trojan, Shadowsocks and something else are still writing request independently into the underlaying conn in Clash/Clash.Meta. |
|
或许你可以给 Clash.Meta 实现首包粘连:
|
@yuhan6665 说起来,如果客户端没先发数据,得在 VLESS header 后粘个空的 padding, |
@RPRX Maybe padding also has some weaknesses. Shadowsocks 2022 edition adds a random length padding with up to 900 bytes. It eliminates the connection characteristic in request, but makes it to be a UNSTABLE protocol. The "unstable" I mean is that when you repeatedly connect to the same TCP service (same IP and port), the length of the first packet varies significantly. And after that, client and server start a conversation, which means this connection is not only doing a upload or download operation. This might be a characteristic, since an application level protocol with random request length (and has even up to hundreds of bytes of randomly distributed variance) is not common and nearly imposible to be used so widely on mobile phones, laptops and other home devices. The use of TLS will not hide this because it is not too hard for censor to check out your first application data record. I've heard that Shadowsocks 2022 is even easier to get blocked than Shadowsock AEAD (2017), that's my guess as to why this happens. So, for that, the implementation of |
是应用 uTLS 时 alpn 失效是吧?#1274 |
对!我也觉得除了 randomized,其它指纹不能应用 alpn 设置,否则总会有人去选,连累服务端, |
如果没理解错 你是说给 clash 那边加 vision 的时候要注意 padding 问题: |
注意到radar中 CN Top Browsers & User Agents的情况主要为Chrome,Safari 和 UC,据此判断应该可以缩小随机指纹选择空间,并根据数据按概率选择随机指纹。 |
理解错了,我指的是如果应用发起了 TCP 连接但没发数据,VLESS 会只发自己的协议头,长度特征比较明显,不如粘个 padding |
random 有过这个想法,维护可能有点麻烦,PR is welcomed, |
那我懂了,是指某些 ssh 客户端和一些其它特殊协议服务端先发包的情况吧,确实是个可能的问题 |
@H1JK 你说的是有道理的,除了,你先假设了我说的 padding 指的是大范围随机 padding,并不是,显然我也知道那是送人头 不过你说的引申出了一个问题,那就是:是否在任何情况下,都应该 padding,以保证至少一去一回两个首包的长度相对稳定? TLS data record 长度是明文,我觉得见仁见智,因为审查者肯定重点依赖它,但它是可以被我们控制、利用的。之前我提过一句 |
不会,你看我已经开始生成 *.pb.go 了,就是在往 Xray-core 加 REALITY,再写完文章后它就会和大家见面了
|
CC @RPRX