Chion82 / kcptun-raw

Kcptun with raw socket and fake TCP headers.
GNU General Public License v3.0
416 stars 101 forks source link

我从腾讯云无法到我的Ramnode #12

Closed alfal closed 7 years ago

alfal commented 7 years ago

Ramnode的VPS,从公司kcp到VPS正常使用,但是从腾讯云kcp过去一直无法使用 Server命令: /root/soft/kcptun-raw/server 127.0.0.1 10663 107.191.111.222 15663 --mode fast2 Client命令: /root/soft/kcptun-raw/client 107.191.111.222 15663 10.141.111.222 1090 --mode fast2 Server输出: [root@222 kcptun-raw]# /root/soft/kcptun-raw/server 127.0.0.1 10663 107.191.111.222 15663 --mode fast2 [2017-06-26 17:23:30] fast2 mode enabled. [2017-06-26 17:23:52] [trans_packet]Server replying SYN+ACK. [2017-06-26 17:23:53] [trans_packet]Data checksum validation failed. Dropping. [2017-06-26 17:23:54] [trans_packet]Server replying SYN+ACK. [2017-06-26 17:24:15] [trans_packet]Server replying SYN+ACK. [2017-06-26 17:24:16] [trans_packet]Data checksum validation failed. Dropping. [2017-06-26 17:24:17] [trans_packet]Server replying SYN+ACK.

Client输出: [root@VM_11_222_centos soft]# /root/soft/kcptun-raw/client 107.191.111.222 15663 10.141.111.222 1090 --mode fast2 [2017-06-26 17:24:15] fast2 mode enabled. [2017-06-26 17:24:15] Re-init fake TCP connection. [2017-06-26 17:24:15] [trans_packet]Client sending SYN. [2017-06-26 17:24:15] [trans_packet]Client replying ACK. [2017-06-26 17:24:17] Re-init fake TCP connection. [2017-06-26 17:24:17] [trans_packet]Client sending SYN. [2017-06-26 17:24:17] [trans_packet]Client replying ACK.

如果Client使用命令:/root/soft/kcptun-raw/client 107.191.111.222 15663 127.0.0.1 1090 --mode fast2 的话,Server端看不到任何信息

这会是什么原因?

Chion82 commented 7 years ago

Server和client都拉最新的代码(master分支)重新make试试?从Client端log看代码不是最新的。

alfal commented 7 years ago

嗯,是代码同步的问题,更新个代码后重新编译一下就OK了

还有一个问题就是Client不能绑定127.0.0.1的问题有解么?

Chion82 commented 7 years ago

Client和Server的“本机IP”参数不是作为绑定IP的,而是用于填充IP报文的出口地址的,所以该IP应该使用 本机出口网卡(如eth0)直接分配到的IP地址,否则IP包是无法被内核路由的。

alfal commented 7 years ago

OK,明白了,感谢大神