Configuring proxy settings for Google Chrome on Linux
How do I configure proxy settings for Chrome on Linux? It doesn’t have a configuration interface like Firefox. I’d like to configure it in a way that I don’t have to type every time, the login and password. EDIT: I’m using Fluxbox as my window manager.
5 Answers 5
Try the —proxy-server command line option, and/or http_proxy environment variable.
google-chrome-stable --proxy-server="http://example.com:8080"
Also, Chrome/Chromium makes use of xdg scripts, so you can try configuring the proxy server in GNOME/KDE, and set up xdg scripts to use settings of the desktop environment. That is how I solved MIME-type file associations at least.
Calling the google chrome executable with the —proxy-server parameter worked fine, thanks. When browsing it pops up an authentication screen for every tab from the last session, is there a way to ‘remember’ the login and password, or make it authenticate automatically? using the —proxy-server parameter like —proxy-server=»username:password@proxy-ip:port» didn’t work.
‘google-chrome —proxy-pac-url=file:///. ‘ works perfectly. There’s no need to use http_proxy this no_proxy that. If you’ve got a pac file for use with firefox it’ll work fine here. If you need help writing a .pac file google is your friend. But you can still configure via the command line. Please see man google-chrome for more information on flags and environment variables.
Re the username and password auth in chrome using the —proxy-server parameter — this appears to be a bug in Chrome — please star the issue here: bugs.chromium.org/p/chromium/issues/detail?id=615947
Note for anyone trying this: you may have to close all instances of Chrome that are currently running first. Otherwise —proxy-server seems to have no effect. I wasted about an hour on this.
run this as root gedit /usr/share/applications/google-chrome.desktop then add your proxy settings as you would like ie —proxy-server=»http://127.0.0.1:8080″ then save and run chrome .
On Ubuntu 16.04 LTS with Chrome v53 (64 bit), I had to set the http_proxy / HTTP_PROXY env variables to «http://proxyserver:port» for all users for Chrome to be able to communicate.
export _proxy="http://proxyserver:port" export _PROXY=$http_proxy
Chrome uses the Proxy settings for your DE. If you use KDE it will use this. If you use Gnome it will use theirs. If you don’t use either, I think it will try to use Gnome’s, but not 100% sure.
If you go the the Wrench -> Under the Hood , you should have a button under Network labeled Change proxy settings. When I click this, in my case, it loads KDE Proxy settings.
If you don’t use either KDE or Gnome, you could try browsing gconf , Chrome uses it to store it’s settings.
Nope, it shows a page giving explanations of possible ways to set up proxy configurations. Apparently i’d have to change the proxy settings on the OS itself, i’d like to set it only for chrome.
Doing a bit more reading out of curiosity, chrome either uses the system proxy or through the command switch. But now way to remember the username / password
Network Settings
So far this design decision has worked well. The only network settings that some users ask for an alternative to system settings are proxy settings. For this we recently added some command-line options that allow you to run Chromium with custom proxy settings.
Preference service for network settings
Although the system network settings have been sufficient for our network stack, eventually there will be some configuration settings specific to our network stack, so we need to have our own preference service for those settings. See also issue 266, in which some Firefox users demand that we not use the WinInet proxy settings (the de facto system proxy settings on Windows).
Command-line options for proxy settings
Chrome supports the following proxy-related command line arguments:
—no-proxy-server
This tells Chrome not to use a Proxy. It overrides any other proxy settings provided.
—proxy-auto-detect
This tells Chrome to try and automatically detect your proxy configuration. This flag is ignored if —proxy-server is also provided.
This tells Chrome to use a custom proxy configuration. You can specify a custom proxy configuration in three ways:
For example, you can specify:
to use HTTP proxy «foopy:80» for http URLs and HTTP proxy «foopy2:80» for ftp URLs.
will use the proxy at foopy:8080 for all traffic.
—proxy-server=»direct://» will cause all connections to not use a proxy.
This tells chrome to bypass any specified proxy for the given semi-colon-separated list of hosts. This flag must be used (or rather, only has an effect) in tandem with —proxy-server.
Note that trailing-domain matching doesn’t require «.» separators so «*google.com» will match «igoogle.com» for example.
will use the proxy server «foopy» on port 8080 for all hosts except those pointing to *.google.com, those pointing to *foo.com and those pointing to localhost on port 8080.
igoogle.com requests would still be proxied. ifoo.com requests would not be proxied since *foo, not *.foo was specified.
This tells Chrome to use the PAC file at the specified URL.
will tell Chrome to resolve proxy information for URL requests using the windows.pac file.