首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >测试TURN服务器的简单方法

测试TURN服务器的简单方法
EN

Stack Overflow用户
提问于 2015-12-02 05:09:14
回答 1查看 16.4K关注 0票数 7

我正在看这个网站,它应该是用来测试TURN服务器(according this this answer)的。

plugin.temasys.com.sg/demo/samples/web/content/peerconnection/trickle-ice/index.html

我输入了我的服务器信息,但找不到任何东西来确定服务器是否工作。即使没有选择服务器,ice候选部分看起来也是一样的。

我的TURN服务器安装在亚马逊EC2上。我按照coturn存储库的安装说明进行了操作:

github.com/coturn/coturn/blob/master/INSTALL

以下是我从here执行启动TURN服务器的命令时在我的服务器中得到的结果:

代码语言:javascript
复制
RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Coturn-4.2.1.2 'Monza'
0:
Max number of open files/sockets allowed for this process: 4096
0:
Due to the open files/sockets limitation,
max supported number of TURN Sessions possible is: 2000 (approximately)
0:

==== Show him the instruments, Practical Frost: ====

0: TLS supported
0: DTLS supported
0: AEAD supported
0: Redis supported
0: PostgreSQL supported
0: MySQL supported
0: MongoDB is not supported
0: OpenSSL compile-time version 0x1000106f: fresh enough
0: Default Net Engine version: 3 (UDP thread per CPU core)

=====================================================

0: Config file found: /usr/local/etc/turnserver.conf
0: Listener address to use: 172.31.43.176
0: Relay address to use: 172.31.43.176
0: Config file found: /usr/local/etc/turnserver.conf
0: Domain name:
0: Default realm: realm
0: Config file found: /usr/local/etc/turnuserdb.conf
0: WARNING: cannot find certificate file: turn_server_cert.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly
0: WARNING: cannot find private key file: turn_server_pkey.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly
0: pid file created: /var/run/turnserver.pid
0: IO method (main listener thread): epoll (with changelist)
0: WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided
0: Wait for relay ports initialization...
0:   relay 172.31.43.176 initialization...
0:   relay 172.31.43.176 initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: IPv4. UDP listener opened on: 172.31.43.176:3478
0: Total UDP servers: 0
0: Total General servers: 1
0: turn server id=0 created
0: IPv4. TCP listener opened on : 172.31.43.176:3478
0: IO method (cli thread): epoll (with changelist)
0: IPv4. CLI listener opened on : 127.0.0.1:5766
0: IO method (auth thread): epoll (with changelist)

它似乎起作用了,但我怎么知道呢?我为我的无知道歉,我已经阅读了太多关于这方面的文档,我不能全部记录下来。

编辑:发生了一些事情:)

每当我使用上面提到的网站时,我都会在我的turn服务器上收到这些信息:

代码语言:javascript
复制
64: ERROR: check_stun_auth: Cannot find credentials of user <ubuntu>
64: session 000000000000000004: realm <realm> user <ubuntu>: incoming packet message processed, error 401: Unauthorised

编辑2:我删除了ubuntu部分,现在似乎收到了成功的响应。仍然不知道这是什么意思,但这是一个开始:)

代码语言:javascript
复制
274: handle_udp_packet: New UDP endpoint: local addr 172.31.43.176:3478, remote addr 12.123.123.123:64064
274: session 000000000000000007: realm <realm> user <>: incoming packet BINDING processed, success
274: handle_udp_packet: New UDP endpoint: local addr 172.31.43.176:3478, remote addr 12.123.123.123:64068
274: session 000000000000000008: realm <realm> user <>: incoming packet BINDING processed, success
274: session 000000000000000007: realm <realm> user <>: incoming packet message processed, error 401: Unauthorised
274: session 000000000000000008: realm <realm> user <>: incoming packet message processed, error 401: Unauthorised
274: IPv4. Local relay addr: 172.31.43.176:56767
274: session 000000000000000007: new, realm=<realm>, username=<turnadm>, lifetime=600
274: session 000000000000000007: realm <realm> user <turnadm>: incoming packet ALLOCATE processed, success
274: IPv4. Local relay addr: 172.31.43.176:54363
274: session 000000000000000008: new, realm=<realm>, username=<turnadm>, lifetime=600
274: session 000000000000000008: realm <realm> user <turnadm>: incoming packet ALLOCATE processed, success
274: session 000000000000000007: realm <realm> user <turnadm>: incoming packet ALLOCATE processed, success
274: session 000000000000000008: realm <realm> user <turnadm>: incoming packet ALLOCATE processed, success
EN

回答 1

Stack Overflow用户

发布于 2016-09-14 20:44:39

如果您有一个带有WebRTC的测试应用程序。

你可以强制打开Firefox。

选项卡:about:config

搜索:media.peerconnection.ice.relay_only

将其设置为true

目前,Firefox只使用转弯中继。

票数 22
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34030188

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档