问题
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:
- 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?
- 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:
- 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.
- 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