Suwayomi / Tachidesk-Sorayomi

A free and open source manga reader app to read manga from a Tachidesk-Server instance.
https://suwayomi.github.io/Tachidesk-Sorayomi/
Mozilla Public License 2.0
817 stars 62 forks source link

Ability to specify custom headers for connecting to suwayomi server #302

Open milindpatel63 opened 5 months ago

milindpatel63 commented 5 months ago

Is your feature request related to a problem? Please describe.

I run a Suwayomi server in my homelab and expose it publically via Cloudflare and protect it via Cloudflare Access/Zero trust. But since there's cloudflare in front of it now, all the client apps can't connect to it directly. Instead, i have to use the browser.

There's a feature in Cloudflare Access called "Service Token", in which we can specify a service token via headers and use that to authenticate.

Describe the solution you'd like I want the ability to specify custom headers in addition to Server IP:PORT and basic auth. This would provide me a secure way to connect to a suwayomi server which is hosted publically.

Describe alternatives you've considered An alternative right now is to use a VPN like tailscale. But for that, i need to be connected to tailscale whenever i want to access my suwayomi which is not ideal.

Additional context Cloudflare Service token docs: https://developers.cloudflare.com/cloudflare-one/identity/service-tokens/

Basically i need to specify these 2 in header

CF-Access-Client-Id: <CLIENT_ID>

CF-Access-Client-Secret: <CLIENT_SECRET>

Like this,

curl -H "CF-Access-Client-Id: <CLIENT_ID>" -H "CF-Access-Client-Secret: <CLIENT_SECRET>" https://app.example.com

There are various other apps that does this exact same thing for the purpose of connecting to services exposed via cloudflare tunnel and access. Like Lunasea ( https://github.com/JagandeepBrar/lunasea ).