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

allow_multiple_connections_per_ip - global or per torrent? Can you allow per torrent limit? #7641

Open
slrslr opened this issue Mar 1, 2024 · 2 comments

Comments

@slrslr
Copy link

slrslr commented Mar 1, 2024

Please provide the following information

libtorrent version (or branch): 2.0.9.0
platform/architecture: Debian
compiler and compiler version: ?

https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip does not mention if it is global or per torrent connection limit. If global, then can you please also allow per torrent limit? That should be set to 1 connection possibly.

Update: qBittorrent 4.6.2 AppImage on Linux (libtorrent 2.0.9.0) allows one host to download multiple torrents despite setting allow_multiple_connections_per_ip being disabled (unticked) and qBittorrent restarted. So if this is not a bug, it may be per torrent connection limit. Setting is described as a peers related, so likely it does not apply on trackers or any other connections, so i am unsure why the setting is marked as "It is not recommended to enable this feature."

@ukoz
Copy link

ukoz commented Mar 8, 2024

lt::settings_pack::connections_limit global
per torrent is in
lt::add_torrent_params structure

   int max_uploads  = -1;
   int max_connections  = -1;

then there
lt::settings_pack::active_downloads
lt::settings_pack::active_seeds

@arvidn
Copy link
Owner

arvidn commented Apr 19, 2024

@slrslr allow multiple connections per ip is not a limit, it's a switch to enable connecting to peers with the same IP address (but different ports). It's off by default because it's an effective countermeasure against certain kind of abuse.

It can not be set per torrent, because you can't know which torrent an incoming connection belongs to until after accepting it and handshaking.

But, it sounds like you might really be looking for the connection limits instead.

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