Command line not working #371

Closed
ccp999 opened this Issue Feb 2, 2013 · 7 comments

Comments

Projects
None yet
7 participants

ccp999 commented Feb 2, 2013

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

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
MacBook-Pro:~ ccp999$

Contributor

yawnt commented Feb 2, 2013

try with "--port 8000" instead of "--port=8000"

ccp999 commented Feb 2, 2013

I tired all combinations that I can think of:
--port 8000
-port=8000
port=8000
-port='8000' --port='8000'...etc
But all failed

You need to provide a target in order to get this working.

$ node-http-proxy --port 8080 --target example.com:80

ccp999 commented Feb 3, 2013

Thanks that!
Actually, I just want to setup a standalone forward proxy. Can I do it from command line?

mgcrea commented Feb 5, 2013

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.

indexzero closed this Feb 12, 2013

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 http-proxy@0.10.4 which should create a node-http-proxy in your path.

stutrek commented Jun 17, 2014

DaProxy is also a good solution. https://www.npmjs.org/package/daproxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment