Gathering detailed insights and metrics for proxy-agent
Gathering detailed insights and metrics for proxy-agent
Gathering detailed insights and metrics for proxy-agent
Gathering detailed insights and metrics for proxy-agent
https-proxy-agent
An HTTP(s) proxy `http.Agent` implementation for HTTPS
http-proxy-agent
An HTTP(s) proxy `http.Agent` implementation for HTTP
socks-proxy-agent
A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
pac-proxy-agent
A PAC file proxy `http.Agent` implementation for HTTP
npm install proxy-agent
Typescript
Module System
Min. Node Version
Node Version
NPM Version
68.1
Supply Chain
84.2
Quality
76.3
Maintenance
100
Vulnerability
99.6
License
pac-proxy-agent@7.2.0
Updated on Feb 18, 2025
agent-base@7.1.3
Updated on Dec 08, 2024
socks-proxy-agent@8.0.5
Updated on Dec 07, 2024
proxy-agent@6.5.0
Updated on Dec 07, 2024
pac-proxy-agent@7.1.0
Updated on Dec 07, 2024
https-proxy-agent@7.0.6
Updated on Dec 07, 2024
TypeScript (93.57%)
JavaScript (6.43%)
Total Downloads
1,696,196,126
Last Day
705,658
Last Week
12,168,397
Last Month
52,423,800
Last Year
524,525,512
1,060 Stars
298 Commits
258 Forks
19 Watchers
3 Branches
40 Contributors
Updated on Jul 01, 2025
Minified
Minified + Gzipped
Latest Version
6.5.0
Package Id
proxy-agent@6.5.0
Unpacked Size
24.09 kB
Size
6.10 kB
File Count
8
NPM Version
10.8.2
Node Version
20.18.1
Published on
Dec 07, 2024
Cumulative downloads
Total Downloads
Last Day
3.1%
705,658
Compared to previous day
Last Week
-6.5%
12,168,397
Compared to previous week
Last Month
2.1%
52,423,800
Compared to previous month
Last Year
38.5%
524,525,512
Compared to previous year
http.Agent
implementationsThis module provides an http.Agent
implementation which automatically uses
proxy servers based off of the various proxy-related environment variables
(HTTP_PROXY
, HTTPS_PROXY
and NO_PROXY
among others).
Which proxy is used for each HTTP request is determined by the
proxy-from-env
module, so
check its documentation for instructions on configuring your environment variables.
An LRU cache is used so that http.Agent
instances are transparently re-used for
subsequent HTTP requests to the same proxy server.
The currently implemented protocol mappings are listed in the table below:
Protocol | Proxy Agent for http requests | Proxy Agent for https requests | Example |
---|---|---|---|
http | http-proxy-agent | https-proxy-agent | http://proxy-server-over-tcp.com:3128 |
https | http-proxy-agent | https-proxy-agent | https://proxy-server-over-tls.com:3129 |
socks(v5) | socks-proxy-agent | socks-proxy-agent | socks://username:password@some-socks-proxy.com:9050 (username & password are optional) |
socks5 | socks-proxy-agent | socks-proxy-agent | socks5://username:password@some-socks-proxy.com:9050 (username & password are optional) |
socks4 | socks-proxy-agent | socks-proxy-agent | socks4://some-socks-proxy.com:9050 |
pac-* | pac-proxy-agent | pac-proxy-agent | pac+http://www.example.com/proxy.pac |
1import * as https from 'https'; 2import { ProxyAgent } from 'proxy-agent'; 3 4// The correct proxy `Agent` implementation to use will be determined 5// via the `http_proxy` / `https_proxy` / `no_proxy` / etc. env vars 6const agent = new ProxyAgent(); 7 8// The rest works just like any other normal HTTP request 9https.get('https://jsonip.com', { agent }, (res) => { 10 console.log(res.statusCode, res.headers); 11 res.pipe(process.stdout); 12});
Creates an http.Agent
instance which relies on the various proxy-related
environment variables. An LRU cache is used, so the same http.Agent
instance
will be returned if identical args are passed in.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 13/23 approved changesets -- score normalized to 5
Reason
9 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
license file not detected
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More