Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic/p2p-hole-punching/ #11

Open
utterances-bot opened this issue Oct 12, 2023 · 2 comments
Open

basic/p2p-hole-punching/ #11

utterances-bot opened this issue Oct 12, 2023 · 2 comments

Comments

@utterances-bot
Copy link

ICE 交互流程介绍 - WebRTC 学习指南

Learning WebRTC the Hard Way 👀

https://webrtc.mthli.com/basic/p2p-hole-punching/

Copy link

YonminMa commented Oct 12, 2023

请问上面描述的是端口受限圆锥型NAT的打洞流程吗?

@april19ccn
Copy link

请问上面描述的是端口受限圆锥型NAT的打洞流程吗?

翻阅了一些文章:
https://bford.info/pub/net/p2pnat/ (文中推荐的论文)
https://blog.jianchihu.net/webrtc-av-transport-basis-nat-traversal.html#toc-4
https://zhuanlan.zhihu.com/p/673445857

我认为:A <---> NAT(A) <-----> 中继服务器 <-----> NAT(B) <-------> B,是一个通用打洞流程,只是针对不同NAT实现方式不一样。

另外,在阅读本章的时候,我也好奇,如果A和B都是完全锥形NAT,那如果知道彼此的公网和内网IP不就可以点对点了么?
经过上述等资料了解后,我才知道NAT是不会主动建立映射,完全锥形也需要双方先自行打孔(建立NAT映射关系),不过映射如果建立了,就也不需要外部在提供什么,就可以直连了。(建立中继服务器也很容易实现完全锥形的NAT打洞)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants