小樱 发表于 2021/11/30 22:27

Linux libtorrent bt种子服务器有多个ip地址时,只直连接入了一个ip怎么允许多ip同时访问

Linux libtorrent bt种子服务器有多个ip地址时,只直连接入了一个ip怎么允许多ip同时访问

英文原版
peers
First of all, in order to allow many connections, set the global connection limit high, settings_pack::connections_limit. Also set the upload rate limit to infinite, settings_pack::upload_rate_limit, 0 means infinite.

When dealing with a large number of peers, it might be a good idea to have slightly stricter timeouts, to get rid of lingering connections as soon as possible.

There are a couple of relevant settings: settings_pack::request_timeout, settings_pack::peer_timeout and settings_pack::inactivity_timeout.

For seeds that are critical for a delivery system, you most likely want to allow multiple connections from the same IP. That way two people from behind the same NAT can use the service simultaneously. This is controlled by settings_pack::allow_multiple_connections_per_ip.

In order to always unchoke peers, turn off automatic unchoke by setting settings_pack::choking_algorithm to fixed_slot_choker and set the number of upload slots to a large number via settings_pack::unchoke_slots_limit, or use -1 (which means infinite).


文档翻译
同龄人
首先,为了允许多个连接,将全局连接限制设置为高,settings_pack::connections_limit。还将上传速率限制设置为无限,settings_pack::upload_rate_limit,0 表示无限。

在处理大量对等点时,设置稍微严格的超时可能是个好主意,以尽快摆脱挥之不去的连接。

有几个相关的设置:settings_pack::request_timeout、 settings_pack::peer_timeout和settings_pack::inactivity_timeout。

对于对交付系统至关重要的种子,您很可能希望允许来自同一 IP 的多个连接。这样,同一 NAT 后面的两个人就可以同时使用该服务。这由settings_pack::allow_multiple_connections_per_ip控制 。

为了始终取消对等方的阻塞,请通过将settings_pack::choking_algorithm 设置为 fixed_slot_choker来关闭自动并且启用固定值模式,并通过settings_pack::unchoke_slots_limit将上传槽的数量设置为大量,或使用 -1(这意味着无限)。


如果要启用服务器多ip地址支持,可以得出,我们需要修改allow_multiple_connections_per_ip,默认值为0,我们修改成1即可

参考
https://www.libtorrent.org/tuning.html

页: [1]
查看完整版本: Linux libtorrent bt种子服务器有多个ip地址时,只直连接入了一个ip怎么允许多ip同时访问