You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: propagate proxy settings to SSH environment (#1012)
VS Code's http.proxy setting lives only in config, so the spawned coder ssh
ProxyCommand never saw it and connected directly, ignoring the user's proxy.
Translate the proxy settings into HTTP_PROXY/HTTPS_PROXY/NO_PROXY and apply
them around the connection:
- Read http.proxy, coder.proxyBypass, and http.noProxy; map bypass to NO_PROXY
(preferring coder.proxyBypass over http.noProxy).
- Apply via both process.env (SSH spawned as a child, useLocalServer=true) and
the terminal env collection (SSH spawned in a terminal, useLocalServer=false),
since the mode isn't knowable up front.
- Restore the prior environment on disconnect via a disposable.
- Watch the proxy settings so changing them prompts for a reload.
Mutating the environment instead of the SSH config keeps credentialed proxy URLs
off disk. Standard proxy env vars are already inherited by both spawn modes, so
only the settings need translating.
Fixes#1010
0 commit comments