Ice-Lite 理解

It is not necessary to have a STUN server to get a webrtc peer connection between a full ICE implementation and an ICE lite implementation. This is because the ICE lite peer will use Peer Reflexive Candidates to get candidates for the full ICE peer behind a NAT.
在完整的ICE实现和ICE lite实现之间获得webrtc对等连接并不需要有STUN服务器。这是因为ICE lite 一方会根据Peer Reflexive Candidates去获得Full ICE peer一方的候选地址.

mattm, you only get reflexive candidate from a stun server. If your client is ICE-lite, then it generates only host candidates, if your client is full ice AND a stun server is provided, then that client is also generating srflx candidates and sending them to the other (possibly ice-lite) client. So the ice-lire client does not need to have access to a STUN server, but the full ice client needs. There is still a need for a STUN server in your solution.
mattm,你只能通过stun server 来获得reflexive candidate. 如果你的是 ICE-lite的客户端, 只会生成host 的候选者. 如果你的客户端是full ice并且提供了一个Stun server, 这时候客户端是可以提供 srflx 的候选者, 并且发送他们给对方(可以是一个ice lite 客户端.). 因此,ice-lite客户端不需要访问STUN服务器,但是完整的ice客户端需要。在您的解决方案中仍然需要一个STUN服务器。

You only get server reflexive candidates from a STUN server. When an ICE lite peer receives traffic during the course of connection checks, it can respond to the source address as visible to it on the incoming packet (the peer reflexive candidate). I have setup connections between a full ICE and ICE lite implementations behind separate NATs successfully without using a STUN server. I believe these were all standard conforming.
您只能从STUN服务器获得服务器自反候选。当一个ICE-lite对等端在连接检查过程中接收到流量时,它可以在传入的数据包上对源地址做出响应(对等端自反候选者)。我在独立的nat之后成功地在一个完整的ICE和ICE-lite实现之间建立了连接,而不使用STUN服务器。我相信这些都符合标准。

In ICE lite procedure, client doesn't gathers all the candidates but only the local host candidate. This is basically designed for end point which is behind public IP address, when a client is behind a public IP where there is no NAT, it can connect with any other candidate even if that other end is behind Symmetric NAT. ICE-Lite doesn't require STUN/TURN server. You can not achieve this using the SDP line as ICE-Lite procedure comes first before you get the candidates. So if you don't set STUN/TURN server then it will work as ICE-Lite (though its not formal way of having ICE-lite, ICE client should have the defined way to set ICE-Full or ICE-Lite) as now it will just gather the host candidates. But if your end point is behind some NAT and other end point is out of the network then it will not work. So better if you could determine if the client is behind public IP or not.

在ICE-lite过程中,客户端不收集所有候选对象,而只收集本地host候选对象。这基本上是为位于公共IP地址后面的端点而设计的,当一个客户端位于一个没有NAT的公共IP后面时,它可以与任何其他候选端连接,即使另一端在对称NAT之后。ICE-Lite 不需要STUN/TURN服务器。您无法使用SDP来实现这一点,因为ICE-Lite过程在您获得候选对象之前首先出现。因此,如果你不设置STUN/TURN服务器,那么它将作为ICE-Lite工作(尽管它不是正式的ICE-Lite方式,ICE客户端应该有定义的方式来设置ICE-Full或ICE-Lite),因为现在它只收集候选主机。但如果您的端点在某个NAT之后,而另一个端点在网络之外,则它将无法工作。如果你能确定客户机是否在公共IP后面,那就更好了。

上文翻译来自于

相对于FULL-ICE, ICE-LITE

  • 只收集host candidate地址,本质就是获取本地地址,所以时间将大大缩短
  • 不再进行连通测试。

ICE-LITE使用限制
更适用于客户端服务器的样子

  1. 客户端FULL-ICE
  2. 服务器ICE-LITE, 有明确的ip地址

流程如下:

  1. SDP协商
  2. ICE 候选地址确定,媒体服务器只收集host类型的地址
  3. ICE连通性测试,ite ice端(服务端)不主动进行连通性测试,由full ice端(客户端)发起
  4. 媒体流传输

posted on 2020-09-11 16:17  WillingCPP  阅读(2805)  评论(0编辑  收藏  举报

导航