Reputation: 532
I'm trying to get PhantomJS to use a system proxy, but it doesn't seem to be working.
require "selenium-webdriver"
driver = Selenium::WebDriver.for :phantomjs, :args => ["--ignore-ssl-errors=true", "--proxy-type=system"]
Upvotes: 0
Views: 147
Reputation: 61892
No, that is not possible. QtWebkit which is what PhantomJS is built upon is usually built with the -no-system-proxies
option (see the line "Use system proxies ..... no" in this example). Even if it would, PhantomJS doesn't have a switch where you can enable or disable this. There is a Qt bug report which shows that the bug was fixed in this year, which cannot be part of PhantomJS 2.0.0, because it is based on a Webkit version from last year.
You will need to read the proxy settings from your OS with the tools the language you're programming with is providing you. Then you will need to use the explicit methods of defining a proxy in PhantomJS.
Upvotes: 1