视频流 C 在Ubuntu上为WebRTC安装TURN服务器
Implementing our own STUN/TURN server for WebRTC Application.但我不明白的是如何在我的ubuntu 12.04上安
如何在我的ubuntu 12.04上安装TURN服务器?你能分享教程吗?我读了这个教程: Implementing our own STUN/TURN server for WebRTC Application.但我不明白的是如何在我的ubuntu 12.04上安装自己的TURN服务器? 我正在使用类似以下代码的东西来创建RTCPeerConnection const pc_config = {"iceServers": [{"url": "stun:stun.l.google.com:19302"},{"url":"turn:my_username@<turn_server_ip_address>","credential":"my_password"}]}; const pc_new = new webkitRTCPeerConnection(pc_config);我想填写上面代码的参数来使用不同的网络. 当我想安装转服务器然后我得到 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package resiprocate-turn-server我使用了apt-get install resiprocate-turn-server.我也使用了这个https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html教程. 它很容易在linux机器上安装,而不是在其他操作系统中尝试过.简单方法: sudo apt-get install coturn如果你说不,我想要最新的前沿,你可以自己安装它的downloads page下载源代码,例如: sudo -i # ignore if you already in admin mode apt-get update && apt-get install libssl-dev libevent-dev libhiredis-dev make -y # install the dependencies wget -O turn.tar.gz http://turnserver.open-sys.org/downloads/v4.5.0.3/turnserver-4.5.0.3.tar.gz # Download the source tar tar -zxvf turn.tar.gz # unzip cd turnserver-* ./configure make && make install用于运行TURN服务器的示例命令: sudo turnserver -a -o -v -n --no-dtls --no-tls -u test:test -r "someRealm"命令说明: > -a C 使用长期凭证机制 请查看此wiki以获取更多详细信息和配置. 现在您可以在WebRTC应用程序中使用TURN服务器: var peerConnectionConfig = { iceServers: [{ urls: YOUR_IP:3478,username: 'test',password: 'test' }] }(编辑:台州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |