1.. _config_tor:
2
3Internal Tor configuration for the scanner
4------------------------------------------
5
6The scanner needs a specific Tor configuration.
7The following options are either set when launching Tor or required when
8connection to an existing Tor daemon.
9
10Default configuration:
11
12- ``SocksPort auto``: To proxy requests over Tor.
13- ``CookieAuthentication 1``: The easiest way to authenticate to Tor.
14- ``UseEntryGuards 0``: To avoid path bias warnings.
15- ``UseMicrodescriptors 0``: Because full server descriptors are needed.
16- ``SafeLogging 0``: Useful for logging, since there's no need for anonymity.
17- ``LogTimeGranularity 1``
18- ``ProtocolWarnings 1``
19- ``FetchDirInfoEarly 1``
20- ``FetchDirInfoExtraEarly 1``: Respond to `MaxAdvertisedBandwidth` as soon as possible.
21- ``FetchUselessDescriptors 1``: Keep fetching descriptors, even when idle.
22- ``LearnCircuitBuildTimeout 0``: To keep circuit build timeouts static.
23
24Configuration that depends on the user configuration file:
25
26- ``CircuitBuildTimeout ...``: The timeout trying to build a circuit.
27- ``DataDirectory ...``: The Tor data directory path.
28- ``PidFile ...``: The Tor PID file path.
29- ``ControlSocket ...``: The Tor control socket path.
30- ``Log notice ...``: The Tor log level and path.
31
32Configuration that needs to be set on runtime:
33
34- ``__DisablePredictedCircuits 1``: To build custom circuits.
35- ``__LeaveStreamsUnattached 1``: The scanner is attaching the streams itself.
36
37Configuration that can be set on runtime and fail:
38
39- ``ConnectionPadding 0``: Useful for avoiding extra traffic, since scanner anonymity is not a goal.
40
41Currently most of the code that sets this configuration is in :func:`sbws.util.stem.launch_tor`
42and the default configuration is ``sbws/globals.py``.
43
44.. note:: the location of this code is being refactored.
45