NODE_USE_ENV_PROXY=1


稳定性: 1.1 - 处于活跃开发中

启用后,Node.js 在启动时会解析 HTTP_PROXYHTTPS_PROXYNO_PROXY 环境变量,并通过指定的代理路由请求。

🌐 When enabled, Node.js parses the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables during startup, and routes requests through the specified proxy.

仅在受信任且被授权用于部署的代理上使用此功能。代理支持是为了通过授权的代理服务器访问外部网络,例如当防火墙要求使用代理时。它不是用来隐藏流量或规避网络策略的。见 内置代理支持

🌐 Use this only with proxies that are trusted and authorized for the deployment. Proxy support is intended for reaching external networks through authorized proxy servers, for example when a firewall requires one. It is not for hiding traffic or evading network policy. See Built-in Proxy Support.

这也可以通过 --use-env-proxy 命令行标志来启用。当两者都设置时,--use-env-proxy 会优先。

🌐 This can also be enabled using the --use-env-proxy command-line flag. When both are set, --use-env-proxy takes precedence.