mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2026-04-23 01:27:17 +08:00
重构所有udp部分的代码! 摒弃了过去非常复杂的upd转发机制;
不再使用 UDP_Putter 等机制去转发udp,而是用一个 netLayer.MsgConn 结构 proxy.Server 和 proxy.Client 接口改动, Client在握手udp时不再使用handshake方法, 而是用新的 EstablishUDPChannel 方法 Server 在 Handshake时会选择性返回两种接口,io.ReadWriteCloser 用于tcp, netLayer.MsgConn 用于 udp 此时vless、socks5、direct 的udp转发都已经成功经过了 go test 验证, 但是 main.go 还未修改。
This commit is contained in:
@@ -73,7 +73,7 @@ func testTls(protocol string, port string, t *testing.T) {
|
||||
|
||||
t.Log("server pass tls handshake")
|
||||
|
||||
wlc, targetAddr, err := server.Handshake(lc)
|
||||
wlc, _, targetAddr, err := server.Handshake(lc)
|
||||
if err != nil {
|
||||
t.Log("failed in handshake from ", server.AddrStr(), err)
|
||||
t.Fail()
|
||||
|
||||
Reference in New Issue
Block a user