How to make wget to work with proxy and proxy authentification
You may want to run wget inside a network environment, where a proxy requests authentication. Or you will like to use pacman in such an environment. You can do so by activating using wget in /etc/pacman.conf. The following scenario is typical for Windows networks. Let the proxy have the IP 192.168.10.11, listening on port 8080. In this example, for authentication you have to submit the name of a windows domain user account. The domain's name is wonderwall, and the useraccount reads JohnDoe, the password will be Go4It. Let us further assume you want to fetch arch-0.6.iso from prdownloads.sourceforge.net.
- Add the following lines to your environment:
export http_proxy="http://192.168.10.11:8080" export ftp_proxy="http://192.168.10.11:8080"
- Now, start wget with some enhanced options:
wget --proxy-user "Wonderwall\JohnDoe" --proxy-passwd "Go4It" http://prdownloads.sourceforge.net/archlinux/arch-0.6.iso
- You can create an alias to save that configuration, although it may be a security risk to save a passwd inside it:
alias wget 'wget --proxy-user "Wonderwall\JohnDoe" --proxy-passwd="Go4It"'
- Altenatively, you may use the username/password in the http_proxy/ftp_proxy variables:
export http_proxy="http://wonderwall\\johndoe:Go4It@192.168.10.11:8080" export ftp_proxy="http://wonderwall\\johndoe:Go4It@192.168.10.11:8080"