gluetun
gluetun copied to clipboard
Feature request: Run command when tunnel comes up and when tunnel goes down
What's the feature? 🧐
Run a list of commands read from files:
-
/gluetun/vpn-start-commands.txt
-
/gluetun/vpn-stop-commands.txt
For example it could be:
/bin/sh -c "/shellscript.sh"
/bin/iptables -L
Note the absolute paths which are necessary (especially when later moving to an image without shell).
Optional extra information 🚀
- This is to replace shell scripts since the shell might disappear in a near future when moving to a
scratch
image. - The Go program would run the commands for you (instead of OpenVPN or Wireguard)
- When #588 is done, I will add documentation on how to bind mount binaries to run like
sh
if you want it.
Hi there, firstly thanks so much for your work on gluetun! Just wondering if there had been any progress on this, or if it can be solved in another way?
Is there any workaround known to run a script automatically?
I'd love for this to be implemented