我從http://www.stunprotocol.org/下載了stun客戶端,並試圖通過命令stunclient --mode full stun.stunprotocol.org --verbosity 9找出NAT類型,並且我得到了下面的響應。關於nat類型分析
config.fBehaviorTest = true
config.fFilteringTest = true
config.timeoutSeconds = 0
config.uMaxAttempts = 0
config.addrServer = 52.86.10.164:3478
socketconfig.addrLocal = 0.0.0.0:0
Sending message to 52.86.10.164:3478
Got response (68 bytes) from 52.86.10.164:3478 on inter
Other address is 52.201.75.212:3479
Sending message to 52.201.75.212:3478
Got response (68 bytes) from 52.201.75.212:3478 on inte
Sending message to 52.201.75.212:3479
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Sending message to 52.201.75.212:3479
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Sending message to 52.86.10.164:3478
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Sending message to 52.86.10.164:3478
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Sending message to 52.86.10.164:3478
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Sending message to 52.86.10.164:3478
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Binding test: success
Local address: 10.64.60.58:58841
Mapped address: 125.19.34.60:24604
Behavior test: fail
Filtering test: success
Nat filtering: Address and Port Dependent Filtering
我在一家公司工作,因此出於安全考慮,NAT類型「地址和端口相關濾波」似乎是可行的。
但是作爲一個普遍的現象,在我看來,對於對等連接,大部分時間,NAT類型將是「地址和端口相關的過濾」,因此任何媒體通信都需要轉向服務器。
但是,在谷歌搜索webrtc,它顯示90%的點對點通信通過眩暈服務器本身建立(通過打孔等)。這意味着在這種情況下NAT類型完全支持建立連接。
專家對NAT類型分析有任何意見要考慮對等通信?
謝謝塞爾比。但是,如果「52.201.75.212」的偵察服務器能夠通過其端口「3479」響應,直到它聽到它爲止?如果其中一種網絡NAT類型是對稱網絡,而其他網絡NAT類型是端點獨立映射,那麼P2P連接仍然是可能的。這就是你的意思,「這並不意味着你不可能與另一個網絡上的對等設備進行通信,如果他具有更好的端點獨立映射NAT,那麼P2P連接仍然有可能成功」 .. –
STUN服務器始終在兩個端口(3478和3479)以及兩個IP地址上偵聽。由於對稱NAT(例如您的企業網絡)沒有可預測的端口映射,因此從STUN獲得的地址/端口是否可以與嘗試連接的對端的IP地址一起工作尚不確定。 Peer的NAT不僅必須是Endpoint Ind,而且過濾可能必須是「Address Dependent」或更好。 – selbie