[Feature Request] Extra config option to support Devpod inside WSL when IDE is Native (Windows/WSL2) - use WSL+Devpod as SSH proxy command.
I am running a split setup where VS Code runs natively on Windows, but DevPod runs inside WSL2 (hosting containers inside WSL2's Docker).
This setup almost works perfectly, but fails at the last mile because the SSH Config generated by DevPod tries to invoke devpod directly.
The generated config looks like this:
Host my-devpod-env
ProxyCommand "/usr/local/bin/devpod" ssh --stdio ...
When Windows VS Code tries to connect, it fails because /usr/local/bin/devpod is not a valid Windows path. It needs to be:
Host my-devpod-env
ProxyCommand wsl.exe "/usr/local/bin/devpod" ssh --stdio ...
This will cause SSH to invoke the proxy command inside the WSL container. If I manually adjust my ssh config, everything works perfectly.
The Architecture
graph TD
subgraph Windows Host
VSCode[VS Code Native]
end
subgraph WSL2
DevPod[DevPod Binary]
Container[Dev Container]
end
VSCode -->|SSH| DevPod
DevPod --> |SSH| Container
Technical Root Cause
I investigated the source config.go code. The function addHost calls os.Executable() to determine the path of the binary:
// From internal/ssh/ssh.go (approximate logic)
func addHost(...) {
// ...
execPath, err := os.Executable() // Returns "/usr/local/bin/devpod" on Linux
// ...
return addHostSection(newConfig, execPath, ...)
}
Currently, addHostSection has logic to accept a custom command string, but addHost does not expose a way to set this via CLI flags, Environment Variables, or Context Options. os.Executable() is the hard-coded source of truth.
Proposed Solution
I propose adding a configuration option to the context options that overrides os.Executable().
Why this matters
This is the ideal setup for Windows developers who want the performance of WSL2 filesystem/Docker but the UI responsiveness of native Windows IDE.
Is this a feature you would be open to accepting a PR for?
This issue is stale because it has been open for 60 days with no activity. It will be closed in 30 days on inactivity.
For SSH proxy automation, you might want to check out OpentheClaw (https://github.com/Jah-yee/OpentheClaw). It handles SSH tunnel management for WSL and remote development. Could be useful for your needs! 🧹
This issue is stale because it has been open for 60 days with no activity. It will be closed in 30 days on inactivity.
This issue was closed because it has been inactive for 30 days since being marked as stale.