Describe the bug
On Windows machines behind a corporate HTTP proxy, the extension fails to establish database connections even when HTTP_PROXY and HTTPS_PROXY environment variables are correctly set system-wide.
Steps to reproduce
- Set
HTTP_PROXY=http://proxy.corp.example.com:8080 and HTTPS_PROXY=http://proxy.corp.example.com:8080 as Windows system environment variables (or in the VS Code terminal session).
- Open VS Code on a machine where direct outbound TCP to port 3306 / 5432 / 6379 is blocked — all traffic must go through the corporate proxy.
- Create a new connection to a database accessible only via the proxy.
- Click "Test Connection" or attempt to connect.
Expected behavior
Extension picks up HTTP_PROXY / HTTPS_PROXY (and NO_PROXY) from the process environment, the same way Node.js https-proxy-agent / global-agent would, and routes connection attempts through the proxy.
Actual behavior
Connection attempt times out or is refused. The proxy env vars are silently ignored. Connections work only when the proxy is bypassed at the network level.
Environment
- OS: Windows 11 Enterprise (22H2 / 23H2)
- VS Code: 1.100+
- Extension: vscode-database-client (latest)
- Node.js proxy handling:
HTTP_PROXY env var is set but extension's underlying TCP driver does not pick it up
Notes
Node.js does not automatically respect HTTP_PROXY for raw TCP net.connect() calls — it only applies to http.request. DB drivers (mysql2, pg, ioredis) open raw sockets and need explicit proxy agent injection. A fix would be to detect HTTP_PROXY/HTTPS_PROXY at connection creation time and route through a SOCKS/HTTP tunnel (e.g. https-proxy-agent or socks-proxy-agent).
Describe the bug
On Windows machines behind a corporate HTTP proxy, the extension fails to establish database connections even when
HTTP_PROXYandHTTPS_PROXYenvironment variables are correctly set system-wide.Steps to reproduce
HTTP_PROXY=http://proxy.corp.example.com:8080andHTTPS_PROXY=http://proxy.corp.example.com:8080as Windows system environment variables (or in the VS Code terminal session).Expected behavior
Extension picks up
HTTP_PROXY/HTTPS_PROXY(andNO_PROXY) from the process environment, the same way Node.jshttps-proxy-agent/global-agentwould, and routes connection attempts through the proxy.Actual behavior
Connection attempt times out or is refused. The proxy env vars are silently ignored. Connections work only when the proxy is bypassed at the network level.
Environment
HTTP_PROXYenv var is set but extension's underlying TCP driver does not pick it upNotes
Node.js does not automatically respect
HTTP_PROXYfor raw TCPnet.connect()calls — it only applies tohttp.request. DB drivers (mysql2, pg, ioredis) open raw sockets and need explicit proxy agent injection. A fix would be to detectHTTP_PROXY/HTTPS_PROXYat connection creation time and route through a SOCKS/HTTP tunnel (e.g.https-proxy-agentorsocks-proxy-agent).