qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.57k stars 4k forks source link

IPv6 connectivity issues #12211

Open kasper93 opened 4 years ago

kasper93 commented 4 years ago

Please provide the following information

qBittorrent version and Operating System

4.2.1 @ Windows 10. (10.0.1xxxx) Tested also with 8e553adc92c793cd9d0e6030fb91932ca3aca9ee and latest deps at the time.

What is the problem

IPv6 sort of works. I will share only high level observations as I did not debug it yet. I wanted to work on it last weekend, but didn't have time, so I figured to write it up so I don't forget.

BitTorrent will not connect to any IPv6 peers resulting in no transfer if IPv4 is not available

I tested with some IPv6 trackers and only listening on IPv6. I didn't get any connections. After enabling DHT it picked up some peers and worked fine.

Temporary/Privacy IPv6 handling

Currently qBittorrent listens and announces from all IPv6 addresses. While for IPv4 listing all addresses is reasonable. For IPv6 you can have situation that you have like 10 temporary addresses (aka. privacy) assigned to one interface. And it makes literally no sense to announce from all of them, dosing tracker... I know we can select specific address, but it is also suboptimal and default options should take this issue into account. Also form the privacy aspect, announcing form every IPv6 gives very nice mapping between our main and all temporary addresses to whoever is listening, not nice.

Without much thinking, here is possible solutions I see:

  1. Listen/announce only from not temporary addresses
  2. Listen/announce only from one temporary addresses, this would be nice for privacy to as, this is main purpose of temporary addresses. There was one more but I forgot...

Also another issue is that if you setup qBittorrent to listen only on IPv6 addresses it will not be able to announce to tracker that is available only on IPv4. I feel that two things are mixed up here. We should be able to announce to IPv4 server even if we want to connect only to IPv6 peers.

FranciscoPombal commented 4 years ago

@kasper93

4.2.1 @ Windows 10. Tested also with 8e553ad and latest deps at the time.

I assume this means the libtorrent version you used was 1.2.5 or a more recent commit of the RC_1_2 branch, right? Either way for these kinds of bugs, let's not focus on 4.2.1 anymore, there have been too many important changes since then. The qbittorrent master commit you tested is recent enough, though.

When you have time, please post your debugging findings and ping the libtorrent maintainer if needed. libtorrent also underwent a lot of changes to related network code recently, might still need some polish.

xavier2k6 commented 1 year ago

@kasper93 I can only presume that this is no longer relevant in 4.5.3 or am I wrong?

kasper93 commented 1 year ago

@kasper93 I can only presume that this is no longer relevant in 4.5.3 or am I wrong?

Has there been changes in this area? I'm still using the version with my local workaround for the issue. But hasn't updated to latest version my tree.

luzpaz commented 2 months ago

@stalkerok is this similar at all to issues you've have run into recently ?

stalkerok commented 2 months ago

No, it's not a related issue.