Skip to content

Commit ba708cb

Browse files
committed
Add WS & WSS proxy env vars, for clients who use those for websockets
1 parent 0298acd commit ba708cb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/interceptors/terminal/terminal-env-overrides.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,16 @@ export function getTerminalEnvVars(
7878
const binPath = joinPath(overridePath, BIN_OVERRIDE_DIR);
7979

8080
return {
81-
'http_proxy': proxyUrl,
81+
// The main env vars, which in theory should be used by most well-behaved clients:
8282
'HTTP_PROXY': proxyUrl,
83-
'https_proxy': proxyUrl,
8483
'HTTPS_PROXY': proxyUrl,
84+
// The same in lowercase, to fully cover even oddly behaved cases:
85+
'http_proxy': proxyUrl,
86+
'https_proxy': proxyUrl,
87+
// The same for WebSockets, as some clients treat these differently:
88+
'WS_PROXY': proxyUrl,
89+
'WSS_PROXY': proxyUrl,
90+
8591
// Used by global-agent to configure node.js HTTP(S) defaults
8692
'GLOBAL_AGENT_HTTP_PROXY': proxyUrl,
8793
// Used by some CGI engines to avoid 'httpoxy' vulnerability

0 commit comments

Comments
 (0)