XUDP:VLESS & VMess & Mux UDP FullCone NAT #252
Replies: 10 comments 17 replies
-
🎉🎉🎉前排撒花🎉🎉🎉 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
我想问一下就是,我是用nginx转发vless的,而且还是https的,这个东西可以支持FullCone吗?我一个小白真的不懂 |
Beta Was this translation helpful? Give feedback.
-
使用了CDN有影响么 |
Beta Was this translation helpful? Give feedback.
-
落地机开放UDP 高位端口(1024-65535),但路由中间经过iptables中转后(仅中转config里的port), 有影响吗? |
Beta Was this translation helpful? Give feedback.
-
服务端在用docker跑,想玩一下Full cone。想问一下docker方式必须使用host network,且开放所有UDP高端口这样的方式跑是不是因为必须以服务器本身IP接受UDP数据的原因?假如我要以Full cone方式跑的游戏是使用固定UDP端口的,我是不是可以docker容器加一个UDP同端口的-p映射即可?这样避免开放所有高端口,同时还无需host network? |
Beta Was this translation helpful? Give feedback.
-
我的服务端和客户端均是v1.4.2,需要怎么配置才能启用udp? |
Beta Was this translation helpful? Give feedback.
-
Found the sequel! Seems I need to fordward all of the high UDP ports to my machine |
Beta Was this translation helpful? Give feedback.
-
请问Vmess入站,Trojan出站,出站报错proxy/trojan: connection ends > read tcp 10.0.12.15:42656->2.58..:33251: read: connection reset by peer是因为nat的问题导致连接发起方无法接受到ack报文导致连接被rst了么 |
Beta Was this translation helpful? Give feedback.
-
If the UDP packets have to be forwarded to the destination, does this stop working? v2raya does this automatically and I don't know if the issue is from this |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
#237 已阐明 V 系协议的 UoT 结构无法实现 FullCone,然而 Xray-core v1.3.0+ 却神奇地做到了本被认为是不可能的事情:
这篇文章主要是说明原理及行为,以便其它软件的开发者实现这个 FullCone 方案。
前期探索
最初的思路是只能 breaking:设计新的 UoT 协议结构并通过某种方式启用,"encryption": "cone"
、ID 非 UUID 等,但不优雅。后来想到可以先用现有的 Mux 传递多地址端口信息:Xray-core 服务端可以识别出来特殊请求并按 FullCone 处理,Xray-core 客户端也可以判断出来请求是否被特殊处理了,因为返回的数据会采用新的 UoT 结构。这样完全不存在 breaking,但协议结构和处理逻辑上相对复杂、客户端还要维护目标二元组与子连接 ID 的双向映射关系、Mux 自身想 FullCone 却不好分配子连接 ID,还是不太优雅。
接着在我实现它的过程中,发现 Mux.Cool 协议 帧格式的
元数据长度 L
非常灵活,所以就有了最简单且优雅的解决方案:扩展 Mux.Cool 协议
Keep
的元数据,使其像New
一样带上 UDP 端口和地址信息,为方便交流,扩展后的协议命名为 XUDP。因为它为 Mux 实现了 FullCone,顺便实现了 XUDP 原本的目标:UDP 聚合隧道,一箭双雕。
具体实现
特性分析
0x03
指令(TCP、UDP、Mux),Xray-core 和 v2fly-core 的服务端都支持它。对于最后一种情况,简单来说查询 DNS、承载 QUIC、打中心服务器游戏等普通 UDP 应用是不受影响的,但不能用来打 P2P 游戏。
当然,本来也没人对 V 系协议的 P2P 抱有期待。若要完美 P2P,你应当都使用 Xray-core v1.3.0+。
至此,Xray-core 实现了全协议、全出入站、全传输方式完美支持 FullCone 🎉
Beta Was this translation helpful? Give feedback.
All reactions