2017-03-21 47 views
0

首先,道歉,如果標題不符合說明。封閉式LTE網絡內的本地眩暈服務器

我們在我們的組織中正在致力於一個closedLTE網絡內的對等視頻通信解決方案。爲此,我們使用開源的webrtc客戶端peerjs以及他們的本地peerjs服務器。默認情況下,服務器是指google stun服務器。

1. Is stun server required in case of closed LTE network? 
2. If yes, can we make use of a open source stun server which could run locally instead of the default one? 
3. If no, what are the changes I would need to do? 

我已經安裝一個開源的STUN服務器[https://github.com/enobufs/stun]但未能履行與客戶進一步聯繫。

我按照鏈接中提供的說明安裝服務器。現在,而不是默認的stun服務器,我把'本地IP地址:端口',並試圖建立連接點之間。但它的功效。

var configuration = { "iceServers": [{ "urls": "local-ip-address:port" }] }; 
pc = new RTCPeerConnection(configuration); 

我做錯了嗎? 請指導我完成。

在此先感謝

回答

0

Coturn是活躍的社區支持非常流行的STUN/TURN服務器。 可在https://github.com/coturn/coturn/wiki/Downloads

預建的包,您可以用sample demo

測試服務器如果雙方當事人都在同一個網絡,然後不需要配置反過來這樣的東西憑據。 Read more

Configuring the peerConnection: 

STUN server: //server_ip is coturn instance ip should be reachable from clients 
var iceServers= [{"url": "stun:server_ip:port"}]; 

or TURN server: 
var iceServers= [{"url":["turn:server_ip:port"],"username":"turn_username","credential":"turn_password"}]; 
var pc_config = {"iceServers": iceServers}; 
var pc_constraints = { 
     "optional": [{"DtlsSrtpKeyAgreement": true}] 
    }; 
pc = new RTCPeerConnection(pc_config, pc_constraints);