-
-
Notifications
You must be signed in to change notification settings - Fork 511
feat(server): PUT /v1/portforward route to set ports forwarded
#2392
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
base: master
Are you sure you want to change the base?
feat(server): PUT /v1/portforward route to set ports forwarded
#2392
Conversation
qdm12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great, thanks for the PR 💯 !
I will wait to fix the iptables removals (to create less user frustration and duplicate issues) after v3.39.0 gets released, to merge this though.
|
(Sort of) blocked by #1785 |
|
Blocked by #2238 as well. |
|
Hello! |
|
@jagaimoworks By the way:
|
|
And @andy3469 I'm curious, what do you plan to use this PR for 😃? |
I plan to use it with https://github.com/dhruvinsh/ws-ephemeral as a way to update the port every week. |
e9aaa97 to
19a007f
Compare
|
@jagaimoworks All done 😉 I rebased your branch on the master branch, pushed a few commits to simplify and re-use the same setup and teardown code for both the normal service operation and this patch request. One last thing I would like to ask you (or @andy3469 ?), is to PR to https://github.com/qdm12/gluetun-wiki a section explaining how this works, why etc. in https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md and perhaps link that section in https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md as well 😉 |
I will do it this weekend if I have the time to read and understand the changes. |
|
Sorry for taking so long to respond. @qdm12 I think commit 19a007f broke something. Also, I assume that we still have to add our PUT route to the list of valid routes in the authentication code. Lastly, if @andy3469 hasn't done so already, I will gladly provide documentation on this features usage. Update: Here is the PR for the wiki: qdm12/gluetun-wiki#126 |
|
Any news on the PR ? |
|
This is also the final piece for me to use an custom VPN provider where the workflow is;
|
|
news on this? Would love to be able to set the port forwarding based on the ephemeral port from windscribe automatically |
|
@qdm12 @jagaimoworks thank you both for the efforts in getting us where we are on this feature. Do you think this is close to being reviewed and being merged? I understand there are many different issues and features being worked on, but it would be a shame for this to be held up for so long given that we're so close (unless there is some discussion of going in a completely different direction implementation wise). |
6637a70 to
8e9b17d
Compare
b72bc45 to
a6890dd
Compare
|
First of all my apologies everyone with the massive delay. Life got in the way (family, work, health etc.) and I've been halted on Gluetun work for a good part of 2025. But I should be back now 💪
Indeed, my apologies again, fixed in 539fdeb
Yes. Since this is a new route, no reason to have is not secured. Working on one last thing: moving |
19c29c5 to
de32cae
Compare
/v1/portforward route to set ports forwarded
|
Will merge this as soon as v3.41.0 is out |
First timer here. This is a somewhat working implementation of #2369. Hit me with the improvements I can take it 😅
I say somewhat working because the removal of ports from the firewall suffers from #2334 and therefore does not reliably work right now.
The way it works right now is by sending a http PUT request with a body like
{ports: [1234, 3456]}to/v1/openvpn/portforwarded.