All Deluge Downloads freeze (SOCKS5 Proxy??)

General support for problems installing or using Deluge
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by bengalih »

I've been having this issue for a couple of years now.
I dealt with it with 1.x versions eagerly awaiting a new release. While still no official 2.x installer for Windows, I've installed the unofficial packages and after a couple of months running I continue to have this issue.

Basically, what happens is every so often - could be daily, but usually about once a week (or twice at most) all of my torrents stop downloading.
This is true even of new torrents that get added. They just sit at 0% not making any connections.

The only way to resolve this is to restart my deluge service at which point the will almost immediately connect again.

While I have no proof, my best guess is that this is due to the SOCKS5 proxy. I believe that with the "force use of proxy" options that if the proxy might become unreachable even for a moment that Deluge never properly renegotiates back to begin downloads.
Again, this is just a guess, but so far no one has been able to provide any insight into my issue despite the fact it has persisted across multiple deluge builds and multiple ISPs.

Ideas?
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by bengalih »

I am resurrecting this thread because I have still not found a solution.
I'm currently on 2.1.1 and have recently rebuild from scratch my Deluge setup (although I did manually port over many of my existing settings).

I was dealing with this issue by having Windows automatically restart Deluge on a nightly basis. This had some issues, but seemed to mostly minimize the impact of dealing with this. When I rebuilt a few weeks ago with 2.1.1 I disabled this restart, hoping that both the upgrade and fresh build would make this unnecessary.

However, I have come back to my client on multiple occasions to see torrents that were added and in the active state (i.e. not paused) just sitting there with no activity. I would then restart the Deluge service (I use a headless setup on my Windows Server using NSSM) and immediately upon startup these torrents would start downloding.

I really don't like the solution of restarting because other than being a band-aid, this seems like it can sometimes occur more than once daily.

Obviously most people aren't experiencing this or else there would be a lot more buzz, but I'm trying to figure out what it can be, and how I can troubleshoot this from Deluge's perspective to get some information that would help track down the root cause.

My Deluge runs on a 2016 Server that does not appear to be under any resource constraints and I don't have a firewall enabled.
As mentioned in the first post the only thing that might be out of the ordinary is my use of a SOCKS 5 proxy, but this is not something I can disable (for obvious reasons).

Any insight is appreciated.
User avatar
ambipro
Moderator
Moderator
Posts: 441
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by ambipro »

I'd recommend getting a more torrent compatible proxying system, personally.

Wireguard is generally considered to be the best option these days for ease and speed....socks5 has many limitations that make torrenting with it less than desirable.
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by bengalih »

Unfortunately there really isn't another workable solution given my current setup.
I have been using the SOCKS proxy for years now without issue. It seems to only impact my overall download speed a small amount.
There are simply not any reliable ways on Windows to ensure 100% that all your traffic from an individual app is going to be routed over a VPN connection. Most options just don't work and/or are unreliable. I say this with the consideration for my particular implementation. I don't have a single box dedicated to torrenting and without an investment in more hardware that might have the ability to control VPN routes more efficiently it just won't work.

I've tried a variety of options through several iterations of VPN providers and they always fail to limit non-encrypted traffic in all cases.
None of the software reliably does this.

I'm not confident that SOCKS proxy is the cause of my current issue. I started using it about 6-7 years ago, prior to that time it was not necessary for me to encrypt my torrenting connection. I don't believe that I had this issue that whole time - especially because my post here was from 2020, I believe I would have noticed and posted prior to this. Still, I don't rule it out as a possibility, but there is really no way for me to test this because I cannot run in a non-SOCKS configuration for more than a few minutes of testing and even then can only test against certain torrents.

I'd like to try to to narrow it down to see if we can blame SOCKS or not, but am not sure how to do so.
It is complicated by the randomness of the issue. The last time this happened was a couple of days ago there were 2 torrent that had been added and were just stuck at 0%. I restarted the deluge service and the kicked in immediately.

The next time I see the issue I am going to try to just pause and resume, or possibly remove and manually add the same torrent back.
I'm not sure if information on the level of connections and any problem they might have are recorded in any specific log that I can look to and determine what is going on.
User avatar
ambipro
Moderator
Moderator
Posts: 441
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by ambipro »

I hate to break it to you but using the default socks5 implementation in libtorrent (via Deluge's settings) will provide you with a less-than-desirable configuration for torrenting relative to more modern and capable alternatives with your own or a provider's implementation that supports port forwarding.

To name a few of the general issues...port forwarding (incoming) is not supported by any standard daemon/server I know of, and torrenting will be affected (almost all uploads outside of during your downloading ie seeding post download, as well as downloading in general in many cases will be impacted significantly) and more importantly, is capable of leaking your real IP.

Because of the inherent limitations with SOCKS and their implementations relative to torrenting, you're going to be in a position where the experience is usually degraded in some capacity at the very least - and if one of your main concerns is privacy, you're almost certainly not better off using SOCKS as a whole.

Split tunneling with a provider that supports Wireguard/OVPN is entirely possible on Windows...by the way. At the very least, in an objectively better and more secure form than what SOCKS is capable of providing you.

To each their own, though. Just figured I'd mention this.

I'm not sure why it was even included as an option in libtorrent.
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by bengalih »

Sorry for the delay, some of my email-forwarding was broken!

Can you provide a link to any instructions/tutorials that can reliably setup a Wireguard/OVPN configuration on Windows?
I have not found a single workable solution that will allow me to route *only* the Deluge client from my Windows system over a VPN AND ALSO ensure that a "kill-switch" is properly utilized if that VPN goes down?

The only solution that I could somewhat get to work was adding a second IP to my network adapter and binding deluge to that and then utilizing VPN rules on my router to route that IP through VPN.

However, my current VPN (Nord) doesn't support port forwarding over VPN, and my router is underpowered for this task (very low speeds due to VPN overhead). I have no need to upgrade my router apart from this, and I currently still have at least a year with my current VPN subscription. Based upon all of these factors SOCKS still seems my best solution and while I have occasionally seen slower speeds and sometimes there are connection issues, it has served me well for now. I can also verify that as far as protecting my privacy, the one time I was troubleshooting and forgot to turn my SOCKS back on I got 3 DCMA notices over the 2 weeks it was running without it. With it enabled, I've always been protected.
User avatar
ambipro
Moderator
Moderator
Posts: 441
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by ambipro »

https://www.google.com/search?q=split+t ... rd+windows

I see plenty of options. Do some digging.

While SOCKS might protect you from blatantly screaming your address, it is hardly secure relative to a _REAL_ VPN protocol like Wireguard. You also will not be able to seed anything, as I previously stated.

It sounds like you are using shitty public trackers, though. 3 DMCA notices in 2 weeks is insane. I've been doing what got you DMCA'd for almost 20 years and haven't received a single one.

No offense intended here, but if privacy is really something you value then using a better protocol, with port-forwarding and faster speeds would seem to be something you might consider worth losing out on the potentially 10s of dollars that you've given Nord for the remainder of your subscription.
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by bengalih »

Well I tried about a year ago to set this up, did plenty of digging at the time.
Found absolutely nothing that would work reliably work to meet the criteria:
- Startup and connect on windows boot/login
- Only route traffic from Deluge
- Perform proper kill-switch functionality if VPN is down.

Don't know if the issues were my VPN, VPN client(s), Deluge or what, but I couldn't find anything that would solve this with my current infrastructure. Sure if I set up new boxes, or containers, etc, etc, but my current environment is humming along smoothly and I'm not looking to uproot my whole ecosystem right now, nor invest heavily in additional systems. I could be convinced to abandon Nord if that is what was necessary, but at this point, I haven't gotten the other parts working to make the investment in a service that allows port forwards worth considering.

I'll hope someone else that has actually got it working in this configuration will chime in, because I don't really want to invest the time to run around in circles again only to discover another issue that makes the functionality worse than my current setup.

And yes, I use public trackers for most things. I was up until about 6-7 years ago on a business ISP line and didn't use any sort of VPN, etc and never had a single issue. When I moved states about 7 years ago and got a new ISP I got a DCMA notice in my first week or two and realized I needed to set something up, and went with SOCKS. It worked no issue for about 3 years until I started having these freezes that would require Deluge to be restarted frequently. Since the restart fixes it (at least for about a day), I expect something is problematic with Deluge/libtorrent implementation and not my SOCKS server. One time when I was testing and forgot to enable SOCKS again a whole season of a show dropped and I got separate DCMA notices for multiple episodes of the show. Apart from those 2 events I've also been doing this for 20+ years and have never had an issue.

(Also, as an aside, I use SOCKS on a private tracker and generally have no issues seeding over it)
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by bengalih »

Also, to note - another problem I had setting this up was sometimes the proprietary VPN software that was required.
In several cases I recall that the installation and use of the VPN software would often cause issues with the other adapters/virtual adapters in my system and cause other connectivity issues.
User avatar
ambipro
Moderator
Moderator
Posts: 441
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: All Deluge Downloads freeze (SOCKS5 Proxy??)

Post by ambipro »

bengalih wrote: Thu Apr 11, 2024 6:01 pm (Also, as an aside, I use SOCKS on a private tracker and generally have no issues seeding over it)
To each their own.

With socks, you will be "seeding" only when you connect to peers. This generally happens when you are actively downloading and have pieces those peers do not, and thus your already established connection is the avenue for this transfer (or "seeding") to occur.

Standard SOCKS4/5 proxies, especially those offered by VPN providers, cannot accept connections and route them appropriately.
Post Reply