# Configure `curl` to use tor

John Simpson `<jms1@jms1.net>` 2019-08-13

# Background

**Tails does not allow processes other than `tor` to access the network.**

This means that any process needing network access, has to be configured to use `tor` as a proxy. Tails configures its built-in applications (such as Thunderbird, Pidgin, and Tor Browser) automatically, however it does not confgure `curl`. So in order to use `curl`, we need to configure it.

# Procedure

### Pre-requisites

* Persistent volume with "dotfiles" enabled

### Create `~/.curlrc`

First create a persistent `~/.curlrc` file. We only need to do this once. From now on, the persistence framework will create this symlink for us, when Tails boots with the persistent volume unlocked.

```
$ touch /live/persistence/TorData_unlocked/dotfiles/.curlrc
$ ln -s /live/persistence/TorData_unlocked/dotfiles/.curlrc ~/
```

Then add the configuration option which tells `curl` how to use the `tor` proxy.

```
$ echo 'socks5-hostname = "127.0.0.1:9050"' > ~/.curlrc
```
