net.c now has support for http(s) proxy servers
which may be required by some installations
to get through the firewall to external resources
such as (but not limited to) for example 
bigWig or bigBed data via custom track bigDataUrl.

One must add the setting "httpProxy", "httpsProxy", and "ftpProxy" to hg.conf.

httpProxy=http://someProxyServer:3128
httpsProxy=http://someProxyServer:3128
ftpProxy=ftp://127.0.0.1:2121

If the proxy server requires BASIC authentication

httpProxy=http://user:password@someProxyServer:3128
httpsProxy=http://user:password@someProxyServer:3128

where user and password may need URL-encoding
if they contain special characters such as
":" and "@".

If you wish to exclude domains from proxying,
create a comma-separated list of domain-suffixes.  
If a domain ends with an entry from this list, the proxy will be skipped.

noProxy=ucsc.edu,mit.edu,localhost,127.0.0.1

The httpProxy and httpsProxy URLs should use http protocol, not https.
One reason for this is that https sessions would end up doubly-encoded.

If you are debugging your proxy configuration, you can use this hg.conf setting
to turn on logging to stderr.

logProxy=on

It is not meant to be left on in production. 
Your proxy server should have its own logging features.

net.c also responds to environment variables http_proxy, https_proxy, ftp_proxy, no_proxy, and log_proxy.

