I'm using a node.js server to send iceCandidates and connect two puters by peer connection (javascript). I want to use TURN-server as iceServer, but I don't have one, so I want to make TURN-server on my server. How is it possible?
I'm using a node.js server to send iceCandidates and connect two puters by peer connection (javascript). I want to use TURN-server as iceServer, but I don't have one, so I want to make TURN-server on my server. How is it possible?
Share edited Dec 4, 2017 at 23:26 Mikko 1,9472 gold badges26 silver badges37 bronze badges asked Nov 29, 2017 at 11:21 VyacheslavVyacheslav 991 gold badge3 silver badges8 bronze badges 3- 1 Not sure what you mean by "I want to use TURN-server as iceServer", but if I understand correctly you want to implement your own TURN-server. Just install coturn and configure your clients to use it. This will be a lot easier than to implement your own solution. – Mikko Commented Dec 4, 2017 at 21:20
- @Mikko, that should maybe be an answer... – catbadger Commented Dec 4, 2017 at 23:27
- @catbadger thanks for the note. Yeah I guess, it doesn't really answer the question of writing your own server, but it is the correct thing to do – Mikko Commented Dec 5, 2017 at 17:03
1 Answer
Reset to default 8you can use node-turn to write your own server or using it as a standalone server.
var Turn = require('node-turn');
var server = new Turn({
// set options
authMech: 'long-term',
credentials: {
username: "password"
}
});
server.start();