ProxyHttpAgent (v1.0.1) is a factory for creating HTTP proxy agents supporting https→(http, https) and http→(http, https) tunneling, built on top of the node-tunnel module. It allows you to easily use proxies with http/https modules or node-fetch, with flexible proxy configuration via URL or object. Published as TypeScript-first with built-in type definitions, it exports `getProxyHttpAgent` along with `HttpsAgent` and `HttpAgent` types. Released in 2025, it is currently at stable v1. It differentiates by offering a simple API for creating agents that support both secure and insecure proxy connections with minimal boilerplate.
npm install proxy-http-agentNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creating a proxy agent with proxy URL from environment and using it with https.get.
Use `opts.agent = agent` after parsing URL, and delete any existing `port` to avoid conflicts.
Double-check package name in package.json.
Always include the protocol in the proxy URL, e.g., 'http://proxy.example.com:8080'.
Check proxy URL and network connectivity.
Use `import { getProxyHttpAgent } from 'proxy-http-agent'` instead of `import getProxyHttpAgent from 'proxy-http-agent'`.