coturn是一个github开源项目,具体介绍:https://github.com/coturn/coturn
git clone https://github.com/coturn/coturn.git
./configure执行报错
我们自己安装openssl dev版本
git clone https://github.com/openssl/openssl.git
到openssl项目目录下,执行./config --prefix=自己指定目录,make && make install
再回到coturn项目下执行configure,再次发现Libevent2 development is not installed properly
上libevent官网下载 http://libevent.org/ ,解压编译安装
./configure -> make && make install
回到conturn,./configure --prefix=指定路径,make && make install
turnserver -o -a -f -v --mobility -m 10 --max-bps=100000 --min-port=32355 --max-port=65535 --user=admin:admin --user=test:test -r demo
-m 10 表示启动十个relay线程.
当TURN Server用于WebRTC时,必须使用long-term credential mechanism, 即指定 -a 或者 --lt-cred-mech
--max-bps=100000 限制最大速度为100KB/s.
添加了两个用户admin 和test.
可以直接使用turnutils_uclient -u ling -w ling1234 来测试. turnutils_uclient 有很多参数可以配置的.