安装
yum install libevent-devel libevent
yum install epel-release -y
yum install turnserver
配置turnserver.conf
vi /etc/coturn/turnserver.conf
部分内容参考如下
# 监听端口,不配置的话,默认是3478
listening-port=3478
# 外网地址
external-ip=112.74.183.177
# 设置用户名及密码,可设置多个
user=tan:123
no-cli
cli-password=$5$79a316b350311570$81df9cfb9af7f5e5a76eada31e7097b663a0670f99a3c07ded3f1c8e59c5658a
启动 turn server
systemctl start coturn
停止turn sever
systemctl stop coturn
测试服务
用较新版的firefox打开
https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/