最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to make a turn server on node.js for peer connection - Stack Overflow

programmeradmin1浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 8

you 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();
发布评论

评论列表(0)

  1. 暂无评论