# See https://www.torproject.org/docs/tor-manual.html

ClientOnly 1
ExitPolicy reject *:*

# Port numbers (SocksPort, ControlPort) are randomly generated in TorController.
# TorWrapper picks these up and executes tor with these as command-line args.
# See TorController.m:31-32 and TorWrapper.m (main).
SocksListenAddress 127.0.0.1
ControlListenAddress 127.0.0.1

CookieAuthentication 1

ConnLimit 1000

SafeLogging 1

# "onionbrowser"
HashedControlPassword 16:3BC82646B9E77E50606294B257F28D8D99EDFE088908DFCF2F522355A2

TestSocks 0
WarnUnsafeSocks 0 # default 1 (we don't care on iOS)

# We actually disabled this by removing ptrace() calls when building tor.
# See "build-tor-ptrace-patch.diff" and "build-tor.sh" in the OnionBrowser
# repo root. This technically results in "less security", but iOS
# restrictions do not allow ptrace() calls. See README.
DisableDebuggerAttachment 0

# Try for at most NUM seconds when building circuits. If the circuit isn't
# open in that time, give up on it. (Default: 1 minute.)
CircuitBuildTimeout 5
# Send a padding cell every N seconds to keep firewalls from closing our
# connections while Tor is not in use.
KeepalivePeriod 60
# Force Tor to consider whether to build a new circuit every NUM seconds.
NewCircuitPeriod 15
# How many entry guards should we keep at a time?
NumEntryGuards 8


# "UseBridges" and "bridge" lines get appended automatically if there
# are bridges enabled in settings.

# Exit Node
#ExitNodes {AU}
#StrictNodes 1