G2 Udp hole punching / NAT Traversal #164
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This adds a simple UDP Hole punching/NAT Traversal mechanism to enable G2 (Call Sign Routing) for gateways running with non public IP, typically mobile networks.
I have recently read about UDP hole punching / NAT Traversal which is used in kademlia protocol. I decided to go for it and to see if it is possible to implement it to allow G2 to traverse NAT routers.
This turned out to be quite easy yet it has one limitation. There can only be one gateway behind the NAT router.
This works by sending a dummy 1 byte UDP packet on the G2 port every time a gateway is seen on the ircddb network. In case both gateway want to talk together the hole is already punched for DV data to flow through, if gateways don't NAT router will kill the UDP session after TTL is expired.
73
Geoffrey F4FXL - KC3FRA