Wed 15/10/2008
Todo: Consider extracting out into it's own document
Tip: To store the wget'd file to another local pathname, specify -O pathname (capital-oh, not zero)
To use wget(1) from behind a proxy server, be sure that the proxy host variables before invoking wget(1). To use wget via an http source (via a proxy) set the http_proxy variable at the shell. To use wget(1) via ftp, set ftp_proxy instead. The following example uses ftp to grab vim from behind a proxy
bash $ export ftp_proxy=http://corporate-proxy.com.au:8080
Also, the username and password can be encoded in the http_proxy and ftp_proxy variables. E.g.,
bash $ export ftp_proxy=http://foo:bar@corporate-proxy.com.au:8080
If the proxy requires authorization, when these can be specified with the --proxy-user= and --proxy-password= options. To enable wget(1) with proxy access, invoke wget(1) with the --proxy option. To disable, invoke wget with --noproxy, for exmple:
bash $ wget --proxy --proxy-user=foo --proxy-password=foo ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2
There are several piercing or tunnelling proxy programs which will drill an outbound hole the local proxy firewall. This will permit ssh access to the outside and, depending on local sshd configuration, may also allow for hoping, forwarding, reverse tunnels and so on (see ssh for more details).
Tip: Corescrew is now part of the Fedora repo's and can be installed via yum: yum install corkscrew
The piercing proxy tunelling program corksrew is a simple binary which hooks in to ssh. The following is the client-side ssh configuration for hopping ssh through the proxy:
bash $ cat ~/.ssh/config Host * # #The following proxy command uses the ssh-proxy.sh script, which uses corkscrew if it detects a proxy firewall. #ProxyCommand $HOME/.ssh/ssh-proxy.sh corporate-proxy.com.au 8080 %h %p ~/.ssh/proxy.auth # #The following proxy command always uses corkscrew, regardless ProxyCommand /usr/local/bin/corkscrew corporate-proxy.com.au 8080 %h %p ~/.ssh/proxy.auth
The file ~/.ssh/proxy.auth is simple a text file containing the proxy username and password in the form user:password. E.g.,
bash $ cat ~/.ssh/proxy.auth foo:bar
Note: Requires openssl-devel to be installed
The proxtunnel project (proxytunnel.sourceforge.net) provides a simple means of tunnelling corporate proxy firewalls. There is no configure script in the tarball, but make(1) will work as long as openssl-devel is installed.
Warning: Have had no success tunnelling to server's outside the proxy firewall nor inside either using "proxytunnel"
Stuart Moorfoot © 15 October 2008 foo@bund.com.au