Went down the NAT hole punching rabbit hole far enough to write a basic STUN client before running into why most hole punching literature is about UDP and not TCP: both peers must simultaneously open connections to each other in order for (most) NATs to behave properly. STUN will let you know your socket's public address and port, but it won't help you rendezvous with another peer. Learned a lot, but somewhat of a dead end. This page has probably the best and most understandable explanations of various hole punching scenarios: bford.info/pub/net/p2pnat/

@dthompson what prevents you from going down an IPv6 path instead? NAT hole punching is interesting, but generally only a North American focused initiative

Follow

@dthompson and most NA hosting and internet providers now have some IPv6 path, though it sadly still takes manual effort in many cases

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml