proxy-from-env
npmv2.1.0Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.
Safe to adopt
Yes — proxy-from-env scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 179 days ago. 2 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 179 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 15 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding proxy-from-env to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=10
- Module format
- ESM + CommonJS
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the proxy-from-env README.
import http from 'node:test';
import { getProxyForUrl } from 'proxy-from-env';
// ^ or: var getProxyForUrl = require('proxy-from-env').getProxyForUrl;
var some_url = 'http://example.com/something';
// // Example, if there is a proxy server at 10.0.0.1:1234, then setting the
// // http_proxy environment variable causes the request to go through a proxy.
// process.env.http_proxy = 'http://10.0.0.1:1234';
//
// // But if the host to be proxied is listed in NO_PROXY, then the request is
// // not proxied (but a direct request is made).
// process.env.no_proxy = 'example.com';
proxy-from-env vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| proxy-from-envthis page | 0 | 2 | MIT | 5 months ago |
| path-key | 244.9M | 1 | MIT | 1 day ago |
| https-proxy-agent | 225.1M | 10 | MIT | 1 day ago |
| proxy-addr | 72.2M | 1 | MIT | 1 day ago |
| loose-envify | 65M | 2 | MIT | 1 day ago |
| socks | 51.6M | 2 | MIT | 1 day ago |
Dependencies
Declared by proxy-from-env v2.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (1)
Used by
Popular packages that depend on proxy-from-env.
Relationship graph
Dependencies (left) and dependents (right) of proxy-from-env.
Frequently installed together
An HTTP(s) proxy `http.Agent` implementation for HTTPS
ECMAScript parser
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Node.js body parsing middleware
Fast, unopinionated, minimalist web framework
Next generation testing framework powered by Vite
HTTP and HTTPS modules that follow redirects.
Browser running for Vitest using playwright
A high-level API to automate web browsers
Browser running for Vitest
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
Release history
2 releases in the last two years, typically about 241 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.1.0latest | 5 months ago | 15 KB | MIT |
| 2.0.0 | 7 months ago | 30 KB | MIT |
| 1.1.0 | 6 years ago | 29 KB | MIT |
| 1.0.0 | 9 years ago | — | MIT |
| 0.1.1 | 10 years ago | — | MIT |
| 0.1.0 | 10 years ago | — | MIT |
| 0.0.1 | 10 years ago | — | MIT |
Overview
proxy-from-env is an npm package that offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables. It has 2 known dependents in the graph. The latest version is 2.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (1 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use proxy-from-env?
Yes — proxy-from-env scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 179 days ago. 2 releases in the last 2 years.
How do I install proxy-from-env?
Run `npm install proxy-from-env` to add proxy-from-env to your npm project.
What license is proxy-from-env released under?
proxy-from-env is distributed under the MIT license.
How popular is proxy-from-env?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on proxy-from-env.
Is proxy-from-env still maintained?
The most recent release of proxy-from-env (v2.1.0) was published 5 months ago.
Does proxy-from-env run install scripts?
No. proxy-from-env does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.