knowledge/technology/internet/Tor.md

31 lines
No EOL
1.7 KiB
Markdown

---
website: https://torproject.org
obj: application
---
# The Onion Router (TOR)
The Tor Project (The onion routing) is an open source implementation of onion routing that provides free access to an anonymous proxy network. Its primary goal is to enable online anonymity by protecting against traffic analysis attacks.
Users of the Tor network run an onion proxy software on their machines, which presents a SOCKS interface to its clients. This software connects out to Tor, periodically negotiating a virtual circuit through the Tor network. Tor employs cryptography in a layered manner (hence the 'onion' analogy), ensuring forward secrecy between routers.
As an overlay network it is similiar to [i2p](../internet/I2P.md).
## Usage
Start/enable `tor.service`. Alternatively, launch it with `sudo -u tor /usr/bin/tor`.
To use a program over Tor, configure it to use `127.0.0.1` or `localhost` as a SOCKS5 proxy, with port `9050` for plain Tor with standard settings.
The proxy supports remote DNS resolution: use `socks5**h**://localhost:9050` for DNS resolution from the exit node (instead of `socks5` for a local DNS resolution).
## Configuration
Tor reads its configurations from the file `/etc/tor/torrc` by default, or if the latter is not found, from `$HOME/.torrc`. The configuration options are explained on the [Tor website](https://torproject.org/docs/tor-manual.html.en). The default configuration should work fine for most Tor users.
## Hidden Services
Hidden Services are web services behind an onion domain.
To generate onion domains [mkp224o](https://git.hydrar.de/utilities/mkp224o) can be used.
To enable a hidden service add this to `torrc`:
```
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
```