Sometimes browsing over Tor can be a little slow.

Polipo is a caching proxy developed for use with Tor. Both of these can be installed with homebrew on OS X.

This is all done on OS X. Its likely that other systems would work just fine with little to no modification in the documentation.

## Steps

1. Install tor
2. Configure tor
3. Install polipo
4. Configure polipo
5. Configure browser/system to see the proxy

## Install Tor

Installing tor with homebrew:

brew install tor


This will put the bits in /usr/local, and the torrc file in /usr/local/etc/tor/

## Configure Tor

I’ve removed the comments (lines starting with ##) and empty lines. By default, the config file is in /usr/local/etc/tor/torrc

SocksPort 9050 ## Default: Bind to localhost:9050 for local connections.
Log notice syslog
ControlPort 9051
DisableDebuggerAttachment 0
HardwareAccel 1


Append the following lines to your torrc to force traffic to only exit the tor network in Switzerland

ExitNodes {CH}
StrictNodes 1


## Install Polipo

Installing polipo with homebrew:

brew install polipo


This will put the bits in /usr/local. Unfortunately, it seems to be expecting its config in /etc and won’t be convinced otherwise (this may be because the developer wrote it for Linux and didn’t realize not everything is the same as Linux).

## Configure Polipo

Again, I’ve removed lines that start with a comment (##), or are empty. By default, polipo looks for its config file in /etc/polipo/config

proxyAddress = "127.0.0.1"
proxyPort = 8118
allowedClients = 127.0.0.1
allowedPorts = 1-65535
proxyName = "localhost"
cacheIsShared = false
socksParentProxy = "localhost:9050"
socksProxyType = socks5
chunkHighMark = 67108864
dnsUseGethostbyname = yes
disableVia = true
censorReferer = maybe
maxConnectionAge = 5m
maxConnectionRequests = 120
serverMaxSlots = 8
serverSlots = 2
tunnelAllowedPorts = 1-65535
logSyslog = true
scrubLogs = false


## Client Configuration

Here are some screenshots for setting the system wide proxy on a mac, as well as the proxy settings for firefox.

OS X System Settings (http)

OS X System Settings (socks)

OS X Firefox Settings (both)

You can point your browser at https://check.torproject.org/ to find out if you have been successful. If so, the page will tell you that you are (successfully) using tor.

If you want a cli to view tor status, you can use arm (also from homebrew):

You will need to define a password in your torrc for arm to connect. You can generate that password by doing: