mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
qBT announcing port as 1 to DHT even when "anonymous mode" is turned off #11887
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#11887
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 @showstoppre on GitHub (Mar 24, 2021).
Please provide the following information
qBittorrent version and Operating System
(4.3.3) Windows 10 and Ubuntu 18.04
If on linux, libtorrent-rasterbar and Qt version
(type here)
What is the problem
qBT is announcing port as 1 to DHT in addition to my actual external port. I can confirm that "anonymous mode" is turned off under Tools>Options>BitTorrent. Problem here is that most clients doesn't allow multiple connections to/from same IP(including qBT) by default. So when a remote client obtains peer list from DHT, it sees two peers for same ip (one with correct external port and other with port as '1'). Now there is only a 50% chance that it connects to my client correctly.
I tested using qBT as remote client. My observation is as below. qBT always tries connecting using uTP first then using TCP. It tries one peer for uTP and other for TCP and the first peer to connect is chosen randomly.
Situation #1 - Desired
Situation #2 - Undesired
What is the expected behavior
Only my actual external port should be announced to DHT.
Steps to reproduce
Can be observed using any torrents with DHT enabled in settings.
Extra info(if any)
@showstoppre commented on GitHub (Aug 10, 2021):
Closing issue.
Upon more investigation, I identified that the issue is caused by some bad nodes, capturing port as '1', when 'implied_port' argument is set.