Closed migol closed 3 months ago
Both first and second point you made are sound. I'm not sold tho on doing exec doas -u qbtUser /config/post-vpn-connect.sh
.
My rationale would be that the hook script should have same priviledges as other operations inside the container that prepare it for qBitTorrent startup (but not qBitTorrent itself) so if run as qbtUser this would limit ability to do operations on iptables for example.
Another thing is that using exec would essentially make script unable to interact with environment that already is there i.e. change PF_PORT variable to a different one for example. As far as I know, doing . SCRIPT
will cause it to not only have same env, but also all the changes to it would be reflected in latter portion of script.
qbtUser is part of the root group so should not limit access to iptables, although editing to iptables could cause qbittorrent to leek you actual IP.
With the second point i will need to do some more testing. The environment vars can be set when calling the docker and the internal vars from the entrypoint script should only read by a external script and not changed.
After a lot of testing, I think the script should have same privileges as the entrypoint script. This may make it more useful not only for operations on iptables but installing side applications like jackett or i2p etc or installing components so qBittorrent can run external program on torrent finished.
I will add some extra documentation after merging with a example script.
@migol do you still believe the script should be named post-vpn-connect.sh
or should it be post-connect.sh
or post-setup.sh
I would say it's still post-vpn-connect.sh
as this explains nearly exactly where it is being executed. post-connect.sh
could also be misunderstood as "After qBitTorrent connects to something" while post-setup.sh
doesn't say anything imho.
@Dalethium I thought I had enabled the issues tab and added a template , obviously not. This is now available for you to raise an issue.
I suspect this may be something to do with reverse proxy support in the web UI options. Are you able to access the web UI localy not via a proxy?
If you can raise a issue and post the last few lines of your docker logs. Also look at your config folder and in the data folder the qbittorrent.log may be of some insight to you.
It turns out the health check was failing, I haven't had time to figure out why yet but just having it ping the webui for health checks let me at least open the web panel using traefik. If I find out it's an issue outside just something wrong with my system I'll let you know! Also thanks for enabling the issues :)
From: j4ym0 @.> Sent: Thursday, August 22, 2024 6:20:28 AM To: j4ym0/pia-qbittorrent-docker @.> Cc: Daleth Darko @.>; Comment @.> Subject: Re: [j4ym0/pia-qbittorrent-docker] Added post-vpn-connect hook support (PR #13)
I thought I had enabled the issues tab and added a template , obviously not. This is now available for you to raise an issue.
I suspect this may be something to do with reverse proxy support in the web UI options. Are you able to access the web UI localy not via a proxy?
If you can raise a issue and post the last few lines of your docker logs. Also look at your config folder and in the data folder the qbittorrent.log may be of some insight to you.
From: Daleth Darko @.> Sent: Thursday, August 22, 2024 3:50:04 AM To: j4ym0/pia-qbittorrent-docker @.> Cc: j4ym0 @.>; Mention @.> Subject: Re: [j4ym0/pia-qbittorrent-docker] Added post-vpn-connect hook support (PR #13)
@j4ym0https://github.com/j4ym0 I can't find where to report issues on this repo, but if you have a place to report them, I'll report it there. However, at the moment, I had to rebuild 4.6.5 and use that as the web panel for QbitTorrent was no longer available to my traefik server.
This directly happened after updating to the latest version that you published. It didn't seem like the log indicated there were any problems. It said it posted It just wasn't able to access it via traefik
Please let me know if you need any more info or if I can help you with any of this somehow :)
— Reply to this email directly, view it on GitHubhttps://github.com/j4ym0/pia-qbittorrent-docker/pull/13#issuecomment-2303573050, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACDFZFRSXLGQ4XEFSUIQ7QLZSVGVZAVCNFSM6AAAAABMDZY56SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBTGU3TGMBVGA. You are receiving this because you were mentioned.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/j4ym0/pia-qbittorrent-docker/pull/13#issuecomment-2304303794, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFNOUOVME4THF527CHRTT53ZSW3OZAVCNFSM6AAAAABMDZY56SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBUGMYDGNZZGQ. You are receiving this because you commented.Message ID: @.***>
@Dalethium i have pushed a update to docker hub witch fixes the failing healthcheck
Simple change to support executing users script in between OpenVPN connection and qBitTorrent startup