I install the Node 0.8.18 with http-proxy 0.8.7 on Mac Lion and I tried with the following command but failed:
MacBook-Pro:~ ccp999$ node-http-proxy --port=8000
usage: node-http-proxy [options]
Starts a node-http-proxy server using the specified command-line options
--port PORT Port that the proxy server should run on
--host HOST Host that the proxy server should run on
--target HOST:PORT Location of the server the proxy will target
--config OUTFILE Location of the configuration file for the proxy server
--silent Silence the log output from the proxy server
-h, --help You're staring at it
try with "--port 8000" instead of "--port=8000"
I tired all combinations that I can think of:
But all failed
You need to provide a target in order to get this working.
$ node-http-proxy --port 8080 --target example.com:80
Actually, I just want to setup a standalone forward proxy. Can I do it from command line?
Same need here, the point is to have a forward proxy (that uses my machine hosts) configured on iOS devices for quick development testing. Using Charles.app for now.
For those looking for this repo's CLI, it seems to have been removed in 1.x.x. The last version that had the CLI was 0.10.4, so to install that, do a npm install -g email@example.com which should create a node-http-proxy in your path.
npm install -g firstname.lastname@example.org
DaProxy is also a good solution. https://www.npmjs.org/package/daproxy