P2P可以在没有端口转发的情况下完成吗? [英] Can P2P be done without port forwarding?

查看:154
本文介绍了P2P可以在没有端口转发的情况下完成吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当时正在通过IRC编写一个简单的文件传输程序,当我阅读时,我看到IRC在共享文件时在两个独立于服务器的用户之间建立了直接连接(DCC,直接客户端连接).经过一段时间的搜索,我发现了以下内容:直接连接

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.

这些页面中没有一个回答我无法摆脱的问题:在没有任何用户进行特殊端口转发的情况下,是否可以进行P2P数据传输? 允许使用中间服务器来帮助建立连接(如IRC示例中所示).数据传输本身必须独立于服务器.

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.

推荐答案

是的-如果您可以让外部服务器为您转发连接请求,则可以使用所谓的打孔技术来设置直接连接. 此技术论文有更详细的说明.

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.

请注意,这些不一定适用于所有 NAT,但它们确实适用于很多.

Note that these do not necessarily work on all NATs - but they do work on quite a lot of them.

这篇关于P2P可以在没有端口转发的情况下完成吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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