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

Show real proxy hostnames in VNet UI #41715

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Show real proxy hostnames in VNet UI #41715

wants to merge 24 commits into from

Conversation

ravicious
Copy link
Member

real-proxyhosts

As the support for leaf clusters and custom DNS zones has not landed just yet, for now we show what's supported which is proxy hostnames of root clusters.

I also removed the fake connections since recent VNet connections are not going to land in v16.0.

@ravicious ravicious added the no-changelog Indicates that a PR does not require a changelog entry label May 17, 2024
@ravicious ravicious requested a review from gzdunek May 17, 2024 15:11
@github-actions github-actions bot requested a review from ryanclark May 17, 2024 15:11
nklaassen and others added 17 commits May 21, 2024 11:05
This makes it easier to converting profileName + leafName combos into
URIs.
lib/teleterm cannot reuse this function due to different semantics
of contexts within an RPC vs a CLI command. It needs one
function that has request-response semantics and another that blocks
that can be run from a separate goroutine.
Without this extra select on ctx.Done, interrupting tsh vnet at that
moment would return an error about using a closed socket. That's because
when the context gets canceled, another goroutine closes the socket.

Instead, we should wait for either the cancelation of the context or
socket.AcceptUnix returning a value.

To test this, run `tsh vnet`. When the osascript prompt is shown, go
back to the terminal and Ctrl+C the command. The previous version would
show an error about using closed connection whereas this exits cleanly.
The previous version would show "context canceled" after sending SIGINT
to tsh vnet after the user entered the password in the prompt and  the
TUN device was set up.
If the socket file was removed, the admin subcommand stops. The previous
version of VNet would continue running. This version correctly
propagates the fact that the admin subcommand has quit prematurely with
no error and shuts down vnet.Manager as well.
Because of the changes from a couple of commits ago related to ignoring
context.Canceled errors, if the admin subcommand was killed or has
crashed, VNet would stop with no error message.

This commit fixes that and propagates the error from osascript.
@ravicious ravicious force-pushed the r7s/teleterm-vnet branch 2 times, most recently from c404d97 to e3284c8 Compare May 31, 2024 10:03
Base automatically changed from r7s/teleterm-vnet to master May 31, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v16 no-changelog Indicates that a PR does not require a changelog entry size/sm ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants