ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.05k stars 925 forks source link

Hole punching TCP and P2P #1152

Open leonardospeca opened 9 months ago

leonardospeca commented 9 months ago

Hi. Can you explain why a TCP hole punching doesn't allow to make a peer-to-peer connection anymore?

I have this scenario:

I would like that v2.supernode.mysite.com:443 forward to 8005, v3.supernode.mysite.com:443 forward to 8006

But seems like in UDP with NGINX, HAPROXY or any other program, is not possible to distinguish the request by a subdomain name..

Maybe with the TCP option, the problem could be solved, but we don't want to lose the ability of doing the connection P2P...

I'm trying to do that cause I want to open just a port on the VPS (the 443 UDP or TCP) I tried also something like udp2raw but it doesn't allow to specify a domain name as remote server. Do you have other suggestions?

Thank you very much