The best article I've found about NAT traversal is this article from Tailscale: https://tailscale.com/blog/how-nat-traversal-works
https://github.com/samyk/pwnat
https://github.com/samyk/slipstream