dndx / phantun

Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.
Apache License 2.0
1.71k stars 137 forks source link

不能很好地防止运营商 QoS #109

Closed pexcn closed 1 year ago

pexcn commented 1 year ago

我使用 tinyfecvpn + phantun, 配置好之后,有时候(客户端) ping tinyfecvpn 的 IP (10.1.1.1) 不通,疑似运营商对 UDP QoS, 通常过十分钟左右又能通了。而使用 udp2raw 没有这个问题。

我的配置如下,1024 端口为 tinyfecvpn,1025 端口为 phantun

# phantun 服务端
phantun-server --local 1025 --remote 127.0.0.1:1024 --ipv4-only --tun phantun-server --tun-local 10.10.100.1 --tun-peer 10.10.100.2

# phantun 客户端
phantun-client --local 127.0.0.1:1025 --remote 11.22.33.44:1025 --ipv4-only --tun phantun-client --tun-local 10.10.100.1 --tun-peer 10.10.100.2

# tinyfecvpn 服务端
tinyfecvpn -s -l 127.0.0.1:1024 -k password --tun-dev tinyfecvpn-server --sub-net 10.1.1.0 -f10:6 --timeout 3 --log-level 3 --mssfix 0 --disable-obscure --disable-checksum

# tinyfecvpn 客户端
tinyfecvpn -c -r 127.0.0.1:1025 -k password --tun-dev tinyfecvpn-client --sub-net 10.1.1.0 --keep-reconnect -f10:6 --timeout 3 --log-level 3 --mssfix 0 --disable-obscure --disable-checksum
pexcn commented 1 year ago

可能上面的描述讲得不是很清楚。。 值得一提的是,我有两个 VPS,一个使用 phantun + tinyfecvpn,另一个使用 udp2raw + tinyfecvpn.

phantun + tinyfecvpn: 有时候不通,过十分钟左右正常。客户端出现以下日志:

 INFO  client   > New UDP client from 192.168.1.1:55360
 INFO  fake_tcp > Sent SYN to server
 INFO  fake_tcp > Connection to xx.xx.xx.xx:1024 established
 INFO  fake_tcp > Connection (Fake TCP connection from 10.2.101.2:16205 to xx.xx.xx.xx:1024) reset by peer
 INFO  fake_tcp > Fake TCP connection to (Fake TCP connection from 10.2.101.2:16205 to xx.xx.xx.xx:1024) closed
 INFO  client   > New UDP client from 192.168.1.1:55360
 INFO  fake_tcp > Sent SYN to server
 INFO  fake_tcp > Connection to xx.xx.xx.xx:1024 established
 INFO  fake_tcp > Connection (Fake TCP connection from 10.2.101.2:64963 to xx.xx.xx.xx:1024) reset by peer
 INFO  fake_tcp > Fake TCP connection to (Fake TCP connection from 10.2.101.2:64963 to xx.xx.xx.xx:1024) closed
 INFO  client   > New UDP client from 192.168.1.1:55360

udp2raw + tinyfecvpn: 暂时没有断连的现象。

dndx commented 1 year ago

Please provide more information to help troubleshoot (e.g. packet captures, etc).

seek2222 commented 4 months ago

@dndx I have opened up a new issue and "rest by peer" and I can provide more details needed.