mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
qBittorrent sent different PeerID on every port #14848
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#14848
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 @SeaHOH on GitHub (Jul 31, 2023).
qBittorrent & operating system versions
First at all, I am not a qBittorrent user now. Because newest version of qBittorrent always crash and made system down, my PC run on old Windows 7 and old hardware. (6.1.760x)
qBittorrent: 4.3 - 4.5 (actual observed)
What is the problem?
qBittorrent sent different PeerID on every port, even for same torrent, same network interface (IP).
This behavior is ABSOLUTELY NOT a feature, it is a BUG. It led peers connected to qBittorrent peer more than once (e.g. incoming and outgoing) in a same time, then qBittorrent peer disconnected the previous connection, that is very bad to unpopular torrents.
Steps to reproduce
Additional context
No response
Log(s) & preferences file(s)
No response
@stalkerok commented on GitHub (Jul 31, 2023):
If I understand you correctly, then you have different ports due to the fact that you do not have a dedicated external ip address, so your Internet provider will forward random ports at its discretion and change them.
You can also use the function "Allow multiple connections from the same IP address"
@SeaHOH commented on GitHub (Jul 31, 2023):
This issue is not about my network and Internet provider, it is qBittorrent's. I do not use qBittorrent, my Internet provider provides Global IP address for me.
Again, I do not use qBittorrent. Even I enabled the function, but others may not.
One more again, this issue is not about multiple connections, it is PeerID.
@glassez commented on GitHub (Jul 31, 2023):
@SeaHOH
Could you provide a screenshot of how does it look like in your Peer List?
@SeaHOH commented on GitHub (Jul 31, 2023):
Here are the screenshots (incoming and outgoing connections).
For qBittorrent.


For BitComet, it keeps the consistency even via different IP for same torrent.

Part situation of other clients: μTorrent has the same bug, Tixati and Transmission do not.
@stalkerok commented on GitHub (Aug 1, 2023):
I will just note that port 6881 is the default port for some devices.
https://www.google.com/search?q=port+6881+used+for
https://www.google.com/search?q=port+6881+bittorrent
@SeaHOH commented on GitHub (Aug 1, 2023):
I said "every port".
@glassez commented on GitHub (Aug 1, 2023):
Seems that libtorrent uses different peer id even for each peer connection for whatever reason.
I created #7479. You could participate there as an affected person.
@SeaHOH commented on GitHub (Aug 1, 2023):
@glassez Thanks very much! But I do not know what else to add to, I will keep quiet until someone mentions me.
@glassez commented on GitHub (Aug 1, 2023):
@SeaHOH
I meant that you could track that issue (e.g. subscribe to it).
@arvidn commented on GitHub (Aug 26, 2023):
I don't think this is a correct conclusion.
The mechanism that mitigates redundant connections is primarily based on having one connection per IP. I suspect that you enabled
allow_multiple_connections_per_ip. It's not recommended as the redundant connection logic is not as good. Perhaps you have a good reason.regarding the peed-id, I posted some more details here.
@SeaHOH commented on GitHub (Aug 26, 2023):
Ok, I will ask the devs to check.
@SeaHOH commented on GitHub (Sep 1, 2023):
@arvidn
In https://forum.tixati.com/support/7807 , the devs hasn't answered yet for now time. And, an user notaLamer commented some views, his English is better than me, please take a look at.
Notice:
This line is also occur, but in our issue it is a same IP.
@SeaHOH commented on GitHub (Sep 1, 2023):
I am not good at English, I will use simple words try to rearrange what has happened.
Torrent:
Torrent_TClient A:
IP_A_v4andIP_A_v6IP_A_v4:Port_AandIP_A_v6:Port_APeerID_Ato every connection onTorrent_TClient B (qBittorrent):
IP_B_v4andIP_B_v6IP_B_v4:Port_BandIP_B_v6:Port_BTorrent_TCase 1, same interface, different ports:
IP_A_v4:Port_A_out_1try connect toIP_B_v4:Port_B,sent
PeerID_Aand receivedPeerID_B_1,success connected,
sent/received some file data of
Torrent_T,then disconnected by some reasons.
IP_B_v4:Port_B_out_1try connect toIP_A_v4:Port_A,sent
PeerID_B_2and receivedPeerID_A,success connected,
sent/received some file data of
Torrent_T,keep connected.
IP_A_v4:Port_A_out_1try connect toIP_B_v4:Port_Bagain,sent
PeerID_Aand receivedPeerID_B_1,then disconnected by Client B side.
Or, success connected,
then previous connection has been disconnected by Client B side,
sent/received some file data of
Torrent_T,keep connected.
Case 2, different interfaces, different ports:
IP_A_v4:Port_A_out_1try connect toIP_B_v4:Port_B,sent
PeerID_Aand receivedPeerID_B_1,success connected,
sent/received some file data of
Torrent_T,keep connected.
IP_A_v6:Port_A_out_2try connect toIP_B_v6:Port_B,sent
PeerID_Aand receivedPeerID_B_3,then disconnected by Client B side.
Or, success connected,
then previous connection has been disconnected by Client B side,
sent/received some file data of
Torrent_T,keep connected.
IP_B_v6:Port_B_out_2try connect toIP_A_v6:Port_A,sent
PeerID_B_4and receivedPeerID_A,then disconnected by Client B side.
Or, success connected,
then previous connection has been disconnected by Client B side,
sent/received some file data of
Torrent_T,keep connected.
What is the conclusion?
Client A has saw 4 different peers, but Client B has saw only 1 peer whatever interfaces be used.
Other cases?
If there is a Client A2 running on the interfaces as same as Client A, what will happen?