This may be a silly question but I was googling a lot last days and I've just found related but not a direct answer to this. In order to express it better let me mention a comparison:
这可能是一个愚蠢的问题,但我上次搜索了很多,我刚刚找到相关但不直接的答案。为了更好地表达它,让我提一下比较:
If I setup an http server in a computer behind a router , I must set port forwarding and also that computer must have an static internal IP address in order to receive the requests on that port for that particular IP address. For instance, my router does not allow port forwarding so I could not set it up for the HTTP server. However , Bittorent works like a charm behind that same router without any static IP , nothing. How bittorrent can get requests and it can also seed? How other peers will connect to my computer while seeding? I did verify that when Bittorrent is running the port it uses for example 39031, is actually open ( using yougetsignal_dot_com). How the router can be made to open the port without using its admin settings ( we can also use Bitorrent in a public hot spot where is no way to mess with the router). I know the trackers may do some help, but there are a lot of information about a decentralized way with no trackers or basically that the peers are also trackers but not details on how it works.
如果我在路由器后面的计算机中设置http服务器,我必须设置端口转发,并且该计算机必须具有静态内部IP地址,以便在该端口上接收该特定IP地址的请求。例如,我的路由器不允许端口转发,因此我无法为HTTP服务器设置它。然而,Bittorent就像一个没有任何静态IP的同一个路由器背后的魅力,什么都没有。 bittorrent如何获得请求,它也可以播种?播种时其他同伴如何连接到我的电脑?我确实验证了当Bittorrent运行它使用的端口(例如39031)时,实际上是打开的(使用yougetsignal_dot_com)。如何在不使用管理员设置的情况下使路由器打开端口(我们也可以在公共热点使用Bitorrent,无法弄乱路由器)。我知道跟踪器可能会提供一些帮助,但是有很多关于分散方式的信息没有跟踪器,或者基本上同行也是跟踪器,但没有关于它如何工作的细节。
Finally, why this "trick" (if any) cannot be used with an HTTP server and we must always depend on the router settings ?
最后,为什么这个“技巧”(如果有的话)不能用于HTTP服务器,我们必须始终依赖于路由器设置?
1 个解决方案
#1
BitTorrent does work behind NAT, to a certain extent. It works better if port forwarding is configured, though.
在某种程度上,BitTorrent确实在NAT之后工作。但是,如果配置了端口转发,它的效果会更好。
BitTorrent works reasonably well behind NAT for the following reasons:
由于以下原因,BitTorrent在NAT之后工作得相当好:
- BitTorrent is peer-to-peer, and either peer can initiate a connection; therefore, communication will succeed if either of two peers is not behind NAT or properly port forwarded;
- some BitTorrent clients are able to automatically set up port forwardings using uPNP or PMP;
- modern BitTorrent clients use µTP instead of TCP, and some clients are able to perform UDP hole punching.
BitTorrent是点对点的,任何一个对等体都可以发起连接;因此,如果两个对等体中的任何一个不在NAT之后或正确端口转发,则通信将成功;
一些BitTorrent客户端能够使用uPNP或PMP自动设置端口转发;
现代BitTorrent客户端使用μTP而不是TCP,一些客户端能够执行UDP打孔。
#1
BitTorrent does work behind NAT, to a certain extent. It works better if port forwarding is configured, though.
在某种程度上,BitTorrent确实在NAT之后工作。但是,如果配置了端口转发,它的效果会更好。
BitTorrent works reasonably well behind NAT for the following reasons:
由于以下原因,BitTorrent在NAT之后工作得相当好:
- BitTorrent is peer-to-peer, and either peer can initiate a connection; therefore, communication will succeed if either of two peers is not behind NAT or properly port forwarded;
- some BitTorrent clients are able to automatically set up port forwardings using uPNP or PMP;
- modern BitTorrent clients use µTP instead of TCP, and some clients are able to perform UDP hole punching.
BitTorrent是点对点的,任何一个对等体都可以发起连接;因此,如果两个对等体中的任何一个不在NAT之后或正确端口转发,则通信将成功;
一些BitTorrent客户端能够使用uPNP或PMP自动设置端口转发;
现代BitTorrent客户端使用μTP而不是TCP,一些客户端能够执行UDP打孔。