Skip to content

fix: add ProxyCommand support for SSH connections#6

Merged
lyx-tec merged 8 commits into
mainfrom
fix/ssh-connection
Jun 4, 2026
Merged

fix: add ProxyCommand support for SSH connections#6
lyx-tec merged 8 commits into
mainfrom
fix/ssh-connection

Conversation

@lyx-tec

@lyx-tec lyx-tec commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Closes #5

WaveTerm previously ignored the ProxyCommand directive in ~/.ssh/config, causing connections via SSH config Host entries with ProxyCommand to fail with "Disconnected from xxx".

This change:

  • Parses ProxyCommand from SSH config in findSshConfigKeywords
  • Executes the proxy command via os/exec with %h/%p/%r expansion
  • Wraps command stdin/stdout as net.Conn via net.Pipe()
  • Cleans up the subprocess on connection close via proxyCommandConn

Files Changed

  • pkg/wconfig/settingsconfig.go - Added SshProxyCommand *string field
  • pkg/remote/sshclient.go - Parsing, execution, and connection wrapping
  • frontend/types/gotypes.d.ts - TypeScript type definition

lyx-tec added 2 commits June 2, 2026 23:32
WaveTerm previously ignored the ProxyCommand directive in ~/.ssh/config,
causing connections via SSH config Host entries with ProxyCommand to fail
with 'Disconnected from xxx'.

This change:
- Parses ProxyCommand from SSH config in findSshConfigKeywords
- Executes the proxy command via os/exec with %h/%p/%r expansion
- Wraps command stdin/stdout as net.Conn via net.Pipe()
- Cleans up the subprocess on connection close via proxyCommandConn

Affects: pkg/wconfig/settingsconfig.go, pkg/remote/sshclient.go,
frontend/types/gotypes.d.ts
- Change 'providedInputRef' to 'searchInputRef' in search.tsx
- Add ssh:proxycommand to schema/connections.json
- Run go mod tidy
Comment thread ssh-test/main.go Fixed
lyx-tec added 6 commits June 4, 2026 09:00
When SSH config has ProxyCommand like 'ssh -W %h:%p jump-host',
parse and convert it to ProxyJump internally. Falls back to
subprocess-based execution for non-convertible ProxyCommands.
Remove expandProxyCommand, proxyCommandConn type, and ProxyCommand
execution from connectInternal. ProxyCommand is now solely handled
by parseProxyCommandAsJump conversion to ProxyJump.
@lyx-tec lyx-tec merged commit 6b6906a into main Jun 4, 2026
4 of 6 checks passed
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.

SSH hostname (with underscore) and ProxyCommand both fail

2 participants