</>PackageGraphPackageGraph

proxy-from-env

npmv2.1.0

Offers 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

15 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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.

javascriptFull 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';
Example truncated — see the full README.

proxy-from-env vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
proxy-from-envthis page02MIT5 months ago
path-key244.9M1MIT1 day ago
https-proxy-agent225.1M10MIT1 day ago
proxy-addr72.2M1MIT1 day ago
loose-envify65M2MIT1 day ago
socks51.6M2MIT1 day ago

Dependencies

Declared by proxy-from-env v2.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Used by

Popular packages that depend on proxy-from-env.

Relationship graph

Dependencies (left) and dependents (right) of proxy-from-env.

axiosproxy-agentproxy-from-env
proxy-from-env dependencies dependents

Frequently installed together

Release history

2 releases in the last two years, typically about 241 days apart.

Recent versions of proxy-from-env
VersionPublishedSizeLicense
2.1.0latest5 months ago15 KBMIT
2.0.07 months ago30 KBMIT
1.1.06 years ago29 KBMIT
1.0.09 years agoMIT
0.1.110 years agoMIT
0.1.010 years agoMIT
0.0.110 years agoMIT

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

Keywords

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.