Hacker News new | ask | show | jobs
by oandrei 3723 days ago
STUN server is not a real solution. It is typically unable to penetrate NAT. Maybe WebRTC will work sometimes, but it is not a reliable solution. It is difficult to come up with alternative to Skype until IPv6 is widely adopted. But when we get IPv6, every computer will have its own address, then yes.
3 comments

If STUN does not work, it tries TURN. If TURN does not work, you're not connected to the Internet.

https://www.webrtc-experiment.com/docs/STUN-or-TURN.html

So use a TURN server.

TL;DR: Does the same as STUN but also is able to relay video & audio for hosts where STUN fails.

I'm using it in a Android app of mine for video conference and works really good. You can download something like coturn and drop it in a 5$ digitalocean and run with it.

It works for me.

Though I agree with you that IPv6 will be a boon to P2P networking, your statement is mostly incorrect. STUN can penetrate the most common types of NAT including full-cone, restricted-cone and port-restricted-cone[1]. As the other comments note, TURN can almost always get the job done with other NAT configurations.

The WebRTC API is actually surprisingly robust. It was built with these limitations in mind, so client code can supply a list of STUN and TURN servers, which the ICE framework underpinning WebRTC uses in the order they were supplied. So if setup correctly, WebRTC clients can use TURN as a backup when STUN isn't enough.

[1] https://en.wikipedia.org/wiki/STUN#Limitations

Here in Brazil, all NATs are either defective or ``symmetric'' whatever this means I am not an expert sorry. I do not expect STUN to work. As for TURN, this means traffic will go through the server. Then how is it better than Skype? Microsoft can afford, if I understand it correctly, a huge network of TURN servers, essentially. Is this how Skype works?