A little tip: wget through a proxy


I'm building Minimyth on a number of machines in order to debug a problem with the build I'm having on fedora 7.  The machines are running FC5 and FC6 and are on an internal network that connects to the Internet via a proxy.  Minimyth's source is a build system whose purpose is to build a distribution from scratch (much like the Linux From Scratch methodology).  To do this, it uses the GAR build environment to configure package downloads which are then used in the build process. 

The downloads are all handled with wget.  In order to use wget on these machines I needed to tell wget to use the proxy.  The man page for wget doesn't say exactly how to do this, but if you read carefully it mentions the use of *_proxy environment variables.  After some experimentation I discovered that the * can be http or ftp (or perhaps other mechanisms that wget understands and the proxy supports).  So now I do the following as part of my environment setup before building minimyth:

export http_proxy="http://proxy.sys.com:4214"
export ftp_proxy="http://proxy.sys.com:4214"

The 4214 is just the port on proxy.sys.com (an fake name, by the way – substitute your proxy's host name there) that the proxy server is listening on.  If you need to find a proxy server, try squid.  But note that setting up a proxy can be a bit daunting.  It's not readily clear how to do this in 5 minutes.