STUN/TURN服务器搭建

STURN/TURN

服务器 :
公网服务器 购买带有公网IP的云服务器
镜像 :
ubuntu 16.04

安装

ubuntu16镜像已经带有coturn的源 可以直接apt-get安装

apt-get install coturn

配置

turnserver -o -a -f -v --mobility -m 2 --max-bps=100000 --min-port=32355 --max-port=65535 --user=cx:cx1234 -r demo -L公网ip

STUN/TURN的默认端口是3478

测试

turnutils_uclient -u cx -w cx1234 公网IP

除此之外还可以通过https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/测试ice

你可能感兴趣的:(STUN/TURN服务器搭建)