-
SummaryIt'd be nice if I could give the library a known external address, like a public IP and UDP port, and then have that be part of the SDP / ICE candidates. MotivationMy main interest in WebRTC is in NAT traversal, using it as a generic P2P transport. It's also nice that it can work in the browser. But outside of the browser there are some existing techniques for NAT traversal like UPnP and NAT-PMP. These standards allow for opening a port on the router. There already existing Go libraries for this, like huin/goupnp and jackpal/go-nat-pmp. I don't think Pion should integrate these libs, but it'd be nice if on a desktop I could call them, get an address, and then give it to Pion to try and use when establishing the WebRTC connection. This will make for faster connection setup, and can create direct connections in places where STUN doesn't work. Describe alternatives you've consideredNot sure of anything that can do this. Maybe it's already available in the library and I just don't know about it. Maybe just by adding an SDP line before sending it? If that's possible I'd appreciate if someone could share some code. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
This does exist today! Check out SetNAT1To1IPs. When you do implement you should write a blog post! I have never seen any numbers, but I am personally curious about the success rate of STUN vs nat-pmp. |
Beta Was this translation helpful? Give feedback.
-
I've started implementation of this feature in a new pion/portmap package. |
Beta Was this translation helpful? Give feedback.
Hey @makeworld-the-better-one
This does exist today! Check out SetNAT1To1IPs. When you do implement you should write a blog post! I have never seen any numbers, but I am personally curious about the success rate of STUN vs nat-pmp.