deno
b111c710 - feat(ext/node): support NODE_USE_ENV_PROXY and http.setGlobalProxyFromEnv()

Commit
83 days ago
feat(ext/node): support NODE_USE_ENV_PROXY and http.setGlobalProxyFromEnv() Implements env-based proxy configuration for `node:http` and `node:https` Agent classes, matching Node.js behavior: - When `NODE_USE_ENV_PROXY=1` is set, the Agent reads `HTTP_PROXY`/`HTTPS_PROXY`/`ALL_PROXY`/`NO_PROXY` from the environment and routes requests through the proxy. - `http.setGlobalProxyFromEnv(config?)` programmatically enables the same behavior and returns a restore function. - Agent constructor accepts `proxyEnv` option for per-agent proxy configuration. - HTTPS requests through HTTP proxies use CONNECT tunneling. - Invalid proxy URLs throw `TypeError: Invalid URL` (matching Node). Enables 4 node_compat tests: - test-https-proxy-request-connection-refused.mjs - test-https-proxy-request-invalid-char-in-options.mjs - test-https-proxy-request-invalid-url.mjs - test-https-proxy-request-socket-keep-alive.mjs
Author
Parents
Loading