2014-07-16 22 views
4

我对rfc5766-turn-server有以下设置,但我还不确定如何在turnserver.conf中启用TLS?rfc5766-turn-server - 如何启用TLS和HTTP CONNECT方法呢?

任何想法,缺什么,以确保TLS被激活,相关人士透露缺少什么吗?

# cat turnserver.conf 
user=root:root 
realm=x.x.x.x 
#no-tls 
#no-dtls 
syslog 
aux-server=x.x.x.x:80 
aux-server=x.x.x.x:443 

问题:当TURN客户端与以下原语连接,与上述TURN服务器则有自动开启会话关闭的问题。

config: '{"iceServers":[{"urls":"stun:stun.l.google.com:19302"},   
     {"credential":"root","urls":"turn:[email protected]:443?transport=tcp"}], 
      "iceTransports":"relay"}'; 

注:443 TCP

config: '{"iceServers":[{"urls":"stun:stun.l.google.com:19302"},   
     {"credential":"root","urls":"turn:[email protected]:80?transport=tcp"}], 
      "iceTransports":"relay"}'; 

注:80 TCP

+1

以我的经验,最快捷的方式得到的回复是在https://groups.google.com/forum/#!forum/turn-server-project-rfc5766-turn-server上询问。请做到这一点,并总结下面收到的答案,以便其他用户可以从中受益。 – Gili

回答

3

我想我回答这个问题有点晚了,希望它能帮助人们谁就会绊倒稍后再回答这个问题。

我不认为你可以在TURN配置文件直接启动turnserver添加用户,无论是单独的平面文件/一些分贝或命令的一部分(或通过turnadmin

让假设监听的IP是XXXXX和端口PPP(从我的理解,这个端口可以是任何你想要的,无论运输是udptcp和如果您在端口< 1024上运行你会需要提升的访问)使用turnconfig文件(turnconfig

。 conf):

listening-ip=XXXXX 
tls-listening-port=PPP 
cert=(certificate location) 
pkey=(private key location) 
lt-cred-mech 
realm=someRealm 
log-file=/var/tmp/turn.log 
no-sslv2 
no-sslv3 

开始cmdwould是:turnserver -v -c turnconfig.conf -o -u user:root

没有配置文件:

turnserver --tls-listening-port PPP -L XXXXX -r someRealm -a -o -v -n -u user:root -l '/var/tmp/turn.log' --no-sslv2 --no-sslv3 

注:是,这是在NAT后面(通常在亚马逊EC2的情况下)主办,另一个费尔德需要external-ip

和(上的WebRTC应用RTCPeerConnection)的配置是:

config: { 
      'iceServers':[ 
       { 
        'url': 'stun:stun.l.google.com:19302' 
       }, 
       { 
        'url': 'turn:[email protected]:PPP?transport=udp', 
        'credential': 'root' 
       }, 
       { 
        'url': 'turn:[email protected]:PPP?transport=tcp', 
        'credential': 'root' 
       } 
      ] 
    }; 

为生成的证书和私钥,您可以使用openssl

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3001 -nodes 
相关问题