T
T
Trianid Trianid2017-03-01 15:51:46
System administration
Trianid Trianid, 2017-03-01 15:51:46

Why does PhantomJS work past proxies?

Hello!
I created the 1st bat file:

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0x00000001 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "<local>" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d %КАКОЙ-ТО ПРОКСИ СЕРВЕР% /f
netsh winhttp import proxy source=ie
start bat2.bat

and second:
phantomjs 8.js
exit

In the first file I set a proxy for Internet Explorer (checked) and set a system proxy (also checked). Traffic of all programs goes through these proxies.
But when the second file is called, the phantom (configured to render 2ip.ru) inside it goes directly, bypassing the proxy.
It is necessary that he also use a proxy server to access the Internet. Who can say anything about this?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Martyanov, 2017-03-01
@trianid

This can be said with a quote from the documentation:
--proxy=address:port specifies the proxy server to use (eg --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, eg --proxy-auth=username:password).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question