-1

How would I utilize proxies in phantomJS? I have tried doing something like this:

--proxy 127.0.0.1:80

But I'm not sure if it's the right command or if it worked at all. Is this even the correct syntax? Thanks.

Aero
  • 117
  • 2
  • 8

2 Answers2

0

From the documentation:

  • --proxy=address:port specifies the proxy server to use (e.g. --proxy=192.168.1.42:8080).

  • --proxy-type=[http|socks5|none] specifies the type of the proxy server (default is http).

  • --proxy-auth specifies the authentication information for the proxy, e.g. --proxy-auth=username:password).

So yes, it appears you're using the right syntax.

Colin Ramsay
  • 16,086
  • 9
  • 52
  • 57
0

Note down following point when you're using phantomjs

arguments for phantomjs must be after command "phantomjs" not after script name. Correct variant:

phantomjs --proxy=127.0.0.1:80

this should work for you.

Viral Shah
  • 2,263
  • 5
  • 21
  • 36