2017-07-25 233 views
0

我想配置的如何在公司代理後面使用stun.l.google.com?

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

Mattermost使video calls用於測試目的,我的本地副本。一部分是:

[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

1.STUN和TURN兩臺服務器都在其各自的RFC定義可以設置只對公網IP

2.Stun服務器是用來給你的防火牆的公網IP,如果你在你的防火牆配置,您的STUN綁定請求(SBR)將不會產生響應,因爲您的防火牆沒有配置外部服務器。

3.在STUN服務器的一個非常表面的工作中,從源接收SBR並檢查來自傳輸層的IP地址並返回相同的響應,並找到一個將打開以便到達源的端口。

4.在同一個端口上完成後續穿孔,使其在整個會話期間使用STUN綁定指示打開。

癥結是一個不應該配置防火牆內的STUN或TURN,因爲這是沒有用的。

+0

謝謝,所以我想這個視頻通話功能或碼頭圖像是不可用的代理後面。 –

+0

任何呼叫(音頻/視頻)的一個更重要的信息取決於其協商的候選對。如果您想在您的網絡中撥打電話,則需要在您的環境中設置所有客戶端,在這種情況下,將選擇本地候選人並進行點對點呼叫可以建立。如果你想讓janus服務器介於兩者之間,那麼服務器已經安裝在你的網絡中.STUN和TURN只有在客戶端位於不同的NAT時纔有用。 –