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

Allow setting of the local listener address #54

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from

Conversation

kernle32dll
Copy link

Issue #, if available:
#14 (slightly related)

Description of changes:

  1. What:
    This change introduces the ability to change the listener address, under which the port forwarding will listen. The default of localhost is kept.

  2. Why:
    I am using a PortForwardingSession, which runs inside a GitLab CI Service. This allows me to abstract the forwarding logic away, and have it re-usable. However, since the forwarding session is not running "locally" anymore, it needs to be accessible from outside the service. With a listener address of localhost, this is not possible. I am successfully using 0.0.0.0 akin to whats written in Accessing forwarded port from Docker container #14, and this works flawlessly.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@scavmartin
Copy link

scavmartin commented Jul 8, 2023

Please someone approve and merge. Please @Yangtao-Hua , @ziwangj ?

@ziwangj
Copy link
Contributor

ziwangj commented Jul 11, 2023

Thank you for the changes, we are under review and further discussion.

@kenkoooo
Copy link

kenkoooo commented Sep 1, 2023

Any update?

@bbankeAWS
Copy link

Thank you for the request! We evaluate new feature requests periodically based on our priority plans. We will provide an update when this request is picked up by the team.

@kenkoooo
Copy link

kenkoooo commented Sep 4, 2023

@bbankeAWS Thank you! Since this feature has already been implemented, as you can see in the 'Files changed' section above, I believe we don't need to discuss it extensively, and we can simply proceed with the code review.

@hown3d
Copy link

hown3d commented Jan 16, 2024

Friendly bump, this would benefit us a lot!

@jensenbox
Copy link

Sure would be nice to be able to run AWS SSM via docker - this is a blocker for that.

@alexjeen
Copy link

Please merge this PR, its a pain to use session manager in a Docker image right now.

@thiagomarafeli
Copy link

This feature is a must! It would be really great to see it working

@kenkoooo
Copy link

kenkoooo commented Sep 8, 2024

@bbankeAWS @ziwangj @Yangtao-Hua Hi, thank you for your review and the planning effort. Would you mind sharing what steps we can take to help make this feature available?

@rampageservices
Copy link

@Yangtao-Hua , @ziwangj. Please respond.

@jensenbox
Copy link

Closing in on 2 years for this one.

@kenkoooo
Copy link

@Yangtao-Hua @ziwangj Merry Christmas! How’s it going? Do you have any updates?

@TaxBusby
Copy link

This would be really useful for binding multiple connections to the same port on different loopback addresses. I would love to specify a localAddress parameter.

Our use case looks like forwarding to multiple HTTPS hosts at once, and using local DNS overrides to make them accessible via their original hostnames.

e.g.

127.0.1.1:443 website-a
127.0.1.2:443 webiste-b
127.0.1.3:443 api-c

Because of the harcoded localhost, our workaround is to run the SSM port forwarding inside docker, bridge the connection to another port inside docker via socat bound to 0.0.0.0, then use docker port mapping to expose these on the host machine.

With the small change of supporting arbitrary bind addresses, we could remove docker & socat from our flow and have a far simpler experience.

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

Successfully merging this pull request may close these issues.