qdm12 / gluetun

VPN client in a thin Docker container for multiple VPN providers, written in Go, and using OpenVPN or Wireguard, DNS over TLS, with a few proxy servers built-in.
https://hub.docker.com/r/qmcgaw/gluetun
MIT License
7.89k stars 366 forks source link

Feature request: Run command when tunnel comes up and when tunnel goes down #620

Open qdm12 opened 3 years ago

qdm12 commented 3 years ago

What's the feature? 🧐

Run a list of commands read from files:

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 🚀

frasderp commented 1 year ago

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?

Merrit commented 1 year ago

Is there any workaround known to run a script automatically?

realAbitbol commented 11 months ago

I'd love for this to be implemented

arsenicks commented 8 months ago

Same here, that would be awesome!

papykhader commented 2 months ago

Same here! :)