Update for ProtonVPN update-port.sh#345
Conversation
Removed multiple attempts per loop, as they are unnecessary, since it can just retry the attempt on the next loop. This makes the code a bit less complicated.
Disabled exiting on errors to allow the script to keep running even if commands fail
Removed echo_debug function
Added functionality for firewall
Renamed port variables to be clearer to understand
Replaced test with brackets
|
@BigRedBrent i tested your script from BigRedBrent:patch-3 and tested manually using latest image and it doesn't work: |
|
I was unable to get the firewall to work also, but I was returning the functionality as it was originally there before my first edit that I made, in the hopes that someone will figure out a way to repair it. The other modifications I made to this commit seem to work pretty well with the firewall disabled. Much better than my first edit did. |
|
ok, well we should try and fix this since breaking ufw (forcing users to have is disabled) is one of the main features of the project. I'll try and take a look maybe tomorrow |
|
I'm pretty sure it wasn't working before either, so it probably would be a good idea to merge this so that the fix can be done with these changes that are very useful. I haven't had any issues with the script since I've made these changes, other than the functionality that never originally worked anyway needing to be fixed. |
|
Also, as long as a kill switch has been set, I see no reason for port blocking. Has a kill switch been enabled in this docker container? If a kill switch hasn't been added, I used AI to whip this up: /scripts/transmission-pre-start.sh |
Added a simple initialization echo message
Latest image does not have natpmpc installed by default. Added script to automatically attempt to install natpmpc if it is not already installed.
|
Just as an FYI, I recently switched to gluetun + transmission as an alternative to Haugene. I've been using Haugene for years (4-5?) but have to say that the gluetun stack works much better for me. With proton, the port forwarding works immediately. If you're not set on Haugene I just want to let you know it exists. But if you need an AIO solution, then Haugene is the way to go. |
Added install_package function to install and update packages as necessary.
|
@oregonpillow |
not so much packages, but docker images. I'm using
I hope nobody from this project is offended that i post this here, they are just different projects that approach it from different angles. Gluetun is not specific to transmission, you can route any container through it's vpn. For example, many people add their radarr, sonarr stack to it as well. |
|
I couldn't get gluetun + transmission to work. Perhaps it's because I'm using a custom QNAP network configuration. |
|
The changes seem to be working nicely, thanks. Two remarks:
I had to add "--dns ..." to not have the updating of the already installed packages end with a time-out after a long long wait for both packages and to have it actually open a port. Would this be something we can have the script check beforehand and notify when such a setting appears to be needed? Or would it be better to have this step included even before the update-port script is run? |
Now does a health check before starting the script and no longer updates already installed packages.
|
I updated the script so that it waits for the health check to pass, and no longer updates already installed packages. |
Added update-port: prefix to echo commands
added a tab to echo commands to make them visually easier to read
replaced echo command with log function
|
I've added additional checks to see if packages are available and install them if they are not. This file currently functions better than the current official release of this file. The current release has no additional functionality over this version, and so I suggest merging this version as soon as possible. |
|
Still does the job as it should. Thanks. |
Disabled exiting on errors to allow the script to keep running even if commands fail, so that it can retry after 45 seconds on the next loop. (I've let the script run for several days, and it looks like this has resolved the issue of it stopping prematurely.)
Returned functionality to allow and deny ports in the firewall as necessary.
Modified the bind_trans function to be less complicated. Removed multiple attempts per loop, because it can retry after 45 seconds on the next loop.
Will now double check to make sure the port has actually changed on the next 45 second loop. This seems to catch incorrect port changes, or at the very least does not switch to a very short lived port change.
Breaking change
Proposed change
Type of change
Additional information
fixes #relates to #https://...Checklist
If user exposed functionality or configuration variables are added/changed: