Skip to content

Commit

Permalink
feat(portforwarding): custom port forwarding down command
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Nov 10, 2024
1 parent cdfe294 commit faf3e07
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup/advanced/vpn-port-forwarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ The forwarded port can be accessed:
- through the file written at `/tmp/gluetun/forwarded_port` (will be deprecated in v4.0.0 release)
- by running a user specified command upon port forwarding starting (see below)

## Custom port forwarding up command
## Custom port forwarding up/down command

A command can be set with `VPN_PORT_FORWARDING_UP_COMMAND`. For example `VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c "echo {{PORTS}}"`.
A command can be set with:

- `VPN_PORT_FORWARDING_UP_COMMAND` to run when port forwarding has finished setting up
- `VPN_PORT_FORWARDING_DOWN_COMMAND` to run when port forwarding has finished tearing down

For example `VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c "echo {{PORTS}}"`.

Notes:

Expand Down

0 comments on commit faf3e07

Please sign in to comment.