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

UDP trackers do not work with SOCKS5 proxy when the proxy requires authentication #7838

Closed
KorayGocmen opened this issue Nov 22, 2017 · 26 comments
Labels
Network Issues related to network connectivity

Comments

@KorayGocmen
Copy link

qBittorrent version and Operating System

v3.3.13 MacOS High Sierra

What is the problem

When using SOCKS5 proxy server with username/password authentication UDP trackers indicate "Not working", when the SOCKS5 server does not require authentication, the UDP trackers start working.

What is the expected behavior

The UDP trackers should connect and start working when the SOCKS5 proxy requires authentication.

Steps to reproduce

Choose socks5 as the proxy to use, enable authentication, download a torrent with udp trackers. http trackers work however the udp ones do not.

Extra info(if any)

The problem is caused by the SOCKS5 client implementation. After running a socks5 proxy server with authentication required and connecting to it with my qbittorent, I have seen the following exchange:

qbittorent: 05 01 02 (indicating the auth method is username/password authentication)
SOCKS5 : 05 02 (accepting the username/password authentication)
qbittorent: 01 04 75 73 65 72 04 70 61 73 73 (auth subnegotiation with username="user", pass="pass")
SOCKS5 : 05 00 (Client authenticated)
qbittorent: 05 01 00 03 0f 63 6f 70 70 65 72 73 75 72 66 65 72 2e 74 6b 00 50 (sending a "socks5 connect request" instead of a "socks5 udp associate request")

When the socks5 does not require authentication, the udp trackers work fine and following exchange happens:

qbittorent: 05 01 00 (indicating the auth method is no auth)
SOCKS5 : 05 00 (accepting the no auth)
qbittorent: 05 03 00 01 00 00 00 00 00 00 (udp associate request)
.... working

@Balls0fSteel Balls0fSteel added the Network Issues related to network connectivity label Nov 24, 2017
@DaBomby
Copy link

DaBomby commented Nov 27, 2017

Similar to issue #7911 and issue #7825 and issue #7824 and issue #7734.

@calvilasboasjr
Copy link

@sledgehammer999

qb 4.0.2 still no connection when tracking is HTTPS and using proxy server.

@marc0nline
Copy link

Did this get addressed yet? I have the same issue as the poster.

@johnmatthewtennant
Copy link

Same issue

@yegors
Copy link

yegors commented Apr 9, 2018

Same issue here on Windows 7, 8 and 10. Please address it, as it doesn't happen with any other Torrent client I've tried (VUZE, uTorrent, Deluge).

@Cunningcory
Copy link

Same issue. Other sources suggest downgrading to 3.3.16 but that doesn't help.

@sledgehammer999
Copy link
Member

@yegors @Cunningcory do you use v4.0.4 and it fails?

@marc0nline
Copy link

@sledgehammer999

Yes it does, with every 4.0.? I've tried it has failed for me.

@sledgehammer999
Copy link
Member

@marc0nline just to be sure since this an old bug: Your problem is that you have a UDP SOCKS5 proxy that requires authentication and it doesn't work. Right?

@Cunningcory
Copy link

Cunningcory commented Apr 10, 2018

@sledgehammer999

Bug 1: When using a SOCKS5 proxy that requires authentication, torrents added hang on "downloading metadata" until qBittorrent is restarted, sometimes several times. This happens on pre-4.0 clients (like 3.3.16).

Bug 2: When using a SOCKS5 proxy that requires authentication, torrents added hang on "downloading metadata" even after qBittorrent is restarted several times. This happens on 4.0+ clients. When using 4.0.4 I have to remove the proxy to get the torrent working.

@sledgehammer999
Copy link
Member

I don't care about bug number 1 because that's an obsolete version.

The 2nd sounds like a libtorrent bug, which I'll need to forward.
Can you paste your log from when client is started, until you add the magnet?
Remove any log references to torrent names and hashes.
View->Log->Show

@sledgehammer999
Copy link
Member

Now that I think about it I have 2 more questions:

  1. Does your proxy provider support UDP connections through the proxy?
  2. If you add a .torrent file (not a magnet) does it work?

@marc0nline
Copy link

@sledgehammer999

  1. Yes. Torgurad anonymous proxy
  2. No, I use a few private trackers and they don't allow magnet torrents, but neither works.

@marc0nline
Copy link

@sledgehammer999

Sorry missed your first question. Yes it does work. Im using it now. if I upgrade and launch all the torrents look like they are starting up and then everything drops to "0" in the download column.

@sledgehammer999
Copy link
Member

No, I use a few private trackers and they don't allow magnet torrents, but neither works.

Can't you use a regular torrent via proxy? With a .torrent extension. Like a linux distro torrent.
For example here it is for Ubuntu: http://releases.ubuntu.com/17.10/ubuntu-17.10.1-desktop-amd64.iso.torrent

@yegors
Copy link

yegors commented Apr 10, 2018

The Ubuntu torrent has a HTTP tracker, which doesn't appear to be affected. This issue pertains to UDP based trackers (majority of them).

Try this instead:

magnet:?xt=urn:btih:0f9bde94c78cfb8a61627fdc82efe18460d570ee&dn=Kali+Linux+-+An+Ethical+Hacker%27s+Cookbook+-+End-to-end+penetrati&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969

@sledgehammer999
Copy link
Member

That's a magnet which also depends on UDP. I wanted to rule out magnet issues.

@Cunningcory
Copy link

Cunningcory commented Apr 11, 2018

@sledgehammer999

Updating my observations. 4.0.4 appears to be behaving just like 3.3.16 for me. When I clicked on magnet links to test initially, they worked. I left the client running and hours later it auto-fetched via RSS some other torrents which failed to work. I then re-clicked a magnet link that had worked earlier and it also failed to work. Finally, I manually downloaded the .torrent file of that same magnet link and tried to start the torrent from the file. This also didn't work, though its status is "Stalled" instead of "Downloading metadata" and does list the file size (whereas the magnet files stay at 0).

Restarting client first time did not fix. Restarting client a SECOND time fixed. When not working, all trackers are listed "Not working". After restarting twice, two UDP trackers are now listed as working. Connection status remains offline.

Edit: Using PIA Proxy.

4/10/2018 1:41 PM - qBittorrent v4.0.4 started
4/10/2018 9:25 PM - 'Unsuccessful torrent 3' added to download list.
4/10/2018 9:24 PM - 'Unsuccessful torrent 3' was removed from the transfer list.
4/10/2018 9:23 PM - Tracker 'udp://*' was added to torrent 'Unsuccessful torrent 3'
4/10/2018 9:23 PM - Tracker 'udp://
' was added to torrent 'Unsuccessful torrent 3'
4/10/2018 9:22 PM - 'Unsuccessful torrent 3' added to download list.
4/10/2018 9:07 PM - 'Unsuccessful torrent 2' added to download list.
4/10/2018 8:13 PM - 'Unsuccessful torrent 1' added to download list.
4/10/2018 1:48 PM - 'Successful torrent 2' was removed from the transfer list and hard disk.
4/10/2018 1:48 PM - 'Successful torrent 1' was removed from the transfer list and hard disk.
4/10/2018 1:47 PM - 'Successful torrent 2' added to download list.
4/10/2018 1:43 PM - External IP: **********
4/10/2018 1:43 PM - 'Successful torrent 1' added to download list.
4/10/2018 1:41 PM - qBittorrent is successfully listening on interface 0.0.0.0 port: UDP/53681
4/10/2018 1:41 PM - Options were saved successfully.
4/10/2018 1:41 PM - Web UI: Now listening on IP: *, port: 9091
4/10/2018 1:41 PM - GeoIP database loaded. Type: GeoLite2-Country. Build time: Tue Apr 3 18:40:13 2018.
4/10/2018 1:41 PM - Embedded Tracker [OFF]
4/10/2018 1:41 PM - Encryption support [ON]
4/10/2018 1:41 PM - Anonymous mode [ON]
4/10/2018 1:41 PM - PeX support [ON]
4/10/2018 1:41 PM - Local Peer Discovery support [OFF]
4/10/2018 1:41 PM - DHT support [OFF]
4/10/2018 1:41 PM - HTTP User-Agent is 'qBittorrent/4.0.4'
4/10/2018 1:41 PM - Peer ID: -qB4040-
4/10/2018 1:41 PM - qBittorrent is trying to listen on any interface port: 53681

@marc0nline
Copy link

@sledgehammer999

Ok I reinstalled 4.0.4 and restarted several time as instructed. The torrents do start to download as you say in your post. The only issue I still see that doesn't clear with restarting is the Connection Status is "OFFLINE". I restarted cpu and restarted Qbit again and it still states "OFFLINE" even though the torrents are indeed downloading and seeding.

@Cunningcory
Copy link

I can report the issue still persists with v4.1.0. So far it has happened once. I hard reset the client through task manager and the torrent was able to connect.

@sledgehammer999
Copy link
Member

#7734 (comment)

@LAP87
Copy link

LAP87 commented Dec 17, 2019

This is a problem for me currently on latest qbittorrent, socks5 proxy from nordvpn, requires auth and UDP trackers doesn't work.

@galacticboy2009
Copy link

This is a problem for me currently on latest qbittorrent, socks5 proxy from nordvpn, requires auth and UDP trackers doesn't work.

Same here. Found this thread because I've been trying to find a solution.
I'm on the latest 4.2.1 image from Linux.io running in a virtualization program called Docker.

I'm only getting peers from DHT/PEX/LSD and trackers which operate on HTTP.
I've not found any UDP trackers which connect at all.

@calvilasboasjr
Copy link

When I used QBittorrent Version 3.3.16 + Socks5 proxy + Nordvpn = Show on EXECUTION LOG TAB:
External IP: x.x.x.x
where "x.x.x.x" is the vpn proxy, of course,
and all connections IS MADE

When I used QBittorrent Version 4.2.0 + Socks5 proxy + Nordvpn = Show on EXECUTION LOG TAB:
External IP: 0.0.0.0
and NO connections is made.
NO DOWNLOAD, NOTHING.

The same settings was made for both version 3.3.16 and 4.2.0.

@sledgehammer999
Copy link
Member

Do you even realize that this a closed issue?

@LAP87 @galacticboy2009 see issue ##11735

@galacticboy2009
Copy link

Do you even realize that this a closed issue?

Yes, but only after writing the comment did I notice.

This was the first comment/post I ever made on GitHub, I'm new, and I haven't read any sort of FAQ or guide as to the rules, so it's my own fault.

I'm just looking for help on running a torrent client with VPN on my Synology NAS, and I feel like I've nearly exhausted every option for making that happen.

However, this was definitely the wrong place to look, as it's probably a different version of Qbittorrent, and it's definitely running on a different host operating system. But, it's the same problem I've been having, so I was hoping a solution would be here anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Network Issues related to network connectivity
Projects
None yet
Development

No branches or pull requests