What about ICE / STUN ?
lakano opened this issue · comments
Guillaume Lakano commented
Hello !
Your project seems really interesting !
But I would like to known if this could pass through NAT / Firewall / proxy ... ?
The WebRTC protocol uses ICE / STUN protocols to permit to etablish P2P connections between browsers. May be we need to do the same for WebSocket ?
Regards
Ozan Turgut commented
Yep, you should be able to pass through NAT but it's not because I wrote anything for it -- the browser is handles the ICE and STUN negotiations for the most part.
It's not documented, but you can specificy which STUN server to use while creating peer connections:
var otherPeer = peer.connect({
address: 'address to my peer',
rtcConfiguration: {"iceServers": [{"url": "stun:stun.l.google.com:19302"}]}
};