www/chromium ignores proxy settings [SEC=UNCLASSIFIED]

Julian H. Stacey jhs at berklix.com
Wed Nov 24 12:41:10 UTC 2010

> From:		Jeremy Chadwick <freebsd at jdc.parodius.com> 

Jeremy Chadwick wrote:
> On Wed, Nov 24, 2010 at 11:51:13AM +0100, Julian H. Stacey wrote:
> > "Wilkinson, Alex" wrote:
> > > 
> > >     0n Mon, Nov 22, 2010 at 02:19:32PM +0000, Tom Evans wrote: 
> > > 
> > >     >On Mon, Nov 22, 2010 at 2:00 PM, Alexander Logvinov <avl at logvinov.com> wrote:
> > >     >> ??Use ??chrome --proxy-server="http://proxy:3128/" :)
> > >     >That didn't work either, it would not even make any connections then.
> > >     >With '--proxy-server=proxy:3128' though, it works correctly!
> > >     >It would still be nice to be able to set these options in the right
> > >     >place in the gui, and have them work :)
> > > 
> > > Try: --proxy-pac-url="http://proxy-server:port"
> > > 
> > > Work for me.
> > > 
> > >    -Alex
> > 
> > Man chrome:
> > 	--proxy-server=host:port
> >               Specify the HTTP/SOCKS4/SOCKS5 proxy server to use for requests.
> >               This overrides any environment variables or settings picked  via
> >               the  options  dialog.
> > 
> > 	--proxy-pac-url=URL
> >               Specify  proxy autoconfiguration URL.  Overrides any environment
> >               variables or settings picked via the options dialog.
> > 
> > These do not work here:
> > 	chrome --proxy-pac-url="http://gate:80"
> > 	chrome --proxy-pac-url=http://gate:80
> > Not suprising, I suppose the URL should not contain '"' and perhaps
> > the URL should be some some auto config server hook I am not supplying.
> Correct.  You need to reference a PAC file for the browser to
> read/parse: http://en.wikipedia.org/wiki/Proxy_auto-config

Thanks. I will read, but later.

> I can show you an example .pac file if you want; I use one to define
> what domain names my browser visits should be siphoned through a proxy
> (SSH tunnel to work) or directly via the Internet.

Sounds interesting/educational :-).

> If what you're looking for is an HTTP or HTTPS-based proxy, you should
> be using --proxy-server, specifying the FQDN or local hostname of the
> server and what TCP port the proxy daemon is configured to accept
> requests from (e.g. port 80, or port 3128 in most cases, ex. squid).
> > 	printenv | grep -i proxy
> > 		http_proxy=http://gate.js.berklix.net:80
> > 		all_proxy=http://gate.js.berklix.net
> > My proxy env vars are not being imported properly,
> > & setting on command line is ugly, but no time for more now,
> > possibly a bug/feature in chrome ? I never tried chrome before.
> There is a very bad assumption being made here (so far by two people).
> There is absolutely nothing that requires or guarantees a piece of
> software will import or make use of *_proxy environment variables.  The
> software has to explicitly state it honours and respects these, and
> provide documentation stating what it expects the syntax to be.
> The only two pieces of software I've encountered which honours these is
> perl's LWP::UserAgent (and friends), and curl.

man 3 fetch

Notes from my .cshrc :
# man ftp:
#       http_proxy      URL of HTTP proxy to use when making HTTP URL requests
# Chimera:
#       all_proxy is default proxy host for all protocols
# Lynx: does not use all_proxy, does use http_proxy & ftp_proxy,
#       & also /etc/local/lynx.cfg Env vars take precedence.

> I imagine lynx and some other software honours them as well, but again,
> assuming software honours them (or properly parses them for that matter)
> isn't reasonable.
> Is there any confirmed documentation that Google Chrome honours and
> makes use of *_proxy environment variables?  I see some random Linux
> user forum posts claiming it does, but there's caveats to their use
> apparently (see post from "disciple"; X users will probably want to read
> this post):
> http://www.murga-linux.com/puppy/viewtopic.php?t=50196

 disciple writes:
	Google Chrome obeys the following environment variables: 
	Shorthand for specifying all of http_proxy, https_proxy,
	ftp_proxy http_proxy, https_proxy, ftp_proxy The proxy
	servers used for HTTP, HTTPS, and FTP. Note: because Gnome/KDE
	proxy settings may propagate into these variables in some
	terminals, this variable is ignored (in preference for
	actual system proxy settings) when running under Gnome or
	KDE. Use the command-line flags to set these when you want
	to force their values.

(IMO Nasty, having host wide over-ride user pref; bug to fix bug is a bug.)

  A user (didik) suggests add a wrapper to provide env var.

Chrome uses a different syntax eg host:port
rather than http://host:port I'm familiar with on other tools above

Chrome is new, I guess we have to expect odd features initially If
anyone here knows chrome authors, or is a regular chrome user (I
am not) they're welcome to pass along a suggestion to both add a
wrapper & conform *_proxy syntax as per other pre-existing tools
eg fetch (3).

Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
	Mail plain text;  Not quoted-printable, or HTML or base 64.
	Avoid top posting, it cripples itemised cumulative responses.

More information about the freebsd-stable mailing list