为什么WebRTC需要ICE协议来运行? [英] Why does WebRTC needs ICE protocol to operate?

查看:101
本文介绍了为什么WebRTC需要ICE协议来运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,ICE 协议用于发现从最终用户设备到外部"的节点/设备.

As far as I understand, ICE protocol is used for discovering the nodes/devices from the end-user device to "the outside".

我不明白为什么需要它.包路由不是路由器和交换机等网络设备的责任吗?他们应该找到从网关到最终用户设备的最短路径(实际上,路由器会记住他们之前发现的那些路由).

I don't understand why it's needed. Isn't packet-routing is the responsibility of network devices like routers and switches? They should find the shortest path from the gateway to the end-user device (Actually, routers remembers those routes they previously discovered).

此外,NAT 协议用于将内部 ip"转换为外部 ip",反之亦然.

Moreover, NAT protocol is used to convert from an "internal ip" to "external ip" and vice-versa.

再说一遍,
为什么其他用户需要熟悉我的内部网络设置?

So again,
Why does the other user needs to be familiar with my internal network setup?

推荐答案

防火墙.它们通常配置为将来自万维网的任何未经请求的流量反弹给您.他们只批准您发起与服务器的联系,然后才允许向您回传,仅此而已.除非你的朋友都拥有静态 IP(很少有人能证明这一点),否则这是一个不利于点对点通信的环境.

Firewalls. They're typically configured to bounce any unsolicited traffic from the world wide web to you. They only approve of you initiating contact with a server, which only then is allowed to back-traffic to you, and that's pretty much it. Unless your friends all own static IPs (which few people can justify) this is a hostile environment for peer to peer communication.

ICE 试图解决这个问题,通过枚举可能到达另一端的地址和端口,并尝试连接到这些地址,通过在两端发起出站请求,或者如果所有其他方法都失败,则回退到通过TURN 服务器(如果已指定).

ICE tries to solve this, by enumerating addresses and ports at which the other side may be reached, and trying to connect to these addresses, by initiating outbound requests on both ends, or if all else fails, falling back to communicating through a TURN server, if specified.

请参阅这篇WebRTCHacks 文章,了解有关该问题的更多信息.

See this WebRTCHacks article for more on the problem.

为什么其他用户需要熟悉我的内部网络设置?

Why does the other user needs to be familiar with my internal network setup?

因为其他用户有时在您的内部网络上.例如局域网游戏.

Because the other user is sometimes on your internal network. e.g. LAN games.

这篇关于为什么WebRTC需要ICE协议来运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆