4 ms·
I'm not as familiar with WebRTCPeerConnection as I'd like to be. Does it use the STUN server to get it's real IP and after that we can establish a completely pe
by jjice 7y ago
I'm not as familiar with WebRTCPeerConnection as I'd like to be. Does it use the STUN server to get it's real IP and after that we can establish a completely peer to peer connection and now the webserver has no interaction with WebRTCPeer stream?
If any of that is wrong, please enlighten me, I didn't realize peer to peer connections could be as simple as this.
- algesten 7y agothat's right. when establishing connection each side enumerates a bunch of "ice candidates". which is everything from your local LAN to outside NAT ip discovered via TURN servers (some restrictions due to privacy reasons). once the ice candidates are exchanged each side starts spraying the other with STUN messages to addresses ranked by "candidate pairs" that potentially could make a connection until one is found. this is simplified. there are mechanics like "trickle ice" and fallbacks to proxying via TURN servers. then there's the alleged idea this is all part of a webrtc "standard", which is laughable cause no browser follows the wild collection of RFCs that supposedly makes up the standard and the only reason any of it works is because there's a non written down general consensus of what's required.
- Sean-Der 7y agoThat is right! The only extra thing that STUN does is establish a hole punch. It isn't enough to just get your public hole, but you also do a temporary 'port forward' to the person that made the STUN request.
- strbean 7y agoLast I checked (long ago) there is the option for a TURN fallback as well.