Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Webhook call when forwarded port change #2351

Closed
antanilol opened this issue Jul 7, 2024 · 3 comments · Fixed by #2399
Closed

Feature request: Webhook call when forwarded port change #2351

antanilol opened this issue Jul 7, 2024 · 3 comments · Fixed by #2399

Comments

@antanilol
Copy link

What's the feature 🧐

I use gluetun with PIA and forwarding. I have seen many ways to read the forwarded port from gluetun (most of them using the fwd_port file, wich I read is being deprecated) but I think the best way would be gluetun that makes a web request by itself calling a user-configured webhook when the port is being changed and maybe at the start of gluetun too.
Making the web request entirely configurable with a template inside the docker compose file (or a separate config file) would be ideal.
I understand it can take some time to implement such a thing, so a simple GET or POST request with the forwarded port to a user-configurable endpoint it'd be nice too.

I found a program (written in Go) that implement this, if you want to take a look

Thank you for your work!

Extra information and references

No response

Copy link
Contributor

github-actions bot commented Jul 7, 2024

@qdm12 is more or less the only maintainer of this project and works on it in his free time.
Please:

Copy link
Contributor

Closed issues are NOT monitored, so commenting here is likely to be not seen.
If you think this is still unresolved and have more information to bring, please create another issue.

This is an automated comment setup because @qdm12 is the sole maintainer of this project
which became too popular to monitor issues closed.

@qdm12
Copy link
Owner

qdm12 commented Nov 10, 2024

You can now use VPN_PORT_FORWARDING_UP_COMMAND, see https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md#custom-port-forwarding-up-command
For example with wget which is built-in:

VPN_PORT_FORWARDING_UP_COMMAND=wget -O- --post-data='{"some data to post..."}' 'https://example.com:9000'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants