0

I have implemented rfc5766-turn-server and have it running on my own server. in the app, I set :

pc_config = {"iceServers": [{"url":"turn:username@<turn_server_address>", "credential":"password"}]};

it seems to be working, but I have couple of questions:

  1. is having the app set this way , with rfc5766-turn-server is enough to act as a TURN and also STUN server or do I also need to run a stun server.

a turn server is also stun so will the rfc5766-turn-server function as a stun server (on most cases) and a turn server when needed?

  1. for testing purposes it seems to work fine with the username and password given in the app, but eventually when the app is in production and have many users , do all users use the same username/password for the TURN server??

hope my question make sense...

Thanks

Benjamin Trent
  • 7,378
  • 3
  • 31
  • 41
Guy S
  • 1,424
  • 1
  • 15
  • 34
  • RE: #2 ... I know with the coTurn server, you call a REST API that returns a time sensitive secure token that you use from client side javascript to validate a session. – Michael Gorham Oct 22 '14 at 18:59

1 Answers1

1
  1. Yes, that server will try to act as a stun server first(you can configure it that way) but if that fails it will run work as a turn server.
  2. Which ever way you want. You can have static long-term credentials or configure TURN REST API(which they support).
Community
  • 1
  • 1
Benjamin Trent
  • 7,378
  • 3
  • 31
  • 41
  • 1
    2) Check this out - Stuck with the TURN server credential/password in clear text issue - https://groups.google.com/forum/#!topic/discuss-webrtc/nn8b6UboqRA – Manza Oct 30 '14 at 09:09
  • @Benjamin Trent, Thanks, a few follow up questions: regarding A1: how do I configure it to run this way (try stun and if not successful use turn). Regarding A2: If, lets say I use the static lt-cred-mech, will the server accept many requests, all using the same static credentials???. Another question: in the TURN REST API the temp password is generated with user,timestamp and secret, but I noticed that the same password is generated if 2 requests are within the same second, thus making one of them not unique, so won't one of those users receive an unauthorised message and get rejected? Thanks – Guy S Nov 06 '14 at 14:48
  • Each sounds like their own SO question or a question to ask the devs. But I believe by default it accepts both STUN and TURN requests(works as both). – Benjamin Trent Nov 06 '14 at 15:36