Feature req: Add options file for gluetun so that you can customize the VPN providers settings #36
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I was really fed up with Private Internet Access always connecting me with Chile or Malaysia or some far away country. I also use jdownloader over this VPN and my.jdownloader.org was totally unusable over these slow far away VPNs.
I edited the docker file like this to archive my goal (solution at the end):
PIA uses SERVER_REGIONS, other VPNs use different variables. So I think a generic file that is included in the dockerfile would be best. But I really don't know what the best option is. You are the devs ;-)
Keep up the great work! Thanks!
changed the description
changed the description
@rogs I think we could probably add a step to
yams start
command that could read from a file, convert to a string, and export a variable that the docker-compose.yaml file could reference.This would keep the docker-compose file clean and allow people to easily modify the regions they connect to
This all assumes that VPN providers like Nord don't completely explode. I have Nord so I can test something like this when I get a chance
The easiest way to do this is to set
env_file: .env
instead ofenvironment:
in yourcompose.yaml
file and set all yours environment variables in a file named.env
This is frustratingly genius. I'm gonna test this out and then write up some documentation for it
I like this solution. Let us know how it goes @MasonStooksbury!
So, I was able to get this to work and didn't have any issues. Locked my regions to just Belgium, restarted YAMS several times, and only ever got a server in Belgium.
That being said, I have some thoughts.
I think for the sake of simplicity, it makes the most sense to leave the Gluetun setup how it is. Since this will work best for most users in my opinion.
That being said, because there are those that value being able to truly make this their own, I think it would be worthwhile to add a section to the documentation on how to augment Gluetun so that you can region lock it (or do whatever you wanna do). Either by adding the SERVER_REGIONS property to the docker-compose service directly, or by modding the whole thing to use a .env file Metin suggested.
Thoughts? @methbkts @rogs
Changing everything to use the
.env
file by default should be the way to go. Do you want to tackle this one or do you want me to do it on the hardlink-by-default PR that's coming soon ™️? I'm fine either way 👍Just a sidenote, if you are doing this we'll merge it after my PR (or even better, I'll base my PR on it).
@rogs I think it makes more sense to probably bundle it into the PR you're already working on. But if you'd rather me go ahead and do it now, I'd be happy to get that out today
No worries @MasonStooksbury! I can add it to the PR I have now 👍 Thank you for helping with the investigation!
No problem!
Would it make more sense to close this issue and make a new one for converting everything to use a .env file? Just to keep things clean and obvious?
Yes, that makes sense! I'm closing this issue, can you create the new one? Thanks!
Sorry, had to take care of something. Creating the new one now
mentioned in issue #37