binhex / arch-delugevpn

Docker build script for Arch Linux base with Deluge, Privoxy and OpenVPN
GNU General Public License v3.0
690 stars 112 forks source link

Disabling Deluge Password and Password Prompt #100

Open issues-guy opened 5 years ago

issues-guy commented 5 years ago

I already run Deluge behind reverse proxy with authentication and have blanked out the default password and modify the webui such that it auto logs in without a prompt.

Here is the modification https://dukrat.net/124/deluge-webui-1-3-6-autologin-disable-password

Can there be an environment variable for the docker to perform these actions on boot if it is set to true?

-e DELUGE_AUTOLOGIN=<true|false>

Thanks for your consideration!

Fma965 commented 4 years ago

Am i right in thinking that this isn't easily tweaked as the docker container has the compiled version? can't seem to find these files on the docker container (1.X)

Ryonez commented 4 years ago

I'd also like this, I'm doing the same thing on my end.

binhex commented 4 years ago

The latest image is now including deluge v2, so the patch in the op is no longer valid.

ivanfilippov commented 4 years ago

I've submitted a PR for this feature, feel free to test it and provide feedback (using the image tag below) while the PR is reviewed: ivanfilippov/arch-delugepvn:webui-autologin

https://hub.docker.com/r/ivanfilippov/arch-delugepvn

Fma965 commented 4 years ago

I've submitted a PR for this feature, feel free to test it and provide feedback (using the image tag below) while the PR is reviewed: ivanfilippov/arch-delugepvn:webui-autologin

https://hub.docker.com/r/ivanfilippov/arch-delugepvn

This is great, any chance of a making a Deluge 1.X version.

ivanfilippov commented 4 years ago

I'm not super familiar with Arch, but since they've updated their repos to Deluge 2, I don't know if Deluge 1 would still be available for install (without extra effort in the install script) which would make building the image tougher.

I'm interested to know why you're holding off from upgrading to Deluge 2.0, if you don't mind sharing. 😄

Fma965 commented 4 years ago

Webapi egg doesn't work on 2.0 yet. If you go to binhex/arch-delugevpn:1.3.15_18_ge050905b2-1-04 you get 1.x so if you go to that tag on GitHub you also do. The pr would likely not be accepted but perhaps a fork would work?

ivanfilippov commented 4 years ago

Looks like the developer for the WebAPI egg doesn't have time to work on it at the moment, so I took a stab at it (https://github.com/idlesign/deluge-webapi/issues/14#issuecomment-507906530).

It works for me in both standalone deluge and in this docker image, and I've tested all four of the API endpoints the egg implements. Would you be able to try it out with the :latest tag of this image and give feedback? The egg is here.

I'm having issues getting plugins installed via WebUI (I think it's a deluge issue, but I'm still looking into it). If you can install it via that, go for it, otherwise to install it into the docker directly, exec into it, then:

rm -rf /config/plugins/WebAPI*
rm -rf /home/nobody/.cache/Python-Eggs/WebAPI*
curl -o /config/plugins/WebAPI-0.4.2-py3.7.egg https://github.com/ivanfilippov/deluge-webapi/blob/deluge2-fix/dist/WebAPI-0.4.2-py3.7.egg?raw=true

Then restart the container, log in to the WebUI and enable the WebAPI plugin via the Preferences menu.

Let me know how it goes!

ivanfilippov commented 4 years ago

@Fma965 I've submitted a PR to the WebAPI repo to add Deluge 2 support (feel free to get the egg from my forked repo until the PR is merged, just make sure to get the latest version, v0.4.3, from the repo instead of what I posted above). Would a 1.x version of this still be needed? I prefer not to maintain a separate fork. 😄

Fma965 commented 4 years ago

@ivanfilippov Great work, assuming the WebAPI changes actually work on Deluge 2.0 then there is no need for Deluge 1.X :) i will test it later or over the weekend.

ivanfilippov commented 4 years ago

Awesome, ignore my note above regarding the version number. The fixes are now merged into the WebAPI repo, grab the 0.4.0 release from https://github.com/idlesign/deluge-webapi/tree/master/dist.

Please let us know how the testing goes so we can close this issue.

Fma965 commented 4 years ago

So when i enable autologin and the plugin it doesn't work.

i can run it on a fresh config once, but once i restart it after it doesn't start again

___.   .__       .__                   

\_ |__ |__| ____ |  |__   ____ ___  ___

 | __ \|  |/    \|  |  \_/ __ \\  \/  /

 | \_\ \  |   |  \   Y  \  ___/ >    < 

 |___  /__|___|  /___|  /\___  >__/\_ \

     \/        \/     \/     \/      \/

   https://hub.docker.com/u/binhex/

2019-09-28 13:35:19.490327 [info] System information Linux 834355cc4c45 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux

2019-09-28 13:35:19.509992 [info] PUID defined as '1000'

2019-09-28 13:35:19.531606 [info] PGID defined as '1000'

2019-09-28 13:35:19.565786 [warn] UMASK not defined (via -e UMASK), defaulting to '000'

2019-09-28 13:35:19.584433 [info] Permissions already set for volume mappings

2019-09-28 13:35:19.604949 [info] DELUGE_AUTOLOGIN defined as 'yes'

2019-09-28 13:35:19.621239 [info] Patching deluge to disable login prompt

patching file deluge/ui/web/auth.py

Reversed (or previously applied) patch detected!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file deluge/ui/web/auth.py.rej

patching file deluge/ui/web/js/deluge-all-debug.js

Reversed (or previously applied) patch detected!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file deluge/ui/web/js/deluge-all-debug.js.rej
Fma965 commented 4 years ago

Actually it seems to work fine, just need to rebuild the container in portainer after adding the plugin for some reason

ivanfilippov commented 4 years ago

I haven't been able to replicate the above in my own setup. Based on your last comment is all good?

Fma965 commented 4 years ago

super late reply, but no the same thing still happened every time i restart the docker.

Fma965 commented 4 years ago

in fact now it doesn't start no matter how many times i restart.

Fma965 commented 4 years ago

fwiw i use portainer and when i make a edit to the config and restart it breaks, a normal restart i've not tried.

wbilger commented 4 years ago

So when i enable autologin and the plugin it doesn't work.

i can run it on a fresh config once, but once i restart it after it doesn't start again

___.   .__       .__                   

\_ |__ |__| ____ |  |__   ____ ___  ___

 | __ \|  |/    \|  |  \_/ __ \\  \/  /

 | \_\ \  |   |  \   Y  \  ___/ >    < 

 |___  /__|___|  /___|  /\___  >__/\_ \

     \/        \/     \/     \/      \/

   https://hub.docker.com/u/binhex/

2019-09-28 13:35:19.490327 [info] System information Linux 834355cc4c45 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux

2019-09-28 13:35:19.509992 [info] PUID defined as '1000'

2019-09-28 13:35:19.531606 [info] PGID defined as '1000'

2019-09-28 13:35:19.565786 [warn] UMASK not defined (via -e UMASK), defaulting to '000'

2019-09-28 13:35:19.584433 [info] Permissions already set for volume mappings

2019-09-28 13:35:19.604949 [info] DELUGE_AUTOLOGIN defined as 'yes'

2019-09-28 13:35:19.621239 [info] Patching deluge to disable login prompt

patching file deluge/ui/web/auth.py

Reversed (or previously applied) patch detected!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file deluge/ui/web/auth.py.rej

patching file deluge/ui/web/js/deluge-all-debug.js

Reversed (or previously applied) patch detected!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file deluge/ui/web/js/deluge-all-debug.js.rej

I get this same error, has there been a fix?

wbilger commented 4 years ago

I deleted everything and started over, and now I get this error;

2020-01-19 11:52:34.591125 [info] DELUGE_AUTOLOGIN defined as 'yes' 2020-01-19 11:52:34.660429 [info] Patching deluge to disable login prompt patch: **** Can't change to directory /usr/lib/python3.7/site-packages/ : No such file or directory

solipsist01 commented 4 years ago

Can the autologon fix also be applied on binhex/arch-deluge ?

staticlama commented 3 years ago

+1 to support this on binhex/arch-deluge would be great for unraid users.

Flute7 commented 3 years ago

Please add this support to binhex/arch-deluge, it would be awesome.

ivanfilippov commented 3 years ago

I'm working on adding this to the latest version of this image, the code is ready but there is a pre-requisite in @binhex scripts repository here: https://github.com/binhex/scripts/pull/4

arikdpc commented 2 years ago

very easy: just change password to blank password. then you only need to click enter to login.

eric-saintetienne commented 2 years ago

How is this work going on?

lsaadeh commented 1 year ago

@ivanfilippov did this ever come to life?

onionhammer commented 1 year ago

This seems like a pretty simple thing to do.. I wonder what the reasoning for not adding support is

dakky commented 10 months ago

+1