-
Notifications
You must be signed in to change notification settings - Fork 862
Refactor SSH prefix into a workspace suffix #16828
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
Comments
This change modifies the SSH hostname pattern to use a suffix-based approach instead of a prefix. It adds a new --ssh-hostname-suffix flag to replace the old --ssh-hostname-prefix, supporting domain-based hostnames like 'workspace.coder' instead of 'coder.workspace'. The changes: - Add HostnameSuffix field to SSHConfig and SSHConfigResponse structs - Deprecate the existing hostname prefix option - Implement suffix-based hostname parsing in SSH command - Update VPN DNS to use the hostname suffix - Use the suffix in tailnet/vpn for DNS configuration This refactoring is necessary to support one-click buttons for native applications in Coder Desktop, which requires a suffix-based approach for deep linking and native application launches. Fixes #16828
Are you planning to change the IDE plugins to use a suffix rather than a prefix? |
Hey @aaronlehmann 👋 , yes, we will update the plugins to use the suffix and make them aware of the existing Coder Desktop tunnel. Just a heads up, those changes will come in a later phase, so keep an eye on the parent issue (phase 1) for more info. |
Add support for base_image parameter to Docker template as per issue #16828. This allows specifying both the final container image and base image used for building. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Since this needs to be used by the UI, the extensions and the desktop apps, it will most likely need to be a server-side option for consistency |
Adds `hostname-suffix` flag to `coder ssh` command for use in SSH Config ProxyCommands. Also enforces that Coder server doesn't start the suffix with a dot. part of: #16828
Wires up `config-ssh` command to use a hostname suffix if configured. part of: #16828 e.g. `coder config-ssh --hostname-suffix spiketest` gives: ``` # ------------START-CODER----------- # This section is managed by coder. DO NOT EDIT. # # You should not hand-edit this section unless you are removing it, all # changes will be lost when running "coder config-ssh". # # Last config-ssh options: # :hostname-suffix=spiketest # Host coder.* *.spiketest ConnectTimeout=0 StrictHostKeyChecking=no UserKnownHostsFile=/dev/null LogLevel ERROR ProxyCommand /home/coder/repos/coder/build/coder_config_ssh --global-config /home/coder/.config/coderv2 ssh --stdio --ssh-host-prefix coder. --hostname-suffix spiketest %h # ------------END-CODER------------ ```
Adds the Hostname Suffix to `AgentConnectionInfo` --- the VPN provider will use it to control the suffix for DNS hostnames. part of: #16828
Use the hostname suffix to set DNS names as programmed into the DNS service and returned by the vpn `Tunnel`. part of: #16828
Use the hostname suffix to set the DNS match domain when creating a Tailnet as part of the vpn `Tunnel`. part of: #16828
Adds `IsCoderConnectRunning()` to the workspacesdk. This will support the `coder` CLI being able to use CoderConnect when it's running. part of #16828
relates to #16828 Changes SSH config so that suffixes only match if Coder Connect is not running / available. This means that we will use the existing Coder Connect tunnel if it is available, rather than creating a new tunnel via `coder ssh --stdio`.
fixes #16828 With all the recent changes, I believe it is now safe to change the Call to Action for `config-ssh` to use the hostname suffix rather than prefix if it was set.
To implement one-click buttons for native applications in Coder Desktop, we need to refactor how (SSH) hostnames are handled.
Currently, Coder uses a hostname prefix for SSH configuration, but this approach is incompatible with Coder Desktop which requires a suffix-based approach. This refactoring is necessary to enable seamless deep linking and native application launches.
Tasks include:
HostnameSuffix
, defaulting tocoder
)The text was updated successfully, but these errors were encountered: