Registry / http-networking / http-proxy-cli

http-proxy-cli

JSON →
library2.1.0jsnpmunverified

A command-line proxy tool that wraps the http-proxy library to provide simple HTTP/HTTPS request forwarding. Current stable version 2.1.0. Development appears slow with few releases. Key differentiator: zero-config CLI for quick proxy setups with route mapping, header injection, and host header preservation. Unlike full-featured proxies like mitmproxy or nginx, this is a lightweight, single-binary style tool for development and testing.

npm install http-proxy-cli
INSTALL
IMPORT
SIG · HTTP-PROXY-CLI
H
http-proxy-cli
http-networkingjavascriptv2.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

http-proxy-cli (global command)
npm install -g http-proxy-cli && http-proxy --help
npm install http-proxy-cli (local) and using npx http-proxy or ./node_modules/.bin/http-proxy
Primarily used as a global CLI tool; running locally requires npx or full path.

Forwards all HTTP requests to a local server on port 3000. Use in a separate terminal while running a Node.js app.

http-proxy 3000
http-proxy-cli --version
Debug
Known issues
gotchaThe --proxyHost option sets the Host header to the proxy target, which may cause issues with virtual hosting.
fix
Use --header 'Host: ...' manually if needed.
affects: <=2.1.0
gotchaRoute matching is simple string prefix-based; order of routes matters. Later routes override earlier ones? Actually first match wins.
fix
Place more specific routes earlier.
affects: <=2.1.0
deprecatedThe http-proxy dependency is in maintenance mode; no new features.
fix
Consider alternatives like http-proxy-middleware or work with the underlying library directly.
affects: >=2.0.0
Errors
Common errors & fixes
http-proxy: Permission denied
Trying to bind to a port below 1024 without root/sudo.
fix
Use a port above 1024, e.g., http-proxy 8080
Error: listen EADDRINUSE :::8000
Port 8000 already in use by another process.
fix
Kill the conflicting process or use a different port with --port.
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies
http-proxyrequiredCore proxy library; used under the hood for all proxying logic
Agent activity
6 hits · last 30 days
node
6
Resources
http-proxy-cli — npm install http-proxy-cli · libregistry