Open bash99 opened 4 years ago
try udp2raw
@fbion 除了wangyu-/udp2raw-tunnel还有哪个udp2raw吗?
update一下log信息,不确定是包错误还是什么情况,10:30连续出现了两次重连,然后kcptun无log,仅仅stream close,git报告A TLS packet with unexpected length was received. 这个是收到了一个错误的包?但是kcptun/udp2raw这一层有包验证工具吧?
udp2raw: [2020-04-21 10:30:38][INFO]state back to client_idle from client_ready bc of client-->server direction timeout [2020-04-21 10:30:38][INFO]source_addr is now 192.168.99.191 [2020-04-21 10:30:38][INFO]using port 10316 [2020-04-21 10:30:38][INFO]state changed from client_idle to client_tcp_handshake [2020-04-21 10:30:38]INFOsent tcp syn [2020-04-21 10:30:38][INFO]state changed from client_tcp_handshake to client_handshake1 [2020-04-21 10:30:38]INFOsent handshake1 [2020-04-21 10:30:39][INFO]changed state from to client_handshake1 to client_handshake2,my_id is 909692cf,oppsite id is 48967e0e [2020-04-21 10:30:39]INFOsent handshake2 [2020-04-21 10:30:39][INFO]changed state from to client_handshake2 to client_ready [2020-04-21 10:30:52][INFO]state back to client_idle from client_ready bc of client-->server direction timeout [2020-04-21 10:30:52][INFO]source_addr is now 192.168.99.191 [2020-04-21 10:30:52][INFO]using port 11118 [2020-04-21 10:30:52][INFO]state changed from client_idle to client_tcp_handshake [2020-04-21 10:30:52]INFOsent tcp syn [2020-04-21 10:30:52][INFO]state changed from client_tcp_handshake to client_handshake1 [2020-04-21 10:30:52]INFOsent handshake1 [2020-04-21 10:30:53][INFO]changed state from to client_handshake1 to client_handshake2,my_id is 22c0e7a1,oppsite id is 9a50f5d0 [2020-04-21 10:31:07]INFOsent handshake2 [2020-04-21 10:31:07][INFO]changed state from to client_handshake2 to client_ready [2020-04-21 10:33:57][INFO]conv 9720c04c cleared
kcptun: 2020/04/21 10:30:57 stream closed in: 127.0.0.1:42200 out: 127.0.0.1:21928(3)
git:
... remote: Enumerating objects: 966, done. remote: Counting objects: 100% (966/966), done. remote: Compressing objects: 100% (207/207), done. error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed Tue Apr 21 10:30:57 CST 2020
然后用用git clone一个超大github上的项目,后者会出现中断,前者不会(网络环境不好,偶尔会出现几十秒到2分钟的数据中断) 能看见udp2raw也出现了重连再次切换client_ready,但是git clone还是断了。 这个是因为kcptun的中断导致的吗?
偶尔会出现几十秒到2分钟的数据中断
几十秒到2分钟,这个时间有点太长了。
很有可能是因为kcptun长时间没有收到数据,在udp2raw重连成功前,它自己重连了(一旦kcptun重连,上层链接就被它回收了)。你可以看看kcptun有没有参数可以控制这个, 把kcptun的重连间隔设得长一些。
kcptun-raw运行参数: (在我的repo里面增加了 --wnd 32 窗口参数调低模拟效果) kcpraw_server 127.0.0.1 37780 0.0.0.0 10000 --mode fast --noseq --key 'my--16-lenth-key'
udp2raw+kcptun运行参数: ./udp2raw_amd64 -s -l0.0.0.0:8801 -r127.0.0.1:7777 -k mykey --raw-mode faketcp --cipher-mode xor -a --fix-gro ./server_linux_amd64 -l 127.0.0.1:7777 -t 127.0.0.1:37780 --key mykey --crypt aes --mtu 1200 --nocomp --sndwnd=32 -smuxver 2
然后用用git clone一个超大github上的项目,后者会出现中断,前者不会(网络环境不好,偶尔会出现几十秒到2分钟的数据中断) 能看见udp2raw也出现了重连再次切换client_ready,但是git clone还是断了。 这个是因为kcptun的中断导致的吗?