- Notifications
You must be signed in to change notification settings - Fork16
Description
Implement an enhancement making this extension aware of Coder Desktop. With Coder Desktop running, there is already an established tunnel to a workspace; thus, the extension does not need to create another tunnel.
The extension should prioritize the existing tunnel rather than creating a new one and should be able to display tunnel statistics related to the VPN within the editor.
Related:coder/vscode-coder#447
Oncecoder/internal#466 is closed, this work can begin.
The extension should:
- Check that the workspace belongs to the logged-in user. (Coder Connect only supports workspaces actually owned by the user.) If not, fallback to current behavior.
- Query
api/v2/deployment/ssh
to obtain theHostnameSuffix
. If not set, fallback. - Do a DNS lookup for an IPv6 address (AAAA record) for the workspace and agent as
<agent>.<workspace>.me.<suffix>
. If the DNS lookup fails (NXDOMAIN) or returns an addressnot in the prefix Coder Service Prefixfd60:627a:a42b::/48
, fallback. Checking the prefix ensures that captive DNS portals that return addresses for any query are not false positives. - If the DNS lookup was successful, this means Coder Connect is running, and the extension should connect to the workspace directly, rather than via the
coder
CLI, e.g. by directly initiating an SSH connection to<agent>.<workspace>.me.<suffix>
.
Metadata
Metadata
Assignees
Labels
No labels