{"id":18433,"library":"http-proxy-cli","title":"http-proxy-cli","description":"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.","status":"active","version":"2.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/foss-haas/http-proxy-cli","tags":["javascript","proxy","http","cli"],"install":[{"cmd":"npm install http-proxy-cli","lang":"bash","label":"npm"},{"cmd":"yarn add http-proxy-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add http-proxy-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core proxy library; used under the hood for all proxying logic","package":"http-proxy","optional":false}],"imports":[{"note":"Primarily used as a global CLI tool; running locally requires npx or full path.","wrong":"npm install http-proxy-cli (local) and using npx http-proxy or ./node_modules/.bin/http-proxy","symbol":"http-proxy-cli (global command)","correct":"npm install -g http-proxy-cli && http-proxy --help"}],"quickstart":{"code":"http-proxy 3000","lang":"javascript","description":"Forwards all HTTP requests to a local server on port 3000. Use in a separate terminal while running a Node.js app."},"warnings":[{"fix":"Use --header 'Host: ...' manually if needed.","message":"The --proxyHost option sets the Host header to the proxy target, which may cause issues with virtual hosting.","severity":"gotcha","affected_versions":"<=2.1.0"},{"fix":"Place more specific routes earlier.","message":"Route matching is simple string prefix-based; order of routes matters. Later routes override earlier ones? Actually first match wins.","severity":"gotcha","affected_versions":"<=2.1.0"},{"fix":"Consider alternatives like http-proxy-middleware or work with the underlying library directly.","message":"The http-proxy dependency is in maintenance mode; no new features.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use a port above 1024, e.g., http-proxy 8080","cause":"Trying to bind to a port below 1024 without root/sudo.","error":"http-proxy: Permission denied"},{"fix":"Kill the conflicting process or use a different port with --port.","cause":"Port 8000 already in use by another process.","error":"Error: listen EADDRINUSE :::8000"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}