Welcome to madhatt.com

A Simple website from a computer geek in Colorado with dreams of moving to Alaska

My Travels Photo Gallery

Using Wget with TOR for anonymous downloading

Want to use wget to download something and tunnel it through TOR anonymous network?

One way to do it is to use wget, TOR, and Privoxy to get what you need.

Explanation: Tor is a SOCKS proxy in which your date is sent over a network in a pretty anonymous fashion. The problem with tor is that it does not offer a http proxy which is what wget can use. So to get around this you can install Privoxy which will allow you to connect to TOR via a simple HTTP proxy.

So, lets get started.

Step 1 - Install the stuff

you can install all you need with the following command

sudo apt-get install -y tor tor-geoipdb privoxy

Step 2 - Configuration

There are a few things that need to be configured.

1. /etc/wgetrc

Find line starting with

#http_proxy =

Replace whole line with

http_proxy = http://localhost:8118


2. /etc/Privoxy

Add the following to the top of the file

listen-address localhost:8118
forward-socks5 / .

Step 3 - Start every thing up

sudo service tor restart; sudo service privoxy start

now when you use the wget command your data will be tunneled through the TOR network. you'll notice when you run the wget command that you will see a line like the following

Resolving localhost...
Connecting to localhost||:8118... connected.

The :8118 shows that your connection is going to Privoxy which in turn goes to TOR.

Note: You download speeds will be significantly redued due to the fact that your data will be tunneling through the TOR network.