如何在公司代理服务器后面使用stun.l.google.com?

时间:2017-07-25 12:01:43

标签: docker proxy ubuntu-16.04 stun mattermost

我想配置

的本地副本

https://github.com/mattermost/mattermost-webrtc/blob/master/vagrant/janus/config/janus.cfg

video calls中启用Mattermost以进行测试。一部分是:

[nat]
stun_server = stun.l.google.com
stun_port = 19302

如何在公司代理服务器后面使用stun.l.google.com

我试过

proxytunnel -p corporate-proxy:7123 -d stun.l.google.com:19302 -a 3098

并用

替换第一部分
[nat]
stun_server = localhost
stun_port = 3098

导致

$ docker run -it webrtc_blah_2
Janus commit: ad2c131617ac989df1a1bbd601272a5e448cbb3e
Compiled on:  Mon Jul 24 13:04:22 UTC 2017

---------------------------------------------------
  Starting Meetecho Janus (WebRTC Gateway) v0.2.4
---------------------------------------------------

Checking command line arguments...
Debug/log level is 4
Debug/log timestamps are disabled
Debug/log colors are enabled
Adding 'vmnet' to the ICE ignore list...
Using X.17.0.2 as local IP...
Token based authentication enabled
Initializing recorder code
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, IPv6 support disabled)
STUN server to use: localhost:3098
ICE handles watchdog started
Testing STUN server: message is of 20 bytes
[FATAL] [ice.c:janus_ice_set_stun_server:808] No response to our STUN BINDING test
[FATAL] [janus.c:main:3667] Invalid STUN address localhost:3098

与默认配置类似(参见最后两行):

[FATAL] [ice.c:janus_ice_set_stun_server:808] No response to our STUN BINDING test
[FATAL] [janus.c:main:3667] Invalid STUN address stun.l.google.com:19302

1 个答案:

答案 0 :(得分:1)

1.STUN和TURN两个服务器按照定义在各自的RFC中只能在公共IP上设置

2.Stun服务器用于提供防火墙的公共IP,如果在防火墙中配置,则STUN绑定请求(SBR)将不会响应,因为没有配置防火墙的外部服务器。

3.在STUN服务器的一个非常简单的级别工作是从源接收SBR并检查来自传输层的IP地址并返回相同的响应,并找到一个将打开以到达源的端口。

4.在同一个端口上进行后孔打孔,使用STUN绑定指示在整个会话期间打开。

Crux是不应该在防火墙内配置STUN或TURN的,因为这是没用的。

相关问题