没有端口转发可以做P2P吗?
我正在通过 IRC 制作一个简单的文件传输程序,当我阅读时,我看到 IRC 在共享文件时会在独立于服务器的两个用户之间创建直接连接(DCC,直接客户端连接)。搜索了一段时间后,我发现了这个: Direct Connect 和 高级直接连接。
这些页面都没有回答这个我无法摆脱的问题:在没有任何用户执行特殊端口转发的情况下,P2P 数据传输是否可能? 允许使用帮助建立连接的中间服务器(如 IRC 示例中所示)。数据传输本身必须独立于服务器。
I was making a simple file transfer program through IRC and when I was reading up I saw that IRC when sharing a file creates a direct connection between the two users independent of the server (DCC, Direct Client Connect). After searching a while I have found this: Direct Connect and Advanced Direct Connect.
None of these pages answer this question that I can't get out of my head: Is P2P data transfer possible without any user doing a special port-forward?
An intermediate server which helps set up the connection (as in the IRC examples) is allowed. The data transfer itself must be independent of the server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的 - 如果您可以让外部服务器为您转发连接请求,则可以使用所谓的打洞技术来建立直接连接。 这篇技术论文有更详细的解释。
请注意,这些不一定适用于所有 NAT - 但它们确实适用于相当多的NAT。
Yes - if you can get an external server to forward the connection request for you, there are so-called hole-punching techniques that can be used to set up a direct connection. This technical paper has a more detailed explanation.
Note that these do not necessarily work on all NATs - but they do work on quite a lot of them.
Practical JXTA II(可在 Scribd 上阅读)有一章解释了执行 NAT 遍历的技术。打洞是执行 NAT 穿越技术的一个子集。
Practical JXTA II (available for reading on Scribd) has a chapter explaining techniques to perform NAT traversal. Hole punching is a subset of techniques to perform NAT traversal.