Skip to content

fix: hostname and proxy command generation #95

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

Merged
merged 7 commits into from
Apr 24, 2025
Merged

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented Apr 23, 2025

  • latest Coder versions won't accept the SSH connections if proxy command does not include the workspace owner name
  • for wildcard configuration the ssh config stays the same but the actual hostname provided to the Toolbox
    will include the workspace owner name

For wildcard config:

  • the ssh config hostname follows the coder-jetbrains-toolbox-dev.coder.com--* pattern
  • the proxy command will have a similar host prefix
  • the hostname provided to Toolbox follows the coder-jetbrains-toolbox-dev.coder.com--${ws.ownerName}--${ws.name}.${agent.name} pattern

For non wildcard config:

  • the ssh config hostname follows the coder-jetbrains-toolbox--${ws.ownerName}--${ws.name}.${agent.name}--dev.coder.com pattern

  • the proxy command will have the username and hostname in the ${ws.ownerName}/${ws.name}.${agent.name} format

  • the hostname provided to Toolbox follows the coder-jetbrains-toolbox-dev.coder.com--${ws.ownerName}--${ws.name}.${agent.name} pattern

  • resolves Content unavailable. Try to restart the connection. #94

fioan89 added 2 commits April 23, 2025 22:46
- proxy command is configured with the user
- latest Coder versions won't accept the SSH connection if proxy command does not include the workspace owner name
- for wildcard configuration the ssh config stays the same but the actual hostname provided to the Toolbox
  will include the workspace owner name
- resolves #94
@fioan89 fioan89 requested review from matifali and f0ssel April 23, 2025 22:23
fioan89 added 2 commits April 24, 2025 22:02
- Coder versions like 2.18.x and before that don't support the wildcard config.
  In this case, enabling this setting is ignored when generating the ssh config.
- however the hostname passed to the Toolbox ssh connection was not taking into
  account that some versions don't support wildcard config.
- this corner case is now covered by encapsulating the hostname resolving logic
  and taking into account the cli version.
@fioan89 fioan89 merged commit ccbb835 into main Apr 24, 2025
5 checks passed
@fioan89 fioan89 deleted the fix-proxy-command-issues branch April 24, 2025 19:17
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.

Content unavailable. Try to restart the connection.
3 participants