rfc5766-turn-server as TURN and STUN for webrtc application

半腔热情 提交于 2019-12-11 20:44:36

问题


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


回答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).


来源:https://stackoverflow.com/questions/26508402/rfc5766-turn-server-as-turn-and-stun-for-webrtc-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!