erickok / transdroid

Manage your torrents from your Android device
GNU General Public License v3.0
1.28k stars 201 forks source link

Custom headers for bypassing 2 factor auth #664

Open FredHaa opened 4 months ago

FredHaa commented 4 months ago

I run qBittorrent behind Authelia, and I have not found a way to use transdroid to connect to the server.

One way would be by sending a custom header with the requests a la LunaSea which would make it possible for my reverse proxy to detect this and then bypass Authelia.

Is a feature like that feasible to implement?

erickok commented 4 months ago

Indeed there is no way currently to set custom headers. I am not at all familiar with Authelia, but perhaps you could set up some app-specific basic auth? It's a but much to add (yet another) connection feature for such a usage-specific case.

FredHaa commented 4 months ago

I see that it wasn't really clear in the original issue, but this wouldn't be specific to Authelia, but rather Traefik or any reverse proxy which supports routing logic via custom headers, but I get it if it is too big a hassle.

I would use the custom headers to basically tell Traefik (or any other reverse proxy) to ignore the Authelia middleware.

ruifung commented 4 months ago

Or if you're using authentik, you can also send additional credentials via HTTP Basic auth (But you have to always send it since authentik won't sent a HTTP Basic challenge.)