wget to work with proxy and proxy authentification
Saturday September 02nd 2006, 10:52 pm
Filed under: Tips & Trik

From ArchWiki

For cvbcvb this example, you want to run wget inside a network environment, where a proxy requests authentification. The following scenario is typical for Windows networks. Let the proxy have the IP 192.168.10.11, listening on port 8080. In this ebcxample, for authentification 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:

–proxy-username=”string” –proxy-passwd=”string”

wget --proxy-user "WonderwallJohnDoe" 
--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 "WonderwallJohnDoe" --proxy-passwd="Go4It"'
  • Altenatively, you may encode de username/password in the http_proxy variable:
export http_proxy="http://username:password@192.168.10.11:8080"
export ftp_proxy="http://username:password@192.168.10.11:8080"

No Comments so far
Leave a comment



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)