tor.1.txt 149 KB
Newer Older
1
2
3
4
// Copyright (c) The Tor Project, Inc.
// See LICENSE for licensing information
// This is an asciidoc file used to generate the manpage/html reference.
// Learn asciidoc on http://www.methods.co.nz/asciidoc/userguide.html
5
6
:man source:   Tor
:man manual:   Tor Manual
7
8
9
10
11
12
13
14
15
16
17
18
19
20
TOR(1)
======

NAME
----
tor - The second-generation onion router


SYNOPSIS
--------
**tor** [__OPTION__ __value__]...

DESCRIPTION
-----------
21
Tor is a connection-oriented anonymizing communication
22
23
24
25
26
27
service. Users choose a source-routed path through a set of nodes, and
negotiate a "virtual circuit" through the network, in which each node
knows its predecessor and successor, but no others. Traffic flowing down
the circuit is unwrapped by a symmetric key at each node, which reveals
the downstream node. +

28
29
30
Basically, Tor provides a distributed network of servers or relays ("onion routers").
Users bounce their TCP streams -- web traffic, ftp, ssh, etc. -- around the
network, and recipients, observers, and even the relays themselves have
31
32
difficulty tracking the source of the stream.

33
By default, **tor** will act as a client only.  To help the network
34
35
36
37
by providing bandwidth as a relay, change the **ORPort** configuration
option -- see below.  Please also consult the documentation on the Tor
Project's website.

38
39
COMMAND-LINE OPTIONS
--------------------
40
[[opt-h]] **-h**, **-help**::
41
42
    Display a short help message and exit.

43
[[opt-f]] **-f** __FILE__::
44
    Specify a new configuration file to contain further Tor configuration
rl1987's avatar
rl1987 committed
45
46
    options OR pass *-* to make Tor read its configuration from standard
    input. (Default: @CONFDIR@/torrc, or $HOME/.torrc if that file is not
47
48
    found)

49
[[opt-allow-missing-torrc]] **--allow-missing-torrc**::
50
    Do not require that configuration file specified by **-f** exist if
51
52
    default torrc can be accessed.

53
[[opt-defaults-torrc]] **--defaults-torrc** __FILE__::
54
55
56
57
    Specify a file in which to find default values for Tor options.  The
    contents of this file are overridden by those in the regular
    configuration file, and by those on the command line. (Default:
    @CONFDIR@/torrc-defaults.)
58

59
60
61
62
63
[[opt-ignore-missing-torrc]] **--ignore-missing-torrc**::
    Specifies that Tor should treat a missing torrc file as though it
    were empty. Ordinarily, Tor does this for missing default torrc files,
    but not for those specified on the command line.

64
[[opt-hash-password]] **--hash-password** __PASSWORD__::
65
66
    Generates a hashed password for control port access.

67
[[opt-list-fingerprint]] **--list-fingerprint**::
68
69
    Generate your keys and output your nickname and fingerprint.

70
[[opt-verify-config]] **--verify-config**::
71
72
    Verify the configuration file is valid.

73
[[opt-serviceinstall]] **--service install** [**--options** __command-line options__]::
74
75
    Install an instance of Tor as a Windows service, with the provided
    command-line options. Current instructions can be found at
Roger Dingledine's avatar
Roger Dingledine committed
76
    https://www.torproject.org/docs/faq#NTService
77

78
[[opt-service]] **--service** **remove**|**start**|**stop**::
79
80
    Remove, start, or stop a configured Tor Windows service.

81
[[opt-nt-service]] **--nt-service**::
82
    Used internally to implement a Windows service.
83

84
[[opt-list-torrc-options]] **--list-torrc-options**::
85
86
    List all valid options.

87
[[opt-version]] **--version**::
88
89
    Display Tor version and exit.

90
[[opt-quiet]] **--quiet**|**--hush**::
91
92
93
94
95
96
    Override the default console log.  By default, Tor starts out logging
    messages at level "notice" and higher to the console.  It stops doing so
    after it parses its configuration, if the configuration tells it to log
    anywhere else.  You can override this behavior with the **--hush** option,
    which tells Tor to only send warnings and errors to the console, or with
    the **--quiet** option, which tells Tor not to log to the console at all.
97

98
[[opt-keygen]] **--keygen** [**--newpass**]::
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
   Running "tor --keygen" creates a new ed25519 master identity key for a
   relay, or only a fresh temporary signing key and certificate, if you
   already have a master key.  Optionally you can encrypt the master identity
   key with a passphrase: Tor will ask you for one. If you don't want to
   encrypt the master key, just don't enter any passphrase when asked. +
 +
   The **--newpass** option should be used with --keygen only when you need
   to add, change, or remove a passphrase on an existing ed25519 master
   identity key. You will be prompted for the old passphase (if any),
   and the new passphrase (if any). +
 +
   When generating a master key, you will probably want to use
   **--DataDirectory** to control where the keys
   and certificates will be stored, and **--SigningKeyLifetime** to
   control their lifetimes.  Their behavior is as documented in the
   server options section below.  (You must have write access to the specified
   DataDirectory.) +
 +
   To use the generated files, you must copy them to the DataDirectory/keys
   directory of your Tor daemon, and make sure that they are owned by the
   user actually running the Tor daemon on your system.

121
122
123
Other options can be specified on the command-line in the format "--option
value", in the format "option value", or in a configuration file.  For
instance, you can tell Tor to start listening for SOCKS connections on port
124
125
9999 by passing --SocksPort 9999 or SocksPort 9999 to it on the command line,
or by putting "SocksPort 9999" in the configuration file.  You will need to
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
quote options with spaces in them: if you want Tor to log all debugging
messages to debug.log, you will probably need to say --Log 'debug file
debug.log'.

Options on the command line override those in configuration files. See the
next section for more information.

THE CONFIGURATION FILE FORMAT
-----------------------------

All configuration options in a configuration are written on a single line by
default.  They take the form of an option name and a value, or an option name
and a quoted value (option value or option "value"). Anything after a #
character is treated as a comment.  Options are
case-insensitive. C-style escaped characters are allowed inside quoted
values. To split one configuration entry into multiple lines, use a single
backslash character (\) before the end of the line.  Comments can be used in
such multiline entries, but they must start at the beginning of a line.

By default, an option on the command line overrides an option found in the
configuration file, and an option in a configuration file overrides one in
the defaults file.

This rule is simple for options that take a single value, but it can become
complicated for options that are allowed to occur more than once: if you
151
specify four SocksPorts in your configuration file, and one more SocksPort on
152
the command line, the option on the command line will replace __all__ of the
153
SocksPorts in the configuration file.  If this isn't what you want, prefix
154
the option name with a plus sign (+), and it will be appended to the previous
155
156
set of options instead.  For example, setting SocksPort 9100 will use only
port 9100, but setting +SocksPort 9100 will use ports 9100 and 9050 (because
157
this is the default).
158
159
160

Alternatively, you might want to remove every instance of an option in the
configuration file, and not replace it at all: you might want to say on the
161
command line that you want no SocksPorts at all.  To do that, prefix the
162
163
option name with a forward slash (/).  You can use the plus sign (+) and the
forward slash (/) in the configuration file and on the command line.
164
165
166

GENERAL OPTIONS
---------------
167

168
[[BandwidthRate]] **BandwidthRate** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**|**KBits**|**MBits**|**GBits**::
169
170
    A token bucket limits the average incoming bandwidth usage on this node
    to the specified number of bytes per second, and the average outgoing
171
    bandwidth usage to that same value.  If you want to run a relay in the
172
173
174
175
    public network, this needs to be _at the very least_ 75 KBytes for a
    relay (that is, 600 kbits) or 50 KBytes for a bridge (400 kbits) -- but of
    course, more is better; we recommend at least 250 KBytes (2 mbits) if
    possible.  (Default: 1 GByte) +
176
177
178
179
180
181
182
183
184
185
 +
    With this option, and in other options that take arguments in bytes,
    KBytes, and so on, other formats are also supported. Notably, "KBytes" can
    also be written as "kilobytes" or "kb"; "MBytes" can be written as
    "megabytes" or "MB"; "kbits" can be written as "kilobits"; and so forth.
    Tor also accepts "byte" and "bit" in the singular.
    The prefixes "tera" and "T" are also recognized.
    If no units are given, we default to bytes.
    To avoid confusion, we recommend writing "bytes" or "bits" explicitly,
    since it's easy to forget that "B" means bytes, not bits.
186

187
[[BandwidthBurst]] **BandwidthBurst** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**|**KBits**|**MBits**|**GBits**::
188
    Limit the maximum token bucket size (also known as the burst) to the given
189
    number of bytes in each direction. (Default: 1 GByte)
190

191
[[MaxAdvertisedBandwidth]] **MaxAdvertisedBandwidth** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**|**KBits**|**MBits**|**GBits**::
192
193
194
195
196
197
    If set, we will not advertise more than this amount of bandwidth for our
    BandwidthRate. Server operators who want to reduce the number of clients
    who ask to build circuits through them (since this is proportional to
    advertised bandwidth rate) can thus reduce the CPU demands on their server
    without impacting network performance.

198
[[RelayBandwidthRate]] **RelayBandwidthRate** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**|**KBits**|**MBits**|**GBits**::
199
    If not 0, a separate token bucket limits the average incoming bandwidth
200
201
202
203
204
    usage for \_relayed traffic_ on this node to the specified number of bytes
    per second, and the average outgoing bandwidth usage to that same value.
    Relayed traffic currently is calculated to include answers to directory
    requests, but that may change in future versions. (Default: 0)

205
[[RelayBandwidthBurst]] **RelayBandwidthBurst** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**|**KBits**|**MBits**|**GBits**::
206
    If not 0, limit the maximum token bucket size (also known as the burst) for
207
208
209
    \_relayed traffic_ to the given number of bytes in each direction.
    (Default: 0)

210
[[PerConnBWRate]] **PerConnBWRate** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**|**KBits**|**MBits**|**GBits**::
211
212
213
214
    If set, do separate rate limiting for each connection from a non-relay.
    You should never need to change this value, since a network-wide value is
    published in the consensus and your relay will use that value. (Default: 0)

215
[[PerConnBWBurst]] **PerConnBWBurst** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**|**KBits**|**MBits**|**GBits**::
216
217
218
219
    If set, do separate rate limiting for each connection from a non-relay.
    You should never need to change this value, since a network-wide value is
    published in the consensus and your relay will use that value. (Default: 0)

220
[[ClientTransportPlugin]] **ClientTransportPlugin** __transport__ socks4|socks5 __IP__:__PORT__::
221
222
223
224
225
226
**ClientTransportPlugin** __transport__ exec __path-to-binary__ [options]::
    In its first form, when set along with a corresponding Bridge line, the Tor
    client forwards its traffic to a SOCKS-speaking proxy on "IP:PORT". It's the
    duty of that proxy to properly forward the traffic to the bridge. +
 +
    In its second form, when set along with a corresponding Bridge line, the Tor
Nick Mathewson's avatar
Nick Mathewson committed
227
    client launches the pluggable transport proxy executable in
228
229
230
231
    __path-to-binary__ using __options__ as its command-line options, and
    forwards its traffic to it. It's the duty of that proxy to properly forward
    the traffic to the bridge.

232
[[ServerTransportPlugin]] **ServerTransportPlugin** __transport__ exec __path-to-binary__ [options]::
233
234
235
    The Tor relay launches the pluggable transport proxy in __path-to-binary__
    using __options__ as its command-line options, and expects to receive
    proxied client traffic from it.
236

237
[[ServerTransportListenAddr]] **ServerTransportListenAddr** __transport__ __IP__:__PORT__::
238
239
240
241
    When this option is set, Tor will suggest __IP__:__PORT__ as the
    listening address of any pluggable transport proxy that tries to
    launch __transport__.

242
[[ServerTransportOptions]] **ServerTransportOptions** __transport__ __k=v__ __k=v__ ...::
243
244
245
246
    When this option is set, Tor will pass the __k=v__ parameters to
    any pluggable transport proxy that tries to launch __transport__. +
    (Example: ServerTransportOptions obfs45 shared-secret=bridgepasswd cache=/var/lib/tor/cache)

247
[[ExtORPort]] **ExtORPort** \['address':]__port__|**auto**::
248
249
250
    Open this port to listen for Extended ORPort connections from your
    pluggable transports.

251
[[ExtORPortCookieAuthFile]] **ExtORPortCookieAuthFile** __Path__::
252
253
254
255
    If set, this option overrides the default location and file name
    for the Extended ORPort's cookie file -- the cookie file is needed
    for pluggable transports to communicate through the Extended ORPort.

256
257
[[ExtORPortCookieAuthFileGroupReadable]] **ExtORPortCookieAuthFileGroupReadable** **0**|**1**::
    If this option is set to 0, don't allow the filesystem group to read the
258
    Extended OR Port cookie file. If the option is set to 1, make the cookie
259
260
261
262
    file readable by the default GID. [Making the file readable by other
    groups is not yet implemented; let us know if you need this for some
    reason.] (Default: 0)

263
[[ConnLimit]] **ConnLimit** __NUM__::
264
265
266
267
268
269
270
271
    The minimum number of file descriptors that must be available to the Tor
    process before it will start. Tor will ask the OS for as many file
    descriptors as the OS will allow (you can find this by "ulimit -H -n").
    If this number is less than ConnLimit, then Tor will refuse to start. +
 +
    You probably don't need to adjust this. It has no effect on Windows
    since that platform lacks getrlimit(). (Default: 1000)

272
[[DisableNetwork]] **DisableNetwork** **0**|**1**::
Nick Mathewson's avatar
Nick Mathewson committed
273
    When this option is set, we don't listen for or accept any connections
274
275
    other than controller connections, and we close (and don't reattempt)
    any outbound
Nick Mathewson's avatar
Nick Mathewson committed
276
277
278
    connections.  Controllers sometimes use this option to avoid using
    the network until Tor is fully configured. (Default: 0)

279
[[ConstrainedSockets]] **ConstrainedSockets** **0**|**1**::
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
    If set, Tor will tell the kernel to attempt to shrink the buffers for all
    sockets to the size specified in **ConstrainedSockSize**. This is useful for
    virtual servers and other environments where system level TCP buffers may
    be limited. If you're on a virtual server, and you encounter the "Error
    creating network socket: No buffer space available" message, you are
    likely experiencing this problem. +
 +
    The preferred solution is to have the admin increase the buffer pool for
    the host itself via /proc/sys/net/ipv4/tcp_mem or equivalent facility;
    this configuration option is a second-resort. +
 +
    The DirPort option should also not be used if TCP buffers are scarce. The
    cached directory requests consume additional sockets which exacerbates
    the problem. +
 +
    You should **not** enable this feature unless you encounter the "no buffer
    space available" issue. Reducing the TCP buffers affects window size for
    the TCP stream and will reduce throughput in proportion to round trip
298
    time on long paths. (Default: 0)
299

300
[[ConstrainedSockSize]] **ConstrainedSockSize** __N__ **bytes**|**KBytes**::
301
302
303
304
    When **ConstrainedSockets** is enabled the receive and transmit buffers for
    all sockets will be set to this limit. Must be a value between 2048 and
    262144, in 1024 byte increments. Default of 8192 is recommended.

305
[[ControlPort]] **ControlPort** __PORT__|**unix:**__path__|**auto** [__flags__]::
306
307
    If set, Tor will accept connections on this port and allow those
    connections to control the Tor process using the Tor Control Protocol
rl1987's avatar
rl1987 committed
308
309
310
311
312
313
    (described in control-spec.txt in
    https://spec.torproject.org[torspec]). Note: unless you also
    specify one or more of **HashedControlPassword** or
    **CookieAuthentication**, setting this option will cause Tor to allow
    any process on the local host to control it. (Setting both authentication
    methods means eithermethod is sufficient to authenticate to Tor.) This
314
    option is required for many Tor controllers; most use the value of 9051.
315
    Set it to "auto" to have Tor pick a port for you. (Default: 0) +
316
 +
317
    Recognized flags are...
318
319
320
321
322
323
    **GroupWritable**;;
        Unix domain sockets only: makes the socket get created as
        group-writable.
    **WorldWritable**;;
        Unix domain sockets only: makes the socket get created as
        world-writable.
324
325
326
    **RelaxDirModeCheck**;;
        Unix domain sockets only: Do not insist that the directory
        that holds the socket be read-restricted.
327

328
[[ControlListenAddress]] **ControlListenAddress** __IP__[:__PORT__]::
329
330
331
332
    Bind the controller listener to this address. If you specify a port, bind
    to this port rather than the one specified in ControlPort. We strongly
    recommend that you leave this alone unless you know what you're doing,
    since giving attackers access to your control listener is really
333
    dangerous. This directive can be specified multiple
334
    times to bind to multiple addresses/ports.  (Default: 127.0.0.1)
335

336
[[ControlSocket]] **ControlSocket** __Path__::
337
    Like ControlPort, but listens on a Unix domain socket, rather than a TCP
338
    socket. '0' disables ControlSocket (Unix and Unix-like systems only.)
339

340
[[ControlSocketsGroupWritable]] **ControlSocketsGroupWritable** **0**|**1**::
341
342
343
344
    If this option is set to 0, don't allow the filesystem group to read and
    write unix sockets (e.g. ControlSocket). If the option is set to 1, make
    the control socket readable and writable by the default GID. (Default: 0)

345
[[HashedControlPassword]] **HashedControlPassword** __hashed_password__::
346
347
    Allow connections on the control port if they present
    the password whose one-way hash is __hashed_password__. You
348
349
    can compute the hash of a password by running "tor --hash-password
    __password__". You can provide several acceptable passwords by using more
350
    than one HashedControlPassword line.
351

352
[[CookieAuthentication]] **CookieAuthentication** **0**|**1**::
353
354
    If this option is set to 1, allow connections on the control port
    when the connecting process knows the contents of a file named
355
356
357
358
    "control_auth_cookie", which Tor will create in its data directory. This
    authentication method should only be used on systems with good filesystem
    security. (Default: 0)

359
[[CookieAuthFile]] **CookieAuthFile** __Path__::
360
361
362
    If set, this option overrides the default location and file name
    for Tor's cookie file. (See CookieAuthentication above.)

363
[[CookieAuthFileGroupReadable]] **CookieAuthFileGroupReadable** **0**|**1**::
364
365
366
    If this option is set to 0, don't allow the filesystem group to read the
    cookie file. If the option is set to 1, make the cookie file readable by
    the default GID. [Making the file readable by other groups is not yet
367
    implemented; let us know if you need this for some reason.] (Default: 0)
368

369
[[ControlPortWriteToFile]] **ControlPortWriteToFile** __Path__::
370
371
372
373
    If set, Tor writes the address and port of any control port it opens to
    this address.  Usable by controllers to learn the actual control port
    when ControlPort is set to "auto".

374
[[ControlPortFileGroupReadable]] **ControlPortFileGroupReadable** **0**|**1**::
375
376
    If this option is set to 0, don't allow the filesystem group to read the
    control port file. If the option is set to 1, make the control port
377
    file readable by the default GID. (Default: 0)
378

379
[[DataDirectory]] **DataDirectory** __DIR__::
380
381
    Store working data in DIR (Default: @LOCALSTATEDIR@/lib/tor)

382
383
384
385
386
[[DataDirectoryGroupReadable]] **DataDirectoryGroupReadable** **0**|**1**::
    If this option is set to 0, don't allow the filesystem group to read the
    DataDirectory. If the option is set to 1, make the DataDirectory readable
    by the default GID. (Default: 0)

387
[[FallbackDir]] **FallbackDir** __address__:__port__ orport=__port__ id=__fingerprint__ [weight=__num__] [ipv6=__address__:__orport__]::
388
    When we're unable to connect to any directory cache for directory info
389
390
391
392
393
    (usually because we don't know about any yet) we try a directory authority.
    Clients also simultaneously try a FallbackDir, to avoid hangs on client
    startup if a directory authority is down. Clients retry FallbackDirs more
    often than directory authorities, to reduce the load on the directory
    authorities.
394
395
    By default, the directory authorities are also FallbackDirs. Specifying a
    FallbackDir replaces Tor's default hard-coded FallbackDirs (if any).
396
    (See the **DirAuthority** entry for an explanation of each flag.)
397
398
399
400
401

[[UseDefaultFallbackDirs]] **UseDefaultFallbackDirs** **0**|**1**::
    Use Tor's default hard-coded FallbackDirs (if any). (When a
    FallbackDir line is present, it replaces the hard-coded FallbackDirs,
    regardless of the value of UseDefaultFallbackDirs.) (Default: 1)
402

403
[[DirAuthority]] **DirAuthority** [__nickname__] [**flags**] __address__:__port__ __fingerprint__::
404
405
406
407
    Use a nonstandard authoritative directory server at the provided address
    and port, with the specified key fingerprint. This option can be repeated
    many times, for multiple authoritative directory servers. Flags are
    separated by spaces, and determine what kind of an authority this directory
408
    is. By default, an authority is not authoritative for any directory style
409
    or version unless an appropriate flag is given.
410
411
    Tor will use this authority as a bridge authoritative directory if the
    "bridge" flag is set. If a flag "orport=**port**" is given, Tor will use the
412
413
    given port when opening encrypted tunnels to the dirserver. If a flag
    "weight=**num**" is given, then the directory server is chosen randomly
414
    with probability proportional to that weight (default 1.0). If a
415
    flag "v3ident=**fp**" is given, the dirserver is a v3 directory authority
416
417
418
419
    whose v3 long-term signing key has the fingerprint **fp**. Lastly,
    if an "ipv6=__address__:__orport__" flag is present, then the directory
    authority is listening for IPv6 connections on the indicated IPv6 address
    and OR Port. +
420
421
422
423
 +
    Tor will contact the authority at __address__:__port__ (the DirPort) to
    download directory documents. If an IPv6 address is supplied, Tor will
    also download directory documents at the IPv6 address on the DirPort. +
424
 +
425
426
    If no **DirAuthority** line is given, Tor will use the default directory
    authorities. NOTE: this option is intended for setting up a private Tor
427
428
429
430
    network with its own directory authorities. If you use it, you will be
    distinguishable from other users, because you won't believe the same
    authorities they do.

431
[[DirAuthorityFallbackRate]] **DirAuthorityFallbackRate** __NUM__::
432
433
434
    When configured to use both directory authorities and fallback
    directories, the directory authorities also work as fallbacks. They are
    chosen with their regular weights, multiplied by this number, which
435
436
    should be 1.0 or less. The default is less than 1, to reduce load on
    authorities. (Default: 0.1)
437

438
[[AlternateDirAuthority]] **AlternateDirAuthority** [__nickname__] [**flags**] __address__:__port__ __fingerprint__ +
439

440
[[AlternateBridgeAuthority]] **AlternateBridgeAuthority** [__nickname__] [**flags**] __address__:__port__ __ fingerprint__::
441
    These options behave as DirAuthority, but they replace fewer of the
442
    default directory authorities. Using
443
    AlternateDirAuthority replaces the default Tor directory authorities, but
444
445
    leaves the default bridge authorities in
    place.  Similarly,
446
    AlternateBridgeAuthority replaces the default bridge authority,
447
    but leaves the directory authorities alone.
448

449
[[DisableAllSwap]] **DisableAllSwap** **0**|**1**::
450
451
452
453
454
455
    If set to 1, Tor will attempt to lock all current and future memory pages,
    so that memory cannot be paged out. Windows, OS X and Solaris are currently
    not supported. We believe that this feature works on modern Gnu/Linux
    distributions, and that it should work on *BSD systems (untested). This
    option requires that you start your Tor as root, and you should use the
    **User** option to properly reduce Tor's privileges. (Default: 0)
456

457
[[DisableDebuggerAttachment]] **DisableDebuggerAttachment** **0**|**1**::
458
   If set to 1, Tor will attempt to prevent basic debugging attachment attempts
459
460
   by other processes. This may also keep Tor from generating core files if
   it crashes. It has no impact for users who wish to attach if they
461
462
463
464
465
466
467
468
469
   have CAP_SYS_PTRACE or if they are root.  We believe that this feature
   works on modern Gnu/Linux distributions, and that it may also work on *BSD
   systems (untested).  Some modern Gnu/Linux systems such as Ubuntu have the
   kernel.yama.ptrace_scope sysctl and by default enable it as an attempt to
   limit the PTRACE scope for all user processes by default. This feature will
   attempt to limit the PTRACE scope for Tor specifically - it will not attempt
   to alter the system wide ptrace scope as it may not even exist. If you wish
   to attach to Tor with a debugger such as gdb or strace you will want to set
   this to 0 for the duration of your debugging. Normal users should leave it
470
471
   on. Disabling this option while Tor is running is prohibited. (Default: 1)

472
[[FetchDirInfoEarly]] **FetchDirInfoEarly** **0**|**1**::
473
474
475
476
    If set to 1, Tor will always fetch directory information like other
    directory caches, even if you don't meet the normal criteria for fetching
    early. Normal users should leave it off. (Default: 0)

477
[[FetchDirInfoExtraEarly]] **FetchDirInfoExtraEarly** **0**|**1**::
478
479
480
481
482
    If set to 1, Tor will fetch directory information before other directory
    caches. It will attempt to download directory information closer to the
    start of the consensus period. Normal users should leave it off.
    (Default: 0)

483
[[FetchHidServDescriptors]] **FetchHidServDescriptors** **0**|**1**::
484
485
486
487
    If set to 0, Tor will never fetch any hidden service descriptors from the
    rendezvous directories. This option is only useful if you're using a Tor
    controller that handles hidden service fetches for you. (Default: 1)

488
[[FetchServerDescriptors]] **FetchServerDescriptors** **0**|**1**::
489
490
491
492
493
    If set to 0, Tor will never fetch any network status summaries or server
    descriptors from the directory servers. This option is only useful if
    you're using a Tor controller that handles directory fetches for you.
    (Default: 1)

494
[[FetchUselessDescriptors]] **FetchUselessDescriptors** **0**|**1**::
495
496
497
498
499
500
    If set to 1, Tor will fetch every non-obsolete descriptor from the
    authorities that it hears about. Otherwise, it will avoid fetching useless
    descriptors, for example for routers that are not running. This option is
    useful if you're using the contributed "exitlist" script to enumerate Tor
    nodes that exit to certain addresses. (Default: 0)

501
[[HTTPProxy]] **HTTPProxy** __host__[:__port__]::
502
503
504
505
    Tor will make all its directory requests through this host:port (or host:80
    if port is not specified), rather than connecting directly to any directory
    servers.

506
[[HTTPProxyAuthenticator]] **HTTPProxyAuthenticator** __username:password__::
507
508
509
510
511
    If defined, Tor will use this username:password for Basic HTTP proxy
    authentication, as in RFC 2617. This is currently the only form of HTTP
    proxy authentication that Tor supports; feel free to submit a patch if you
    want it to support others.

512
[[HTTPSProxy]] **HTTPSProxy** __host__[:__port__]::
513
514
515
516
517
518
    Tor will make all its OR (SSL) connections through this host:port (or
    host:443 if port is not specified), via HTTP CONNECT rather than connecting
    directly to servers. You may want to set **FascistFirewall** to restrict
    the set of ports you might try to connect to, if your HTTPS proxy only
    allows connecting to certain ports.

519
[[HTTPSProxyAuthenticator]] **HTTPSProxyAuthenticator** __username:password__::
520
521
522
523
524
    If defined, Tor will use this username:password for Basic HTTPS proxy
    authentication, as in RFC 2617. This is currently the only form of HTTPS
    proxy authentication that Tor supports; feel free to submit a patch if you
    want it to support others.

525
[[Sandbox]] **Sandbox** **0**|**1**::
526
    If set to 1, Tor will run securely through the use of a syscall sandbox.
527
    Otherwise the sandbox will be disabled. The option is currently an
528
529
    experimental feature. (Default: 0)

530
[[Socks4Proxy]] **Socks4Proxy** __host__[:__port__]::
531
532
533
    Tor will make all OR connections through the SOCKS 4 proxy at host:port
    (or host:1080 if port is not specified).

534
[[Socks5Proxy]] **Socks5Proxy** __host__[:__port__]::
535
536
537
    Tor will make all OR connections through the SOCKS 5 proxy at host:port
    (or host:1080 if port is not specified).

538
[[Socks5ProxyUsername]] **Socks5ProxyUsername** __username__ +
539

540
[[Socks5ProxyPassword]] **Socks5ProxyPassword** __password__::
541
542
543
544
    If defined, authenticate to the SOCKS 5 server using username and password
    in accordance to RFC 1929. Both username and password must be between 1 and
    255 characters.

545
546
547
548
549
[[SocksSocketsGroupWritable]] **SocksSocketsGroupWritable** **0**|**1**::
    If this option is set to 0, don't allow the filesystem group to read and
    write unix sockets (e.g. SocksSocket). If the option is set to 1, make
    the SocksSocket socket readable and writable by the default GID. (Default: 0)

550
[[KeepalivePeriod]] **KeepalivePeriod** __NUM__::
551
552
553
554
555
    To keep firewalls from expiring connections, send a padding keepalive cell
    every NUM seconds on open connections that are in use. If the connection
    has no open circuits, it will instead be closed after NUM seconds of
    idleness. (Default: 5 minutes)

556
[[Log]] **Log** __minSeverity__[-__maxSeverity__] **stderr**|**stdout**|**syslog**::
557
558
559
560
561
562
563
564
    Send all messages between __minSeverity__ and __maxSeverity__ to the standard
    output stream, the standard error stream, or to the system log. (The
    "syslog" value is only supported on Unix.) Recognized severity levels are
    debug, info, notice, warn, and err. We advise using "notice" in most cases,
    since anything more verbose may provide sensitive information to an
    attacker who obtains the logs. If only one severity level is given, all
    messages of that level or higher will be sent to the listed destination.

Nick Mathewson's avatar
Nick Mathewson committed
565
[[Log2]] **Log** __minSeverity__[-__maxSeverity__] **file** __FILENAME__::
566
567
568
569
570
    As above, but send log messages to the listed filename. The
    "Log" option may appear more than once in a configuration file.
    Messages are sent to all the logs that match their severity
    level.

Nick Mathewson's avatar
Nick Mathewson committed
571
[[Log3]] **Log** **[**__domain__,...**]**__minSeverity__[-__maxSeverity__] ... **file** __FILENAME__ +
572

Nick Mathewson's avatar
Nick Mathewson committed
573
[[Log4]] **Log** **[**__domain__,...**]**__minSeverity__[-__maxSeverity__] ... **stderr**|**stdout**|**syslog**::
574
575
576
577
    As above, but select messages by range of log severity __and__ by a
    set of "logging domains".  Each logging domain corresponds to an area of
    functionality inside Tor.  You can specify any number of severity ranges
    for a single log statement, each of them prefixed by a comma-separated
578
    list of logging domains.  You can prefix a domain with $$~$$ to indicate
579
580
581
582
583
584
585
586
587
588
    negation, and use * to indicate "all domains".  If you specify a severity
    range without a list of domains, it matches all domains. +
 +
    This is an advanced feature which is most useful for debugging one or two
    of Tor's subsystems at a time. +
 +
    The currently recognized domains are: general, crypto, net, config, fs,
    protocol, mm, http, app, control, circ, rend, bug, dir, dirserv, or, edge,
    acct, hist, and handshake.  Domain names are case-insensitive. +
 +
589
    For example, "`Log [handshake]debug [~net,~mm]info notice stdout`" sends
590
591
592
593
    to stdout: all handshake messages of any severity, all info-and-higher
    messages from domains other than networking and memory management, and all
    messages of severity notice or higher.

594
[[LogMessageDomains]] **LogMessageDomains** **0**|**1**::
595
596
597
598
    If 1, Tor includes message domains with each log message.  Every log
    message currently has at least one domain; most currently have exactly
    one.  This doesn't affect controller log messages. (Default: 0)

599
[[OutboundBindAddress]] **OutboundBindAddress** __IP__::
600
601
    Make all outbound connections originate from the IP address specified. This
    is only useful when you have multiple network interfaces, and you want all
602
603
604
605
    of Tor's outgoing connections to use a single one. This option may
    be used twice, once with an IPv4 address and once with an IPv6 address.
    This setting will be ignored for connections to the loopback addresses
    (127.0.0.0/8 and ::1).
606

607
[[PidFile]] **PidFile** __FILE__::
608
609
610
    On startup, write our PID to FILE. On clean shutdown, remove
    FILE.

611
[[ProtocolWarnings]] **ProtocolWarnings** **0**|**1**::
612
613
614
615
    If 1, Tor will log with severity \'warn' various cases of other parties not
    following the Tor specification. Otherwise, they are logged with severity
    \'info'. (Default: 0)

616
[[PredictedPortsRelevanceTime]] **PredictedPortsRelevanceTime** __NUM__::
rl1987's avatar
rl1987 committed
617
    Set how long, after the client has made an anonymized connection to a
618
619
620
    given port, we will try to make sure that we build circuits to
    exits that support that port. The maximum value for this option is 1
    hour. (Default: 1 hour)
621

622
[[RunAsDaemon]] **RunAsDaemon** **0**|**1**::
623
624
625
626
    If 1, Tor forks and daemonizes to the background. This option has no effect
    on Windows; instead you should use the --service command-line option.
    (Default: 0)

627
[[LogTimeGranularity]] **LogTimeGranularity** __NUM__::
628
629
    Set the resolution of timestamps in Tor's logs to NUM milliseconds.
    NUM must be positive and either a divisor or a multiple of 1 second.
630
631
632
633
    Note that this option only controls the granularity written by Tor to
    a file or console log.  Tor does not (for example) "batch up" log
    messages to affect times logged by a controller, times attached to
    syslog messages, or the mtime fields on log files.  (Default: 1 second)
634

Arlo Breault's avatar
Arlo Breault committed
635
[[TruncateLogFile]] **TruncateLogFile** **0**|**1**::
636
637
    If 1, Tor will overwrite logs at startup and in response to a HUP signal,
    instead of appending to them. (Default: 0)
Arlo Breault's avatar
Arlo Breault committed
638

Peter Palfrader's avatar
Peter Palfrader committed
639
640
641
642
[[SyslogIdentityTag]] **SyslogIdentityTag** __tag__::
    When logging to syslog, adds a tag to the syslog identity such that
    log entries are marked with "Tor-__tag__".  (Default: none)

643
[[SafeLogging]] **SafeLogging** **0**|**1**|**relay**::
644
645
646
647
648
649
650
651
652
653
    Tor can scrub potentially sensitive strings from log messages (e.g.
    addresses) by replacing them with the string [scrubbed]. This way logs can
    still be useful, but they don't leave behind personally identifying
    information about what sites a user might have visited. +
 +
    If this option is set to 0, Tor will not perform any scrubbing, if it is
    set to 1, all potentially sensitive strings are replaced. If it is set to
    relay, all log messages generated when acting as a relay are sanitized, but
    all messages generated when acting as a client are not. (Default: 1)

654
[[User]] **User** __UID__::
655
656
    On startup, setuid to this user and setgid to their primary group.

657
[[KeepBindCapabilities]] **KeepBindCapabilities** **0**|**1**|**auto**::
658
    On Linux, when we are started as root and we switch our identity using
659
    the **User** option, the **KeepBindCapabilities** option tells us whether to
660
661
662
663
664
    try to retain our ability to bind to low ports.  If this value is 1, we
    try to keep the capability; if it is 0 we do not; and if it is **auto**,
    we keep the capability only if we are configured to listen on a low port.
    (Default: auto.)

665
[[HardwareAccel]] **HardwareAccel** **0**|**1**::
666
667
668
    If non-zero, try to use built-in (static) crypto hardware acceleration when
    available. (Default: 0)

669
[[AccelName]] **AccelName** __NAME__::
670
671
672
673
    When using OpenSSL hardware crypto acceleration attempt to load the dynamic
    engine of this name. This must be used for any dynamic hardware engine.
    Names can be verified with the openssl engine command.

674
[[AccelDir]] **AccelDir** __DIR__::
675
676
677
    Specify this option if using dynamic hardware acceleration and the engine
    implementation library resides somewhere other than the OpenSSL default.

678
[[AvoidDiskWrites]] **AvoidDiskWrites** **0**|**1**::
679
680
681
682
    If non-zero, try to write to disk less frequently than we would otherwise.
    This is useful when running on flash memory or other media that support
    only a limited number of writes. (Default: 0)

683
[[CircuitPriorityHalflife]] **CircuitPriorityHalflife** __NUM1__::
684
685
686
687
688
689
690
691
692
    If this value is set, we override the default algorithm for choosing which
    circuit's cell to deliver or relay next. When the value is 0, we
    round-robin between the active circuits on a connection, delivering one
    cell from each in turn. When the value is positive, we prefer delivering
    cells from whichever connection has the lowest weighted cell count, where
    cells are weighted exponentially according to the supplied
    CircuitPriorityHalflife value (in seconds). If this option is not set at
    all, we use the behavior recommended in the current consensus
    networkstatus. This is an advanced option; you generally shouldn't have
693
    to mess with it. (Default: not set)
694

695
[[DisableIOCP]] **DisableIOCP** **0**|**1**::
696
697
698
699
    If Tor was built to use the Libevent's "bufferevents" networking code
    and you're running on Windows, setting this option to 1 will tell Libevent
    not to use the Windows IOCP networking API.  (Default: 1)

700
[[UserspaceIOCPBuffers]] **UserspaceIOCPBuffers** **0**|**1**::
701
702
703
704
705
706
    If IOCP is enabled (see DisableIOCP above), setting this option to 1
    will tell Tor to disable kernel-space TCP buffers, in order to avoid
    needless copy operations and try not to run out of non-paged RAM.
    This feature is experimental; don't use it yet unless you're eager to
    help tracking down bugs. (Default: 0)

707
[[UseFilteringSSLBufferevents]] **UseFilteringSSLBufferevents** **0**|**1**::
708
709
710
711
712
713
714
    Tells Tor to do its SSL communication using a chain of
    bufferevents: one for SSL and one for networking.  This option has no
    effect if bufferevents are disabled (in which case it can't turn on), or
    if IOCP bufferevents are enabled (in which case it can't turn off).  This
    option is useful for debugging only; most users shouldn't touch it.
    (Default: 0)

715
[[CountPrivateBandwidth]] **CountPrivateBandwidth** **0**|**1**::
716
717
718
719
720
    If this option is set, then Tor's rate-limiting applies not only to
    remote connections, but also to connections to private addresses like
    127.0.0.1 or 10.0.0.1.  This is mostly useful for debugging
    rate-limiting.  (Default: 0)

721
722
723
724
CLIENT OPTIONS
--------------

The following options are useful only for clients (that is, if
725
**SocksPort**, **TransPort**, **DNSPort**, or **NATDPort** is non-zero):
726

727
[[AllowInvalidNodes]] **AllowInvalidNodes** **entry**|**exit**|**middle**|**introduction**|**rendezvous**|**...**::
728
729
730
731
732
733
    If some Tor servers are obviously not working right, the directory
    authorities can manually mark them as invalid, meaning that it's not
    recommended you use them for entry or exit positions in your circuits. You
    can opt to use them in some circuit positions, though. The default is
    "middle,rendezvous", and other choices are not advised.

734
[[ExcludeSingleHopRelays]] **ExcludeSingleHopRelays** **0**|**1**::
735
736
737
    This option controls whether circuits built by Tor will include relays with
    the AllowSingleHopExits flag set to true. If ExcludeSingleHopRelays is set
    to 0, these relays will be included. Note that these relays might be at
738
739
740
    higher risk of being seized or observed, so they are not normally
    included.  Also note that relatively few clients turn off this option,
    so using these relays might make your client stand out.
741
742
    (Default: 1)

743
[[Bridge]] **Bridge** [__transport__] __IP__:__ORPort__ [__fingerprint__]::
744
745
    When set along with UseBridges, instructs Tor to use the relay at
    "IP:ORPort" as a "bridge" relaying into the Tor network. If "fingerprint"
746
    is provided (using the same format as for DirAuthority), we will verify that
747
748
    the relay running at that location has the right fingerprint. We also use
    fingerprint to look up the bridge descriptor at the bridge authority, if
749
750
    it's provided and if UpdateBridgesFromAuthority is set too.  +
 +
751
752
753
754
755
756
    If "transport" is provided, it must match a ClientTransportPlugin line. We
    then use that pluggable transport's proxy to transfer data to the bridge,
    rather than connecting to the bridge directly. Some transports use a
    transport-specific method to work out the remote address to connect to.
    These transports typically ignore the "IP:ORPort" specified in the bridge
    line.
757

758
[[LearnCircuitBuildTimeout]] **LearnCircuitBuildTimeout** **0**|**1**::
759
760
    If 0, CircuitBuildTimeout adaptive learning is disabled. (Default: 1)

761
[[CircuitBuildTimeout]] **CircuitBuildTimeout** __NUM__::
762

763
    Try for at most NUM seconds when building circuits. If the circuit isn't
764
765
766
    open in that time, give up on it. If LearnCircuitBuildTimeout is 1, this
    value serves as the initial value to use before a timeout is learned. If
    LearnCircuitBuildTimeout is 0, this value is the only value used.
767
    (Default: 60 seconds)
768

769
[[CircuitIdleTimeout]] **CircuitIdleTimeout** __NUM__::
770
771
772
773
774
    If we have kept a clean (never used) circuit around for NUM seconds, then
    close it. This way when the Tor client is entirely idle, it can expire all
    of its circuits, and then expire its TLS connections. Also, if we end up
    making a circuit that is not useful for exiting any of the requests we're
    receiving, it won't forever take up a slot in the circuit list. (Default: 1
775
    hour)
776

777
[[CircuitStreamTimeout]] **CircuitStreamTimeout** __NUM__::
778
779
780
781
782
    If non-zero, this option overrides our internal timeout schedule for how
    many seconds until we detach a stream from a circuit and try a new circuit.
    If your network is particularly slow, you might want to set this to a
    number like 60. (Default: 0)

783
[[ClientOnly]] **ClientOnly** **0**|**1**::
784
785
786
787
788
789
790
    If set to 1, Tor will not run as a relay or serve
    directory requests, even if the ORPort, ExtORPort, or DirPort options are
    set. (This config option is
    mostly unnecessary: we added it back when we were considering having
    Tor clients auto-promote themselves to being relays if they were stable
    and fast enough. The current behavior is simply that Tor is a client
    unless ORPort, ExtORPort, or DirPort are configured.) (Default: 0)
791

792
[[ExcludeNodes]] **ExcludeNodes** __node__,__node__,__...__::
793
    A list of identity fingerprints, country codes, and address
794
    patterns of nodes to avoid when building a circuit. Country codes are
795
    2-letter ISO3166 codes, and must
796
    be wrapped in braces; fingerprints may be preceded by a dollar sign.
797
    (Example:
798
    ExcludeNodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, \{cc}, 255.254.0.0/8) +
799
 +
800
801
802
803
804
805
    By default, this option is treated as a preference that Tor is allowed
    to override in order to keep working.
    For example, if you try to connect to a hidden service,
    but you have excluded all of the hidden service's introduction points,
    Tor will connect to one of them anyway.  If you do not want this
    behavior, set the StrictNodes option (documented below).  +
806
 +
807
808
809
    Note also that if you are a relay, this (and the other node selection
    options below) only affects your own circuits that Tor builds for you.
    Clients can still build circuits through you to any node.  Controllers
Nick Mathewson's avatar
Nick Mathewson committed
810
811
812
813
814
    can tell Tor to build circuits through any node. +
 +
    Country codes are case-insensitive. The code "\{??}" refers to nodes whose
    country can't be identified. No country code, including \{??}, works if
    no GeoIPFile can be loaded. See also the GeoIPExcludeUnknown option below.
815

816

817
[[ExcludeExitNodes]] **ExcludeExitNodes** __node__,__node__,__...__::
818
    A list of identity fingerprints, country codes, and address
819
820
    patterns of nodes to never use when picking an exit node---that is, a
    node that delivers traffic for you outside the Tor network.   Note that any
821
    node listed in ExcludeNodes is automatically considered to be part of this
822
823
824
    list too.  See
    the **ExcludeNodes** option for more information on how to specify
    nodes. See also the caveats on the "ExitNodes" option below.
825

826
[[GeoIPExcludeUnknown]] **GeoIPExcludeUnknown** **0**|**1**|**auto**::
827
    If this option is set to 'auto', then whenever any country code is set in
828
    ExcludeNodes or ExcludeExitNodes, all nodes with unknown country (\{??} and
Nick Mathewson's avatar
Nick Mathewson committed
829
    possibly \{A1}) are treated as excluded as well. If this option is set to
830
    '1', then all unknown countries are treated as excluded in ExcludeNodes
831
    and ExcludeExitNodes.  This option has no effect when a GeoIP file isn't
832
833
    configured or can't be found.  (Default: auto)

834
[[ExitNodes]] **ExitNodes** __node__,__node__,__...__::
835
    A list of identity fingerprints, country codes, and address
836
    patterns of nodes to use as exit node---that is, a
837
838
    node that delivers traffic for you outside the Tor network.  See
    the **ExcludeNodes** option for more information on how to specify nodes. +
839
 +
840
841
842
843
    Note that if you list too few nodes here, or if you exclude too many exit
    nodes with ExcludeExitNodes, you can degrade functionality.  For example,
    if none of the exits you list allows traffic on port 80 or 443, you won't
    be able to browse the web. +
844
 +
845
846
847
    Note also that not every circuit is used to deliver traffic outside of
    the Tor network.  It is normal to see non-exit circuits (such as those
    used to connect to hidden services, those that do directory fetches,
Roger Dingledine's avatar
Roger Dingledine committed
848
849
    those used for relay reachability self-tests, and so on) that end
    at a non-exit node.  To
850
    keep a node from being used entirely, see ExcludeNodes and StrictNodes. +
851
 +
852
853
    The ExcludeNodes option overrides this option: any node listed in both
    ExitNodes and ExcludeNodes is treated as excluded. +
854
 +
Roger Dingledine's avatar
Roger Dingledine committed
855
856
    The .exit address notation, if enabled via AllowDotExit, overrides
    this option.
857

858
[[EntryNodes]] **EntryNodes** __node__,__node__,__...__::
859
    A list of identity fingerprints and country codes of nodes
860
    to use for the first hop in your normal circuits.
861
    Normal circuits include all
862
863
864
    circuits except for direct connections to directory servers.  The Bridge
    option overrides this option; if you have configured bridges and
    UseBridges is 1, the Bridges are used as your entry nodes. +
865
 +
866
    The ExcludeNodes option overrides this option: any node listed in both
867
868
    EntryNodes and ExcludeNodes is treated as excluded. See
    the **ExcludeNodes** option for more information on how to specify nodes.
869

870
[[StrictNodes]] **StrictNodes** **0**|**1**::
871
872
873
874
875
876
    If StrictNodes is set to 1, Tor will treat the ExcludeNodes option as a
    requirement to follow for all the circuits you generate, even if doing so
    will break functionality for you.  If StrictNodes is set to 0, Tor will
    still try to avoid nodes in the ExcludeNodes list, but it will err on the
    side of avoiding unexpected errors.  Specifically, StrictNodes 0 tells
    Tor that it is okay to use an excluded node when it is *necessary* to
Roger Dingledine's avatar
Roger Dingledine committed
877
    perform relay reachability self-tests, connect to
878
879
880
    a hidden service, provide a hidden service to a client, fulfill a .exit
    request, upload directory information, or download directory information.
    (Default: 0)
881

882
[[FascistFirewall]] **FascistFirewall** **0**|**1**::
883
884
885
886
887
888
889
    If 1, Tor will only create outgoing connections to ORs running on ports
    that your firewall allows (defaults to 80 and 443; see **FirewallPorts**).
    This will allow you to run Tor as a client behind a firewall with
    restrictive policies, but will not allow you to run as a server behind such
    a firewall. If you prefer more fine-grained control, use
    ReachableAddresses instead.

890
[[FirewallPorts]] **FirewallPorts** __PORTS__::
891
892
893
894
    A list of ports that your firewall allows you to connect to. Only used when
    **FascistFirewall** is set. This option is deprecated; use ReachableAddresses
    instead. (Default: 80, 443)

895
[[ReachableAddresses]] **ReachableAddresses** __ADDR__[/__MASK__][:__PORT__]...::
896
897
898
899
900
901
902
903
    A comma-separated list of IP addresses and ports that your firewall allows
    you to connect to. The format is as for the addresses in ExitPolicy, except
    that "accept" is understood unless "reject" is explicitly provided. For
    example, \'ReachableAddresses 99.0.0.0/8, reject 18.0.0.0/8:80, accept
    \*:80' means that your firewall allows connections to everything inside net
    99, rejects port 80 connections to net 18, and accepts connections to port
    80 otherwise. (Default: \'accept \*:*'.)

904
[[ReachableDirAddresses]] **ReachableDirAddresses** __ADDR__[/__MASK__][:__PORT__]...::
905
906
907
908
909
910
    Like **ReachableAddresses**, a list of addresses and ports. Tor will obey
    these restrictions when fetching directory information, using standard HTTP
    GET requests. If not set explicitly then the value of
    **ReachableAddresses** is used. If **HTTPProxy** is set then these
    connections will go through that proxy.

911
[[ReachableORAddresses]] **ReachableORAddresses** __ADDR__[/__MASK__][:__PORT__]...::
912
913
914
915
916
917
918
919
920
921
922
923
    Like **ReachableAddresses**, a list of addresses and ports. Tor will obey
    these restrictions when connecting to Onion Routers, using TLS/SSL. If not
    set explicitly then the value of **ReachableAddresses** is used. If
    **HTTPSProxy** is set then these connections will go through that proxy. +
 +
    The separation between **ReachableORAddresses** and
    **ReachableDirAddresses** is only interesting when you are connecting
    through proxies (see **HTTPProxy** and **HTTPSProxy**). Most proxies limit
    TLS connections (which Tor uses to connect to Onion Routers) to port 443,
    and some limit HTTP GET requests (which Tor uses for fetching directory
    information) to port 80.

924
[[HidServAuth]] **HidServAuth** __onion-address__ __auth-cookie__ [__service-name__]::
925
926
927
928
929
930
    Client authorization for a hidden service. Valid onion addresses contain 16
    characters in a-z2-7 plus ".onion", and valid auth cookies contain 22
    characters in A-Za-z0-9+/. The service name is only used for internal
    purposes, e.g., for Tor controllers. This option may be used multiple times
    for different hidden services. If a hidden service uses authorization and
    this option is not set, the hidden service is not accessible. Hidden
931
    services can be configured to require authorization using the
932
933
    **HiddenServiceAuthorizeClient** option.

934
[[CloseHSClientCircuitsImmediatelyOnTimeout]] **CloseHSClientCircuitsImmediatelyOnTimeout** **0**|**1**::
935
936
937
938
939
940
941
942
943
    If 1, Tor will close unfinished hidden service client circuits
    which have not moved closer to connecting to their destination
    hidden service when their internal state has not changed for the
    duration of the current circuit-build timeout.  Otherwise, such
    circuits will be left open, in the hope that they will finish
    connecting to their destination hidden services.  In either case,
    another set of introduction and rendezvous circuits for the same
    destination hidden service will be launched. (Default: 0)

944
[[CloseHSServiceRendCircuitsImmediatelyOnTimeout]] **CloseHSServiceRendCircuitsImmediatelyOnTimeout** **0**|**1**::
945
946
947
948
949
950
951
    If 1, Tor will close unfinished hidden-service-side rendezvous
    circuits after the current circuit-build timeout.  Otherwise, such
    circuits will be left open, in the hope that they will finish
    connecting to their destinations.  In either case, another
    rendezvous circuit for the same destination client will be
    launched. (Default: 0)

952
[[LongLivedPorts]] **LongLivedPorts** __PORTS__::
953
954
955
    A list of ports for services that tend to have long-running connections
    (e.g. chat and interactive shells). Circuits for streams that use these
    ports will contain only high-uptime nodes, to reduce the chance that a node
956
957
958
959
    will go down before the stream is finished. Note that the list is also
    honored for circuits (both client and service side) involving hidden
    services whose virtual port is in this list. (Default: 21, 22, 706,
    1863, 5050, 5190, 5222, 5223, 6523, 6667, 6697, 8300)
960

961
[[MapAddress]] **MapAddress** __address__ __newaddress__::
Nick Mathewson's avatar
Nick Mathewson committed
962
    When a request for address arrives to Tor, it will transform to newaddress
963
    before processing it. For example, if you always want connections to
Nick Mathewson's avatar
Nick Mathewson committed
964
    www.example.com to exit via __torserver__ (where __torserver__ is the
965
    fingerprint of the server), use "MapAddress www.example.com
Nick Mathewson's avatar
Nick Mathewson committed
966
967
968
969
    www.example.com.torserver.exit". If the value is prefixed with a
    "\*.", matches an entire domain. For example, if you
    always want connections to example.com and any if its subdomains
    to exit via
970
    __torserver__ (where __torserver__ is the fingerprint of the server), use
Nick Mathewson's avatar
Nick Mathewson committed
971
972
973
974
    "MapAddress \*.example.com \*.example.com.torserver.exit". (Note the
    leading "*." in each part of the directive.) You can also redirect all
    subdomains of a domain to a single address. For example, "MapAddress
    *.example.com www.example.com". +
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
 +
    NOTES:

    1. When evaluating MapAddress expressions Tor stops when it hits the most
    recently added expression that matches the requested address. So if you
    have the following in your torrc, www.torproject.org will map to 1.1.1.1:

     MapAddress www.torproject.org 2.2.2.2
     MapAddress www.torproject.org 1.1.1.1

    2. Tor evaluates the MapAddress configuration until it finds no matches. So
    if you have the following in your torrc, www.torproject.org will map to
    2.2.2.2:

      MapAddress 1.1.1.1 2.2.2.2
      MapAddress www.torproject.org 1.1.1.1

    3. The following MapAddress expression is invalid (and will be
Nick Mathewson's avatar
Nick Mathewson committed
993
    ignored) because you cannot map from a specific address to a wildcard
994
995
996
997
    address:

      MapAddress www.torproject.org *.torproject.org.torserver.exit

Nick Mathewson's avatar
Nick Mathewson committed
998
    4. Using a wildcard to match only part of a string (as in *ample.com) is
999
    also invalid.
1000

For faster browsing, not all history is shown. View entire blame