mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Don't merge trackers for private torrents #2419
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#2419
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @build-system on GitHub (May 1, 2015).
EDIT by @sledgehammer999: See final decision here: https://github.com/qbittorrent/qBittorrent/issues/2928#issuecomment-98186429
ORIGINAL POST FOLLOWS
Since version 2.2.0, qBittorrent checks whether the torrent you're adding is already on the list. If it is, then it automatically merges the trackers of both torrents under a single torrent. While this is a useful feature, there are situations where it is undesirable.
Many trackers keep download and upload statistics for every user. Torrents downloaded from these trackers come with only one tracker URL and often have the private flag set. The same content may be available on multiple trackers and the user can seed on all of them — a practice known as cross-seeding. However, when all trackers are using the exact same torrent file, qBittorrent will merge the trackers under a single torrent.
This is undesirable because the client will report upload and download statistics incorrectly. If you upload some gigabytes to a peer from one tracker, this will be announced to all trackers. From the tracker's point of view, the user is cheating ratio by pretending to upload data that wasn't actually uploaded and therefore in grave violation of the rules. This feature can thus result in the loss of an ill-advised user's account. People who are aware of this problem recommend the use of another client in order to work around the issue. It would be nice if they didn't have to resort to that.
A good way to avoid this problem is to simply ask the users whether they want to merge the torrents instead of making that decision for them. Another solution: don't merge torrents with the private flag set. Even an option buried deep under the
Advancedsection would be nice.@chrishirst commented on GitHub (May 1, 2015):
1/ The hash IDs need to be different for two two or more torrent to be treated as separate jobs, and if the payloads ARE identical, that is never going to happen.
2/ it is libtorrent that handles the identification and downloading of torrents, so this request should be put to them and implemented before qBitTorrent can even consider implementing something like this.it
@sledgehammer999 commented on GitHub (May 1, 2015):
The only viable option here is to not merge torrent for private trackers(and display an explicit message for that).
The infohash is used by qbt to identify the different torrents in the session. And I am not even sure if libtorrent supports the having the same torrent in the session, 2 times with different trackers.
You might be interested to make a suggestion in libtorrent-rasterbar's bugtracker, to have an option to somehow post different stats on each tracker for private torrents. (Based on from where it got it's peers) Or something like that.
PS: I am editing your title and message to reflect my decision.
@build-system commented on GitHub (May 1, 2015):
Indeed, it appears that this is the behavior of libtorrent:
I'm a bit curious, though. There are posts on the Internet which cite Deluge as a client which can properly cross-seed torrents. I have never used it so I'm not sure if that is accurate, but I know it is based on the same libtorrent as qBittorrent. I wonder if it got managed to get around the problem somehow.
This comes to mind:
Maybe this
uuidcan be modified before it is passed to libtorrent.@chrishirst, the torrents are exactly the same except for the trackers. I don't know why the private torrent's trackers aren't used as input for the hash function. This behavior is fine for public trackers, but they are critical in the case of private torrents.
@DoumanAsh commented on GitHub (May 2, 2015):
Ummm... to me it seems to be a bit crappy... Why would you need that? I understand that private trackers are shitty, but still...
Regardless, i think we can have dialogue for merging, no need for duplicate torrents.
And current behaviour of libtorrent is right. After all you're downloading exactly the same files... Isn't it strange to download/seed the same files separately?
@sledgehammer999 I would set title like "Allow user decision to merge trackers for private torrents"
Doubt that everyone would wish to just restrict it :)
@chrishirst commented on GitHub (May 2, 2015):
If anyone does need to peer the same payload to two separate 'private' trackers why not simply run two clients seeding from the same files?
Obviously you cannot download in the same way, but a good way to improve the enforced ratio on private trackers is to seed without downloading anything..
@build-system commented on GitHub (May 2, 2015):
@DoumanAsh, why this is needed is explained in this issue. It is hinted at in the private torrents bittorrent protocol extension I linked:
Not just private trackers, either. Any trackers which maintain user accounts. Even open signup ones.
The fact is merging the trackers of identical private torrents is going to cause the misreporting of these statistics. From the point of view of the tracker, this is indistinguishable from a ratio cheating program that is made to send fake statistics to it.
Pretty much all such trackers contain the warning in their rules: your torrent must have only this tracker's URL in it. If the torrent files themselves are otherwise identical, qBittorrent will not allow such a situation to occur and therefore cross-seeding of files is hampered. If you have two private torrents that are tracked by two different trackers, you must pick the one you want to seed — you cannot seed both in qBittorrent.
@chrishirst, I'm sure qBittorrent users like myself would rather simply run qBittorrent instead of having to install and run a second client and maintain a separate set of torrents. The waste of system resources and added cognitive load are not welcome.
Yes, it is a great way to improve ratio. It would be nice if we could take advantage of it by using qBittorrent.
@DoumanAsh commented on GitHub (May 2, 2015):
Well... i was just checking issues and when i saw "Don't merge trackers for private torrents" i was a bit surprised.
Anyway option would be fine, after all the speed is more important than some crappy statictic, but in my opinion: screw these private trackers :)
@chrishirst commented on GitHub (May 2, 2015):
Of course, but as it is unlikely to be possible within the constraints of the various protocol engines and/or clients that use the hash ID to communicate and transfer pieces/blocks with other peers, trackers, DHT , PeX, etc. there are few or no choices available.
@chrishirst commented on GitHub (May 2, 2015):
Just a thought while making a brew, ...
One way would be to launch an independent instance of a libtorrent session for the second private tracker.
@build-system commented on GitHub (May 3, 2015):
I have read the source code. Indeed, there are duplicate checks prior to adding torrents to the session; if a duplicate is discovered, the trackers and URL seeds are merged using the
QBtSession::mergeTorrentsmethod. At first I thought this could be modified to take private torrents into account but thesession::add_torrentfunction will also check for duplicates and return the existing handle should it find one.The way to work around that is via
add_torrent_params::uuid. When we find a duplicate torrent, we can ask the users whether they want to merge the torrents using a dialog. If they answer yes, we can simply modify theuuidand make the torrent unique again. I think this is the simplest solution for the time being and it should work whether libtorrent is patched or not.With that said, how do I get in touch with libtorrent developers? I see they have a bug tracker but this is not exactly a bug. I'd just like to ask them what they think of this issue.
@DoumanAsh commented on GitHub (May 3, 2015):
Either via mail-list or bug report on http://www.libtorrent.org/
@build-system commented on GitHub (May 3, 2015):
I posted a message to their mailing list requesting feedback on the solution I offered as well as asking if they could make any changes on their end.
@DoumanAsh commented on GitHub (May 3, 2015):
I would also suggest option to set this behaviour in configuration(i.e. always separate torrent handlers for private or all, or not)
Anyway i'm not really familiar with C++ code so i will leave this thinking to someone more experienced with qBt code
@build-system commented on GitHub (May 3, 2015):
I have been browsing the libtorrent repository and have tracked down the code which checks for duplicates within a session before adding torrents. It is in
src/session_impl.cpp, line 4630:So, it first tries to look for the torrent by the given
uuid. If it can't be found, it tries to look for it byurl.Later on, near the end of the same function we have:
m_uuidsis declared as:We can see that if the function is given either a non-empty
uuidor a non-emptyurl, these are used to identify the torrent. In case both are passed, theuuidis favored.At the beginning of the function, there are checks looking for
magnet:andfile://URLs, suggesting it refers to the URL that was used by the client to load the torrent and therefore a parameter that is often, if not always, passed.What all this means to me is that
uuidandurlare practically synonymous. Theuuidof the torrent is itsurl, unless anuuidwas explicitly passed by the client.With this knowledge, I can think of a very simple way to implement this:
uuidto the stringPoint
2 > iii > ais all that remains for consideration. One could use theurlparameter, followed by a space and an index number. Examples ofuuids as they would end up being stored by libtorrent:The first one was passed to libtorrent as an
url, the other ones were passed asuuids because they triggered the duplicate check and the user decided to add duplicate torrents.@sledgehammer999 commented on GitHub (May 5, 2015):
I think arvidn's response made it very clear that currently libtorrent cannot differentiate between torrents with the same hash but different trackers.
For anyone caring here is the mailing list thread: http://sourceforge.net/p/libtorrent/mailman/message/34078917/
@build-system commented on GitHub (May 5, 2015):
Indeed. After arvidn's explanation, I wonder if there's any client out there that can do it.
My suggested changes above were all based on an incomplete understanding of the problem and therefore incorrect. I'm closing this issue as there's nothing that can be done.
@DoumanAsh commented on GitHub (May 5, 2015):
No no, i think we should allow user's choice for whatever merge private torrent or not.
At least that will leave some freedom to user to decide how he wish do deal with such issue
@sledgehammer999 commented on GitHub (May 5, 2015):
Yes, the original problem can't be solved. But the problem described in the (edited) title can be remedied.
@build-system commented on GitHub (May 5, 2015):
By not merging trackers, you mean doing nothing?
Yeah, I guess that would be a clear improvement. Currently, qBittorrent merges the trackers and the user must immediately delete the tracker from the torrent's tracker list in order to avoid consequences. Not merging trackers for private torrents would make life easier.
@lamskoy commented on GitHub (Feb 12, 2016):
Would be awesome feature to see in qBittorrent!
Have to use uTorrent instead of qBittorrent coz last one has no such feature.
@lamskoy commented on GitHub (Feb 15, 2016):
Nice feature. But there's potential issue - torrent can belong to private tracker even if torrent is not marked as private.
Possible to change logic in this way?
If yes - merge trackers, no - don't to anything
@sledgehammer999 commented on GitHub (Feb 15, 2016):
Open new issue.
@lamskoy commented on GitHub (Feb 15, 2016):
Oh I created pull request already for this issue
@lamskoy commented on GitHub (Feb 15, 2016):
Added https://github.com/qbittorrent/qBittorrent/pull/4801
@dwarfdurin commented on GitHub (Mar 5, 2018):
Still forcing to not merge trackers even if the torrent is private isn't the right way,
I'd like to see settings option to change it to allow merging trackers for any torrent, no matter if its flagged private or not(private+private, non-private+private).
uTorrent has that and statistics are working well, still it would be better to leave it to user's decission about that behaviour.
Default action can be set as it says in that issue closing words that qBittorrent won't merge trackers for private flagged torrents, but a way to change it for user's desire is something many of us would welcome.