Using phantomjs print proxy it used to access website

253 Views Asked by At

can someone point me in the right direction. Just need some documentation. I manually input a proxy, but I think it might be by passing it. I want to test my script to see if its actually going through my proxy with phantom. It looks like I successfully went through it, but still getting a few bug. Is there a way to print out the proxy its using in the command line?

2

There are 2 best solutions below

0
On BEST ANSWER

No. Nothing about this is documented and I see no indication of getting this information in the code.

As a workaround simply run Wireshark or tcpdump to capture the traffic and look into it to see where the requests go. It should be easy to see whether they go to the server or to the proxy server provided you know their IP addresses (or you can look into the dns query in Wireshark to see which IP address it is).

2
On

You can use phantomjs to hit "http://whatismyipaddress.com/" and check what ip it detects.