相同参数下的 IPv4 访问完全没问题,但用 IPv6 地址访问同一台服务器的时候被转发的 ss 就无法正常工作,服务器 log 能正确显示来源的 ipv6 地址,时有 broken pipe 错误
我的服务端参数
kcptun -t "ss 地址端口" -l ":监听端口" -mode fast2 -dscp 46
补充 服务端和客户端均为当前最新版
同样的问题,使用20160904版本,相同设定的情况下IPv4可以正常使用,IPv6无法正常工作,有stream open和close信息。
服务端设定:./server_linux_amd64 -l ":53" -t "127.0.0.1:443" --mode normal --crypt none --nocomp --mtu 1400
客户端设定:./client_darwin_amd64 -r "[server_ipv6_address]:53" -l ":8388" --mode normal --crypt none --nocomp --mtu 1400
Check your
-key xxxfor at least 3 times, _MAKE SURE_ both sides share the same secret.
No problem
-nocomp, -datashard, -parityshard, -key, -crypt_must be the same_ on both side.
Yes, no problem
Did you correctly set the _-target_ on the server side?
Yes, worked with IPv4
_MAKE SURE_
telnet target porton your server successful(don't ask me why couldn't).
Both IPv4 and IPv6 failed, but IPv4 worked normally while IPv6 didn't work.
Does your _firewall allows UDP_ communications? (including your ISP Cable-Modem)
Yes, also tried clearing iptables, still not working.
Are you using the same version for both client & server
Yes, tried 20160904 and 20160811
Are you using the latest release?
Yes
Which OS do you use?
Server: Ubuntu 14.04 x86-64
Client: Mac OS X El Capitan 10.11.6
Which end for this issue related to, client or server?
Don't know, maybe both?
另外,在IPv6不能工作时,通过Wireshark抓包,发现服务器或者服务器网关返回大量 Port Unreachable 信息。尝试telnet server_ip kcptun_port,无论在IPv4与IPv6下均返回 Connection refused,但IPv4完全可以正常工作。
尝试过指定无加密、修改MTU、不启用压缩等方法,均无法在IPv6下正常工作。
猜想:是否与服务器提供多个IPv6地址有关?该服务器拥有1个IPv4地址和16个IPv6地址,有时通过IPv6访问时会使用另一个IPv6地址返回信息(如OpenVPN)。但是由于无法静态指定IPv6地址,故无法测试单IPv6地址的情况。
@xtaci 已解决,在服务器端指定监听端口的IP即可,即:
./server_linux_amd64 -l "server_ipv6_address:53" -t "127.0.0.1:443" --mode normal --crypt none --nocomp --mtu 1400
看来的确与服务器拥有多个IP有关,建议写入FAQ中~
好的我试试(你也是 conoha 用户吗
转发 squid 成功了,感动
amazon ec2 服务器端指定监听端口的IPV4问题
感谢,我也是这个问题,kcptun需要指定监听的ip地址,不能光指定端口号
能否指定监听的IPv6端口号,类似这种:
"listen": "[::]:53",
......
服务器已支持IPv6,本地也支持IPv6 IPv4,双方但是 均为双栈。
使用dig subdomain.domain 可以获取 A和AAAA记录。
在客户端配置为-r subdomain.domain:port后, 发现只会走IPv4模式。
修改Linux的 getAddrInfo (gai.conf)后,客户端Linux的多数应用都会走IPv6 优先解析的模式
但是 kcp客户端自身扔走 IPv4 而不是优先 IPv6。只有写成-r '[xxxx:xxxx:xxx....:xxxx]:port'后才走IPv6
大佬们,kcp客户端配置时 采用域名的方式填写主机地址时,如何也让kcp按照ipv6优先的方式?
Most helpful comment
@xtaci 已解决,在服务器端指定监听端口的IP即可,即:
./server_linux_amd64 -l "server_ipv6_address:53" -t "127.0.0.1:443" --mode normal --crypt none --nocomp --mtu 1400看来的确与服务器拥有多个IP有关,建议写入FAQ中~