Related to #34, I created a little NAT traversal demo to get more familiar with the process. What I noticed:
The open connection has to be re-used while changing the remote IP in order to keep the local address and the port assigned by the NAT stable while switching to communication with the peer. This doesn't work when using Dial to setup the connection. In addition, the STUN and peer traffic has to be multiplexed on the same connection. I think we'll have to revise the client implementation to take this into account.
We should investigate ways to test NAT traversal since it requires 2 machines behind a NAT and a third to run the STUN server. Maybe some sort of Docker/VirtualBox setup.
Related to #34, I created a little NAT traversal demo to get more familiar with the process. What I noticed: