boundary icon indicating copy to clipboard operation
boundary copied to clipboard

[Feature Request] Support user defined target port at runtime

Open yongzhang opened this issue 1 year ago • 3 comments
trafficstars

Is your feature request related to a problem? Please describe. I'm not sure if this feature is in place or not, but I didn't find it from the docs.

When creating a target, there's a default port (the target port, not proxy port), e.g. 1234 for a generic tcp target.

I want the worker connect to a different port when do boundary connect, something like

boundary connect -target-id=ttcp_123456789 -target-port=5678

This is very useful if the target address is a fixed one, but that target has many other services listening on it with dynamic ports.

Describe the solution you'd like

  • Add a new flag to boundary connect something like -target-port.
  • Add optional target port when clicking "connect" in the desktop client.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Explain any additional use-cases If there are any use-cases that would help us understand the use/need/value please share them as they can help us decide on acceptance and prioritization.

Additional context Add any other context or screenshots about the feature request here.

yongzhang avatar Feb 01 '24 07:02 yongzhang

Hey @yongzhang, thanks for using Boundary!

When using boundary connect, this should already be possible using the -listen-port flag documented here: https://developer.hashicorp.com/boundary/docs/commands/connect#listen-port.

Via the Desktop client, there isn't a way to set a user defined default listening port or address at session establishment time, but that's an interesting feature request that I can share with folks internally.

Hope this helps!

AdamBouhmad avatar Feb 03 '24 00:02 AdamBouhmad

Hey @yongzhang, thanks for using Boundary!

When using boundary connect, this should already be possible using the -listen-port flag documented here: https://developer.hashicorp.com/boundary/docs/commands/connect#listen-port.

Via the Desktop client, there isn't a way to set a user defined default listening port or address at session establishment time, but that's an interesting feature request that I can share with folks internally.

Hope this helps!

If I understand the doc correctly, -listen-port should be the port in local machine to proxy request right? This feature request is asking a port used by workers connecting to the target.

yongzhang avatar Feb 03 '24 05:02 yongzhang

@AdamBouhmad I found a very similar request: https://github.com/hashicorp/boundary/issues/2649

yongzhang avatar Feb 04 '24 01:02 yongzhang