Matt Makai - Python web dev & Twilio Developer Evangelist.

@mattmakai on Twitter & GitHub

wget and Proxy Servers

Short answer: before you use wget, specify 'export http_proxy=my.proxy.server:port' then wget will use the proxy.

I needed to grab some files with wget while working on a Linux server I was setting up for a Django deployment. Unfortunately, I was behind a firewall and had to use a specific proxy for HTTP connections.

pip makes it easy, just do 'pip install --proxy my.proxy.server:8080 packages' and I figured wget would have the same commandline argument to specify a proxy. No such luck.

I found the following link that specified 'man wget' as the answer unhelpful (and a dick answer anyway).

So for future reference, 'export http_proxy=my.proxy.server:port', will specify a proxy server to use with wget. I also found this proxies link useful as well.


« Back to blog