How do I remove localhost from proxy exceptions in Firefox?
According to this, localhost is not forwarded to the proxy by default: http://kb.mozillazine.org/Network.proxy.no_proxies_on
My question is: How do I remove localhost as an exception?
The "No proxy for" field in my proxy options in firefox is already empty, but localhost is not being forwarded to the proxy.
network.proxy.no_proxies_on in about:config is also already empty.
My particular scenario that I'm trying to get to work:
I have two Windows 10 machines: Proxy server A and client B
Server A is is running bitvise ssh server. Client B connecting to it as a socks 5 proxy via Putty. The server A has a local web server running on the localhost:9001 that I want to access in Firefox from the client B.
Solution 1:
You have to change an additional setting in addition to removing localhost and 127.0.0.1 from the No Proxy For box. Set network.proxy.allow_hijacking_localhost
to true
in about:config
.
This was changed recently. Source: https://bugzilla.mozilla.org/show_bug.cgi?id=1535581
Solution 2:
I had the same problem in my Arquillian-Tests.
I simply changed this Preference:
network.proxy.allow_hijacking_localhost", true
my Code:
FirefoxOptions options = new FirefoxOptions();
options.setProxy(seleniumProxy);
options.addPreference("network.proxy.allow_hijacking_localhost", true);
WebDriver driver = new FirefoxDriver(geckoservice, options);
(geckoservice
is needed for Firefox 48 and above
see https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp )
Edit: I use Firefox Developer Version 69.