0

Assuming each node is on a different WAN, how can these nodes find each other, using neither: an intermediary STUN, TURN or other server; nor an explicit DNS | IP address?

|node 0|------|node 1|
\                    /
 \                  /
  \                /
   \---|node 2|---/

My use-case is to connect multiple smartphones together without Bluetooth, infrared, wired-connection, or having them join the same network. I've seen some NAT or other hole-punch tech. Is that the right approach? - I could generate a QR code but it's unclear what information to expose there (e.g., the public IP address isn't correct).

Samuel Marks
  • 1,611
  • 1
  • 20
  • 25
  • NAT uses explicit adresses and technically just masks them so your endpoint interact with local adress, but you need global address to connect with *external* router. Hole-punching is a more general case of what domestic routers call DMZ. The only how two devices can connect in network is having routable adresses... which in case of Internet are IPs. – Swift - Friday Pie Jul 31 '21 at 09:24
  • Related: https://stackoverflow.com/q/51004291 – Samuel Marks Jul 31 '21 at 09:30
  • After each node discovers their own IP address via STUN and/or allocates a relay address with TURN, then they need a way to exchange those IP addresses to initiate the hole-punching with the ICE methodology. You can reference my write-up on this process here: https://stackoverflow.com/a/8524609/104458 – selbie Jul 31 '21 at 20:44

0 Answers0