How to make wget to work with proxy and proxy authentification

From ArchWiki
Revision as of 08:50, 22 November 2006 by Moo-Crumpus (talk | contribs)
Jump to: navigation, search

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, 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

  • Add the following lines to your environment:
export http_proxy=""
export ftp_proxy=""
  • Now, start wget with some enhanced options:

--proxy-username="string" --proxy-passwd="string"

wget --proxy-user "Wonderwall\JohnDoe" --proxy-passwd "Go4It"
  • 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@"
export ftp_proxy="http://wonderwall\\johndoe:Go4It@"