0

I decided to create my own STUN server to use it together with the following JS library https://simplewebrtc.com.

I decided to use this: http://www.stunprotocol.org/

I have followed the instructions and it seems like the server is running. The command sudo lsof -i:3478 (3478 is the default port) outputs this:

stunserve 12856 user    3u  IPv4 232305      0t0  UDP *:3478 

I have also modified the JS library to use my server according to this instructions: https://github.com/andyet/SimpleWebRTC (peerConnectionconfig).

peerConnectionConfig:{iceServers:[{urls:"stun:myServerHost:3478"}]}

But when I use tcpdump to capture the traffic on the server nothing is captured like the server is not used. Which server is then used if this one is configured?

Jacob
  • 3,580
  • 22
  • 82
  • 146
  • You can run stuntman with the `--verbosity 4` command line parameter to see all server traffic. – selbie Mar 06 '16 at 22:21

1 Answers1

1

Actually the configuration is like this:

{ iceServers: [ 
    {
        "url": "stun:your.stun.server"
        , "username": "user"
        , "credential": "password"
    }
]}

Credentials are optional. And you can use https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ to test your stun server.

Adrian Ber
  • 20,474
  • 12
  • 67
  • 117
  • Testing the server I don't get it, no mather what I type as a server, some candidates are always returned – Jacob Mar 03 '16 at 13:59
  • Compare with and without your server, the number of candidates or select 'relay' instead of 'all'. – Adrian Ber Mar 03 '16 at 14:07
  • 1
    Actually, `url` [got renamed to](http://w3c.github.io/webrtc-pc/#idl-def-RTCIceServer) `urls`. – jib Mar 03 '16 at 21:34
  • I guess I am setting the configuration the wrong way. What would be the correct way? This is not workig: webrtc.config.peerConnectionConfig = ....... – Jacob Mar 04 '16 at 09:29