ustulation / p2p

NAT Traversal techniques for p2p communication
BSD 3-Clause "New" or "Revised" License
133 stars 28 forks source link

feature/punching: Modify hole-punching algorithm #53

Closed canndrew closed 6 years ago

canndrew commented 6 years ago

To make it tolerate longer delays between when connecting peers commence their side of the the connection.

canndrew commented 6 years ago

So in case it's not clear, the algorithm always increments the ttl by one hop at a time, rather than having separate punchers use ttl sequences like (2, 3, 4, 5, ..), (4, 6, 8, 10, ...), (6, 9, 12, ...) etc.

Instead the different punchers increase their ttls at different rates, with the slowest taking 2 minutes to get to ttl 16.