config_tor.rst 1.77 KB
Newer Older
1
2
.. _config_tor:

juga's avatar
juga committed
3
4
Internal Tor configuration for the scanner
------------------------------------------
5

6
The scanner needs a specific Tor configuration.
juga's avatar
juga committed
7
8
9
10
The following options are either set when launching Tor or required when
connection to an existing Tor daemon.

Default configuration:
11
12
13
14

- ``SocksPort auto``: To proxy requests over Tor.
- ``CookieAuthentication 1``: The easiest way to authenticate to Tor.
- ``UseEntryGuards 0``: To avoid path bias warnings.
juga's avatar
juga committed
15
16
17
18
- ``UseMicrodescriptors 0``: Because full server descriptors are needed.
- ``SafeLogging 0``: Useful for logging, since there's no need for anonymity.
- ``LogTimeGranularity 1``
- ``ProtocolWarnings 1``
19
20
21
- ``FetchDirInfoEarly 1``
- ``FetchDirInfoExtraEarly 1``: Respond to `MaxAdvertisedBandwidth` as soon as possible.
- ``FetchUselessDescriptors 1``: Keep fetching descriptors, even when idle.
juga's avatar
juga committed
22
23
24
25
26
27
28
29
30
31
32
33
34
- ``LearnCircuitBuildTimeout 0``: To keep circuit build timeouts static.

Configuration that depends on the user configuration file:

- ``CircuitBuildTimeout ...``: The timeout trying to build a circuit.
- ``DataDirectory ...``: The Tor data directory path.
- ``PidFile ...``: The Tor PID file path.
- ``ControlSocket ...``: The Tor control socket path.
- ``Log notice ...``: The Tor log level and path.

Configuration that needs to be set on runtime:

- ``__DisablePredictedCircuits 1``: To build custom circuits.
35
36
37
38
39
- ``__LeaveStreamsUnattached 1``: The scanner is attaching the streams itself.

Configuration that can be set on runtime and fail:

- ``ConnectionPadding 0``: Useful for avoiding extra traffic, since scanner anonymity is not a goal.
juga's avatar
juga committed
40
41
42
43

Currently most of the code that sets this configuration is in :func:`sbws.util.stem.launch_tor`
and the default configuration is ``sbws/globals.py``.

44
.. note:: the location of this code is being refactored.