GChristensen / torrent-add

GNU General Public License v3.0
13 stars 1 forks source link

cloudflare #14

Open Wyman42 opened 1 month ago

Wyman42 commented 1 month ago

I use a Zero Trust tunnel from Cloudflare to access my QbitTorrent web interface with a URL like: https://torrent.whatthefuck.com. I indicated this URL in the extension but it does not work. Are only local IP addresses recognized? or this is the HTTPS ?

Tanks for your job anyway ;)

GChristensen commented 1 month ago

Hi, it makes regular http requests to this page, so https should work. To debug I need to look at the extension console output. In Firefox it is possible to find it through the about:debugging link (in the This Firefox section). In chrome it should be in the extension management page in developer mode.

Wyman42 commented 1 month ago

the log: image

The port of my Web Qbittorent is not 8080, it is relevant ?

GChristensen commented 1 month ago

The error says that the request is unauthorized. The port is not relevant if it is specified in the URL. The most probable reason incorrect login and password. In such cases the addon shows a notification. It may be muted by the OS.

Wyman42 commented 1 month ago

the log: image

The port of my Web Qbittorent is not 8080 like usual but

Wyman42 commented 1 month ago

ID and password are OK, may be it's a "filter" by cloudflare, who block your application. image

Wyman42 commented 1 month ago

I'm making progress, I disabled my DNS blocker (NextDNS) from EDGE and I no longer have the authentication error. Cool, BUT torrents don't go into Qbittorrent. I'll see you later, it's time for a drink. Thank you for your answers.

Wyman42 commented 1 month ago

Without a DNS blocker I no longer have the authentication error BUT by indicating the local IP or the domain name of Qbittorrent, it does not receive the torrents. The console indicates 01

GChristensen commented 1 month ago

It seems that the torrent file returns 403 when being downloaded. In this case the extension should say that it can not download the torrent file. Most likely, this means that some authentication is required to download the torrent, and if the windows message is present, this is not extension error. In Firefox the authentication is automatically provided by the stored cookies during the request. Hasn't tested the extension in Edge...

Wyman42 commented 1 month ago

It's a private tracker but I'm well logged.. On the other hand, I just saw that each time I use the extension I have this in the console. image

GChristensen commented 1 month ago

This may be an Edge- or Chromium-specific problem. I'll test it on Edge.

Wyman42 commented 1 month ago

thanks... ;)

GChristensen commented 1 month ago

I've tested under Edge and was able to add a torrent from a site that requires authorization. If it is possible to add torrents from other sites, this case requires per-site debugging. Usually such things happen when site explicitly checks for the request referrer or origin. If this is the case, it is quite hard to fix it, especially under WebExtensions manifest v3.