【问题标题】:local stun server inside a closed LTE network封闭 LTE 网络内的本地 stun 服务器
【发布时间】:2017-03-23 02:43:38
【问题描述】:

首先,如果标题与描述不符,请见谅。

在我们的组织中,我们正在研究封闭式 LTE 网络内的点对点视频通信解决方案。为此,我们使用开源 webrtc 客户端 peerjs 以及他们的本地 peerjs 服务器。服务器默认指的是google stun server。

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 server ,而是放置了 'local-ip-address:port' 并尝试在对等方之间建立连接。但它不起作用。

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

我做错了吗? 请指导我。

提前致谢

【问题讨论】:

    标签: webrtc stun lte peer


    【解决方案1】:

    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);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-19
      • 1970-01-01
      • 2012-10-16
      • 1970-01-01
      相关资源
      最近更新 更多