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.58k stars 128 forks source link

两台机器之间只能建立一个phantun连接 #154

Open 1887656 opened 4 months ago

1887656 commented 4 months ago

今天尝试在机器A作为phantun client,与机器B作为phantun server之间通过执行两条命令建立2个连接,通过这两个连接封装2个wireguard隧道,但执行后,wireguard无法连接,是phantun目前不支持两台机器之间建立多个连接吗? /usr/bin/phantun_client --ipv4-only --local 127.0.0.1:7699 --remote 1.2.3.4:7699 & /usr/bin/phantun_client --ipv4-only --tun-local 192.168.199.1 --tun-peer 192.168.199.2 --local 127.0.0.1:7609 --remote 1.2.3.4:7609 &

Ginurx commented 1 month ago

理论上可以,但是对应的 SNAT 和 DNAT 要跟着配上

firawk commented 2 weeks ago

单个phantun进程能不能同时处理多个端口呀,有些应用udp不止一个,这样要开N个server和client

dndx commented 2 weeks ago

Please use English only for Issues.

Phantun can support multiple instances per machine, but you will need to specify --tun to a different device, as well as --tun-local, --tun-peer to different addresses that are in the same subnet. Run with -h to see the detailed usage.