我从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