Can't connect using stun in some cases that google's stun server can facilitate
fresheneesz opened this issue · 1 comments
I did a test with 3 different node.js stun servers: stun, node-stun, and ministun. All had the same properties on the cases I tested on. The case they all failed was when I tried to connect a phone on its mobile network to a desktop client (which was also the machine hosting the stun server and coordination server). This case worked fine when I used stun:stun.l.google.com:19302 however, so I'm not sure if there's some functionality these modules aren't implementing, if they all have similar bugs, or if something else is going on. In any case, it feels like a rather large hole in the abilities of all of these stun server modules and finding a way to support that case would be a great way to differentiate this module vs the rest.
Here's the code I was testing with, and a readme that detailed the cases and the restults for each module:
I created similar issues on the other repos as well:
In your experiment, there's one thing that all three Node.js STUN packages share in common which they do not have in common with Google's STUN server:
They are hosted on the same machine as your desktop client, and Google's STUN server is not.
Have you tried hosting the Node.js servers on a VM in the cloud and then repeating your experiment?