proxy-from-env is a Node.js package that provides getProxyForUrl, a function that returns the appropriate proxy URL for a given target URL based on standard proxy environment variables like HTTP_PROXY and NO_PROXY (returning an empty string if no proxy applies). It is useful for making proxy-aware HTTP(S) requests in Node apps, so your code can decide whether to proxy and which proxy to use.
Project status
- The source appears maintained in the recent window, with new updates published in 2026 (v2.0.0 on 2026-02-09 and v2.1.0 on 2026-03-14), and the most recent update was about 6 months ago relative to 2026-09-03.
- Update cadence looks recent but not fast, roughly monthly between v2.0.0 and v2.1.0, with a major gap before that (earlier update was v1.1.0 in 2020).
AI summary generated
Recent updates
v2.1.0
v2.1.0 is presented as functionally identical to v2.0.0, with the key claimed change being broader support for older Node.js versions down to Node 10. The code diff shows packaging and module-format changes alongside new Node-version CI coverage, which may affect how consumers resolve the package entrypoint.
Featuresv2.0.0
v2.0.0 modernizes proxy-from-env by switching from `url.parse` to the WHATWG `URL` constructor and by switching the package from CommonJS to ESM. It also removes support for `npm_config_*` proxy and `npm_config_no_proxy` style environment variables, restoring the earlier behavior.
Breakingv1.1.0
This release adds functionality to fetch proxy configuration from NPM when available. This may improve how proxy settings are discovered and applied during setup without manual configuration.
Features