Is a public ip needed to build p2p network using pion webrtc? #1769
-
I am trying to use webrtc to build a p2p chat app but I am bit confused. Do I still need to establish a node with a public ip to bootstrap the network? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Usually, public IP is not needed as ICE automatically establishes connection over NATs. You can discover the type of the NAT by https://github.com/enobufs/go-nats. |
Beta Was this translation helpful? Give feedback.
-
To learn a little bit more about the issues that come up with P2P networking also check out the Connecting chapter in WebRTC for the Curious. If you want to do P2P you will probably need to run a TURN Server. If you are just connecting browsers you probably don't even need Pion WebRTC. As you scale/hit challenge with P2P check out the other topologies that you can do with WebRTC. |
Beta Was this translation helpful? Give feedback.
-
Recently I have experienced the similar problem so I understood what you want. |
Beta Was this translation helpful? Give feedback.
Usually, public IP is not needed as ICE automatically establishes connection over NATs.
However, some types of the NATs (including Symmetric NATs) makes it hard.
You can discover the type of the NAT by https://github.com/enobufs/go-nats.