the other half of my patch. more coming later.
[tor.git] / doc / tor.1.in
blob24375da77b2ff26031eb744e133931e73c4ca921
1 .TH TOR 1 "January 2006" "TOR"
2 .SH NAME
3 tor \- The second-generation onion router
4 .SH SYNOPSIS
5 .B tor
6 [\fIOPTION value\fR]...
7 .SH DESCRIPTION
8 .I tor
9 is a connection-oriented anonymizing communication
10 service. Users choose a source-routed path through a set of nodes, and
11 negotiate a "virtual circuit" through the network, in which each node
12 knows its predecessor and successor, but no others. Traffic flowing down
13 the circuit is unwrapped by a symmetric key at each node, which reveals
14 the downstream node.
15 .PP
16 Basically \fItor\fR provides a distributed network of servers ("onion
17 routers"). Users bounce their TCP streams -- web traffic, ftp, ssh, etc --
18 around the routers, and recipients, observers, and even the routers
19 themselves have difficulty tracking the source of the stream.
20 .SH OPTIONS
21 \fB-h, -help\fP
22 Display a short help message and exit.
23 .LP
24 .TP
25 \fB-f \fR\fIFILE\fP
26 FILE contains further "option value" pairs. (Default: @CONFDIR@/torrc)
27 .LP
28 .TP
29 \fB--hash-password\fP
30 Generates a hashed password for control port access.
31 .LP
32 .TP
33 \fB--list-fingerprint\fP
34 Generate your keys and output your nickname and fingerprint.
35 .LP
36 .TP
37 \fB--verify-config\fP
38 Verify the configuration file is valid.
39 .LP
40 .TP
41 \fB--nt-service\fP
42 \fB--service [install|remove|start|stop]\fP
43 Manage the Tor Windows NT/2000/XP service.  Current instructions can 
44 be found at http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#WinNTService
45 .LP
46 .TP
47 \fB--list-torrc-options\fP
48 List all valid options.
49 .LP
50 .TP
51 \fB--version\fP
52 Display Tor version.
53 .LP
54 .TP
55 Other options can be specified either on the command-line (\fI--option
56 value\fR), or in the configuration file (\fIoption value\fR).
57 Options are case-insensitive.
58 .LP
59 .TP
60 \fBBandwidthRate \fR\fIN\fR \fBbytes\fR|\fBKB\fR|\fBMB\fR|\fBGB\fR|\fBTB\fP
61 A token bucket limits the average incoming bandwidth on this node to
62 the specified number of bytes per second. (Default: 3 MB)
63 .LP
64 .TP
65 \fBBandwidthBurst \fR\fIN\fR \fBbytes\fR|\fBKB\fR|\fBMB\fR|\fBGB\fR|\fBTB\fP
66 Limit the maximum token bucket size (also known as the burst) to the
67 given number of bytes. (Default: 6 MB)
68 .LP
69 .TP
70 \fBMaxAdvertisedBandwidth \fR\fIN\fR \fBbytes\fR|\fBKB\fR|\fBMB\fR|\fBGB\fR|\fBTB\fP
71 If set, we will not advertise more than this amount of bandwidth for our
72 BandwidthRate. Server operators who want to reduce the number of clients
73 who ask to build circuits through them (since this is proportional to
74 advertised bandwidth rate) can thus reduce the CPU demands on their
75 server without impacting network performance.
76 .LP
77 .TP
78 \fBConnLimit \fR\fINUM\fP
79 The minimum number of file descriptors that must be available to
80 the Tor process before it will start. Tor will ask the OS for as
81 many file descriptors as the OS will allow (you can find this
82 by "ulimit -H -n"). If this number is less than ConnLimit, then
83 Tor will refuse to start.
85 You probably don't need to adjust this. It has no effect on
86 Windows since that platform lacks getrlimit(). (Default: 1000)
87 .LP
88 .TP
89 \fBControlPort \fR\fIPort\fP
90 If set, Tor will accept connections on
91 this port, and allow those connections to control the Tor process using the
92 Tor Control Protocol (described in control-spec.txt).  Note: unless you also
93 specify one of \fBHashedControlPassword\fP or \fBCookieAuthentication\fP,
94 setting this option will cause Tor to allow any process on the local host to
95 control it.
96 .LP
97 .TP
98 \fBControlListenAddress \fR\fIIP\fR[:\fIPORT\fR]\fP
99 Bind the controller listener to this address. If you specify a port,
100 bind to this port rather than the one specified in ControlPort. We
101 strongly recommend that you leave this alone unless you know what you're
102 doing, since giving attackers access to your control listener is really
103 dangerous. (Default: 127.0.0.1)
104 This directive can be specified multiple times to bind to multiple
105 addresses/ports.
108 \fBHashedControlPassword \fR\fIhashed_password\fP
109 Don't allow any connections on the control port except when the other process
110 knows the password whose one-way hash is \fIhashed_password\fP.  You can
111 compute the hash of a password by running "tor --hash-password
112 \fIpassword\fP".
115 \fBCookieAuthentication \fR\fB0\fR|\fB1\fP
116 If this option is set to 1, don't allow any connections on the control port
117 except when the connecting process knows the contents of a file named
118 "control_auth_cookie", which Tor will create in its data directory.  This
119 authentication methods should only be used on systems with good filesystem
120 security. (Default: 0)
123 \fBDataDirectory \fR\fIDIR\fP
124 Store working data in DIR (Default: @LOCALSTATEDIR@/lib/tor)
127 \fBDirServer \fR[\fInickname\fR] [\fBflags\fR] \fIaddress\fR\fB:\fIport fingerprint\fP
128 Use a nonstandard authoritative directory server at the provided
129 address and port, with the specified key fingerprint.  This option can
130 be repeated many times, for multiple authoritative directory
131 servers.  Flags are separated by spaces, and determine what kind of an
132 authority this directory is.  By default, every authority is authoritative
133 for current ("v2")-style directories, unless the "no-v2" flag is given.  If the "v1" flags is provided, Tor will use this server as an
134 authority for old-style (v1) directories as well.  (Only directory mirrors
135 care about this.)  Tor will use this server as an authority for hidden
136 service information if the "hs" flag is set, or if the "v1" flag is set and
137 the "no-hs" flag is \fBnot\fP set.  If a flag "orport=\fBport\fR" is given,
138 Tor will use the given port when opening encrypted tunnels to the
139 dirserver.
140 If no \fBdirserver\fP line is given, Tor will use the default
141 directory servers.  NOTE: this option is intended
142 for setting up a private Tor network with its own directory authorities.  If
143 you use it, you will be distinguishable from other users, because you won't
144 believe the same authorities they do.
147 \fBFetchHidServDescriptors \fR\fB0\fR|\fB1\fR\fP
148 If set to 0, Tor will never fetch any hidden service descriptors from
149 the rendezvous directories. This option is only useful if you're using
150 a Tor controller that handles hidserv fetches for you.
151 (Default: 1)
154 \fBFetchServerDescriptors \fR\fB0\fR|\fB1\fR\fP
155 If set to 0, Tor will never fetch any network status summaries or server
156 descriptors from the directory servers. This option is only useful if
157 you're using a Tor controller that handles directory fetches for you.
158 (Default: 1)
161 \fBFetchUselessDescriptors \fR\fB0\fR|\fB1\fR\fP
162 If set to 1, Tor will fetch every non-obsolete descriptor from the
163 authorities that it hears about. Otherwise, it will avoid fetching
164 useless descriptors, for example for routers that are not running.
165 This option is useful if you're using the contributed "exitlist"
166 script to enumerate Tor nodes that exit to certain addresses.
167 (Default: 0)
170 \fBGroup \fR\fIGID\fP
171 On startup, setgid to this group.
174 \fBHttpProxy\fR \fIhost\fR[:\fIport\fR]\fP
175 Tor will make all its directory requests through this host:port
176 (or host:80 if port is not specified),
177 rather than connecting directly to any directory servers.
180 \fBHttpProxyAuthenticator\fR \fIusername:password\fP
181 If defined, Tor will use this username:password for Basic Http proxy
182 authentication, as in RFC 2617. This is currently the only form of
183 Http proxy authentication that Tor supports; feel free to submit a
184 patch if you want it to support others.
187 \fBHttpsProxy\fR \fIhost\fR[:\fIport\fR]\fP
188 Tor will make all its OR (SSL) connections through this host:port
189 (or host:443 if port is not specified), via HTTP CONNECT rather than
190 connecting directly to servers.  You may want to set \fBFascistFirewall\fR
191 to restrict the set of ports you might try to connect to, if your Https
192 proxy only allows connecting to certain ports.
195 \fBHttpsProxyAuthenticator\fR \fIusername:password\fP
196 If defined, Tor will use this username:password for Basic Https proxy
197 authentication, as in RFC 2617. This is currently the only form of
198 Https proxy authentication that Tor supports; feel free to submit a
199 patch if you want it to support others.
202 \fBKeepalivePeriod \fR\fINUM\fP
203 To keep firewalls from expiring connections, send a padding keepalive
204 cell every NUM seconds on open connections that are in use. If the
205 connection has no open circuits, it will instead be closed after NUM
206 seconds of idleness. (Default: 5 minutes)
209 \fBLog \fR\fIminSeverity\fR[-\fImaxSeverity\fR] \fBstderr\fR|\fBstdout\fR|\fBsyslog\fR\fP
210 Send all messages between \fIminSeverity\fR and \fImaxSeverity\fR to
211 the standard output stream, the standard error stream, or to the system
212 log. (The "syslog" value is only supported on Unix.)  Recognized
213 severity levels are debug, info, notice, warn, and err.  We advise using
214 "notice" in most cases, since anything more verbose may provide sensitive
215 information to an attacker who obtains the logs.  If only one
216 severity level is given, all messages of that level or higher will be
217 sent to the listed destination.
220 \fBLog \fR\fIminSeverity\fR[-\fImaxSeverity\fR] \fBfile\fR \fIFILENAME\fP
221 As above, but send log messages to the listed filename.  The "Log"
222 option may appear more than once in a configuration file.  Messages
223 are sent to all the logs that match their severity level.
226 \fBOutboundBindAddress \fR\fIIP\fP
227 Make all outbound connections originate from the IP address specified.  This
228 is only useful when you have multiple network interfaces, and you want all
229 of Tor's outgoing connections to use a single one.
232 \fBPidFile \fR\fIFILE\fP
233 On startup, write our PID to FILE. On clean shutdown, remove FILE.
236 \fBProtocolWarnings \fR\fB0\fR|\fB1\fR\fP
237 If 1, Tor will log with severity 'warn' various cases of other parties
238 not following the Tor specification. Otherwise, they are logged with
239 severity 'info'. (Default: 0)
242 \fBRunAsDaemon \fR\fB0\fR|\fB1\fR\fP
243 If 1, Tor forks and daemonizes to the background. This option has
244 no effect on Windows; instead you should use the --service command-line
245 option. (Default: 0)
248 \fBSafeLogging \fR\fB0\fR|\fB1\fP
249 If 1, Tor replaces potentially sensitive strings in the logs
250 (e.g. addresses) with the string [scrubbed]. This way logs can still be
251 useful, but they don't leave behind personally identifying information
252 about what sites a user might have visited. (Default: 1)
255 \fBUser \fR\fIUID\fP
256 On startup, setuid to this user.
259 \fBHardwareAccel \fR\fB0\fR|\fB1\fP
260 If non-zero, try to use crypto hardware acceleration when
261 available. This is untested and probably buggy. (Default: 0)
264 \fBAvoidDiskWrites \fR\fB0|\fR\fB1\fP
265 If non-zero, try to write to disk less frequently than we would otherwise.
266 This is useful when running on flash memory or other media that support only
267 a limited number of writes.  (Default: 0)
270 \fBTunnelDirConns \fR\fB0|\fR\fB1\fP
271 If non-zero, when a directory server we contact supports it, we will
272 build a one-hop circuit and make an encrypted connection via its
273 ORPort. (Default: 0)
276 \fBPreferTunneledDirConns \fR\fB0|\fR\fB1\fP
277 If non-zero, we will avoid directory servers that don't support tunneled
278 directory connections, when possible. (Default: 0)
280 .SH CLIENT OPTIONS
282 The following options are useful only for clients (that is, if \fBSocksPort\fP is non-zero):
285 \fBAllowInvalidNodes\fR \fBentry\fR|\fBexit\fR|\fBmiddle\fR|\fBintroduction\fR|\fBrendezvous\fR|...\fP
286 If some Tor servers are obviously not working right, the directory
287 authorities can manually mark them as invalid, meaning that it's not
288 recommended you use them for entry or exit positions in your circuits. You
289 can opt to use them in some circuit positions, though. The default is
290 "middle,rendezvous", and other choices are not advised.
293 \fBCircuitBuildTimeout \fR\fINUM\fP
294 Try for at most NUM seconds when building circuits. If the circuit
295 isn't open in that time, give up on it.
296 (Default: 1 minute.)
299 \fBCircuitIdleTimeout \fR\fINUM\fP
300 If we have keept a clean (never used) circuit around for NUM seconds,
301 then close it. This way when the Tor client is entirely idle, it can
302 expire all of its circuits, and then expire its TLS connections. Also,
303 if we end up making a circuit that is not useful for exiting any of
304 the requests we're receiving, it won't forever take up a slot in the
305 circuit list.
306 (Default: 1 hour.)
309 \fBClientOnly \fR\fB0\fR|\fB1\fR\fP
310 If set to 1, Tor will under no circumstances run as a server. The default
311 is to run as a client unless ORPort is configured.  (Usually,
312 you don't need to set this; Tor is pretty smart at figuring out whether
313 you are reliable and high-bandwidth enough to be a useful server.)
314 (Default: 0)
317 \fBExcludeNodes \fR\fInickname\fR,\fInickname\fR,\fI...\fP
318 A list of nodes to never use when building a circuit.
321 \fBEntryNodes \fR\fInickname\fR,\fInickname\fR,\fI...\fP
322 A list of preferred nodes to use for the first hop in the circuit.
323 These are treated only as preferences unless StrictEntryNodes (see
324 below) is also set.
327 \fBExitNodes \fR\fInickname\fR,\fInickname\fR,\fI...\fP
328 A list of preferred nodes to use for the last hop in the circuit.
329 These are treated only as preferences unless StrictExitNodes (see
330 below) is also set.
333 \fBStrictEntryNodes \fR\fB0\fR|\fB1\fR\fP
334 If 1, Tor will never use any nodes besides those listed in "EntryNodes" for
335 the first hop of a circuit.
338 \fBStrictExitNodes \fR\fB0\fR|\fB1\fR\fP
339 If 1, Tor will never use any nodes besides those listed in "ExitNodes" for
340 the last hop of a circuit.
343 \fBFascistFirewall \fR\fB0\fR|\fB1\fR\fP
344 If 1, Tor will only create outgoing connections to ORs running on ports that
345 your firewall allows (defaults to 80 and 443; see \fBFirewallPorts\fR).  This will
346 allow you to run Tor as a client behind a firewall with restrictive policies,
347 but will not allow you to run as a server behind such a firewall.
348 This option is deprecated; use
349 ReachableAddresses instead.
352 \fBFirewallPorts \fR\fIPORTS\fP
353 A list of ports that your firewall allows you to connect to.  Only
354 used when \fBFascistFirewall\fR is set. This option is deprecated; use
355 ReachableAddresses instead. (Default: 80, 443)
358 \fBReachableAddresses \fR\fIADDR\fP[\fB/\fP\fIMASK\fP][:\fIPORT\fP]...\fP
359 A comma-separated list of IP addresses and ports that your firewall allows you
360 to connect to. The format is as
361 for the addresses in ExitPolicy, except that "accept" is understood
362 unless "reject" is explicitly provided.  For example, 'ReachableAddresses
363 99.0.0.0/8, reject 18.0.0.0/8:80, accept *:80' means that your
364 firewall allows connections to everything inside net 99, rejects port
365 80 connections to net 18, and accepts connections to port 80 otherwise.
366 (Default: 'accept *:*'.)
369 \fBReachableDirAddresses \fR\fIADDR\fP[\fB/\fP\fIMASK\fP][:\fIPORT\fP]...\fP
370 Like \fBReachableAddresses\fP, a list of addresses and ports.  Tor will obey
371 these restrictions when fetching directory information, using standard HTTP
372 GET requests. If not set explicitly then the value of \fBReachableAddresses\fP
373 is used.  If \fBHttpProxy\fR is set then these connections will go through that
374 proxy.
377 \fBReachableORAddresses \fR\fIADDR\fP[\fB/\fP\fIMASK\fP][:\fIPORT\fP]...\fP
378 Like \fBReachableAddresses\fP, a list of addresses and ports.  Tor will obey
379 these restrictions when connecting to Onion Routers, using TLS/SSL.  If not set
380 explicitly then the value of \fBReachableAddresses\fP is used. If
381 \fBHttpsProxy\fR is set then these connections will go through that proxy.
383 The separation between \fBReachableORAddresses\fP and
384 \fBReachableDirAddresses\fP is only interesting when you are connecting through
385 proxies (see \fBHttpProxy\fR and \fBHttpsProxy\fR).  Most proxies limit TLS
386 connections (which Tor uses to connect to Onion Routers) to port 443, and some
387 limit HTTP GET requests (which Tor uses for fetching directory information) to
388 port 80.
391 \fBLongLivedPorts \fR\fIPORTS\fP
392 A list of ports for services that tend to have long-running connections
393 (e.g. chat and interactive shells). Circuits for streams that use these
394 ports will contain only high-uptime nodes, to reduce the chance that a
395 node will go down before the stream is finished.
396 (Default: 21, 22, 706, 1863, 5050, 5190, 5222, 5223, 6667, 6697, 8300)
399 \fBMapAddress\fR \fIaddress\fR \fInewaddress\fR
400 When a request for address arrives to Tor, it will rewrite it to
401 newaddress before processing it. For example, if you always want
402 connections to www.indymedia.org to exit via \fItorserver\fR (where
403 \fItorserver\fR is the nickname of the server),
404 use "MapAddress www.indymedia.org www.indymedia.org.torserver.exit".
407 \fBNewCircuitPeriod \fR\fINUM\fP
408 Every NUM seconds consider whether to build a new circuit. (Default: 30 seconds)
411 \fBMaxCircuitDirtiness \fR\fINUM\fP
412 Feel free to reuse a circuit that was first used at most NUM seconds ago,
413 but never attach a new stream to a circuit that is too old.
414 (Default: 10 minutes)
417 \fBNodeFamily \fR\fInickname\fR,\fInickname\fR,\fI...\fP
418 The named Tor servers constitute a "family" of similar or co-administered
419 servers, so never use any two of them in the same circuit. Defining a
420 NodeFamily is only needed when a server doesn't list the family itself
421 (with MyFamily). This option can be used multiple times.
424 \fBEnforceDistinctSubnets \fR\fB0\fR|\fB1\fR\fP
425 If 1, Tor will not put two servers whose IP addresses are "too
426 close" on the same circuit.  Currently, two addresses are
427 "too close" if they lie in the same /16 range. (Default: 1)
429 .\" \fBPathlenCoinWeight \fR\fI0.0-1.0\fP
430 .\" Paths are 3 hops plus a geometric distribution centered around this coinweight.
431 .\" Must be >=0.0 and <1.0. (Default: 0.3) NOT USED CURRENTLY
432 .\" .TP
435 \fBRendNodes \fR\fInickname\fR,\fInickname\fR,\fI...\fP
436 A list of preferred nodes to use for the rendezvous point, if possible.
439 \fBRendExcludeNodes \fR\fInickname\fR,\fInickname\fR,\fI...\fP
440 A list of nodes to never use when choosing a rendezvous point.
443 \fBSocksPort \fR\fIPORT\fP
444 Advertise this port to listen for connections from Socks-speaking
445 applications.  Set this to 0 if you don't want to allow application
446 connections. (Default: 9050)
449 \fBSocksListenAddress \fR\fIIP\fR[:\fIPORT\fR]\fP
450 Bind to this address to listen for connections from Socks-speaking
451 applications. (Default: 127.0.0.1) You can also specify a port
452 (e.g. 192.168.0.1:9100).
453 This directive can be specified multiple times to bind to multiple
454 addresses/ports.
457 \fBSocksPolicy \fR\fIpolicy\fR,\fIpolicy\fR,\fI...\fP
458 Set an entrance policy for this server, to limit who can connect to the
459 Socks ports.
460 The policies have the same form as exit policies below.
463 \fBSocksTimeout \fR\fINUM\fP
464 Let a socks connection wait NUM seconds handshaking, and NUM seconds
465 unattached waiting for an appropriate circuit, before we fail it.
466 (Default: 2 minutes.)
469 \fBTestVia \fR\fInickname\fR,\fInickname\fR,\fI...\fP
470 A list of nodes to prefer for your middle hop when building testing
471 circuits. This option is mainly for debugging reachability problems.
474 \fBTrackHostExits \fR\fIhost\fR,\fI.domain\fR,\fI...\fR\fP
475 For each value in the comma separated list, Tor will track recent connections
476 to hosts that match this value and attempt to
477 reuse the same exit node for each. If the value is prepended with a '.', it is
478 treated as matching an entire domain. If one of the values is just a '.', it
479 means match everything. This option is useful if you frequently connect to
480 sites that will expire all your authentication cookies (ie log you out) if
481 your IP address changes. Note that this option does have the disadvantage of
482 making it more clear that a given history is
483 associated with a single user. However, most people who would wish to observe
484 this will observe it through cookies or other protocol-specific means anyhow.
487 \fBTrackHostExitsExpire \fR\fINUM\fP
488 Since exit servers go up and down, it is desirable to expire the association
489 between host and exit server after NUM seconds. The default
490 is 1800 seconds (30 minutes).
493 \fBUseEntryGuards \fR\fB0\fR|\fB1\fR\fP
494 If this option is set to 1, we pick a few long-term entry servers, and
495 try to stick with them.  This is desirable because
496 constantly changing servers increases the odds that an adversary who owns
497 some servers will observe a fraction of your paths.
498 (Defaults to 1.)
501 \fBNumEntryGuards \fR\fINUM\fP
502 If UseEntryGuards is set to 1, we will try to pick a total of NUM routers
503 as long-term entries for our circuits.
504 (Defaults to 3.)
507 \fBSafeSocks \fR\fB0\fR|\fB1\fR\fP
508 When this option is enabled, Tor will reject application connections that
509 use unsafe variants of the socks protocol -- ones that only provide an
510 IP address, meaning the application is doing a DNS resolve first.
511 Specifically, these are socks4 and socks5 when not doing remote DNS.
512 (Defaults to 0.)
515 \fBTestSocks \fR\fB0\fR|\fB1\fR\fP
516 When this option is enabled, Tor will make a notice-level log entry for
517 each connection to the Socks port indicating whether the request used
518 a safe socks protocol or an unsafe one (see above entry on SafeSocks).
519 This helps to determine whether an application using Tor is possibly
520 leaking DNS requests.
521 (Default: 0)
524 \fBVirtualAddrNetwork \fR\fIAddress\fB/\fIbits\fP
525 When a controller asks for a virtual (unused) address with the
526 'MAPADDRESS' command, Tor picks an unassigned address from this range.
527 (Default: 127.192.0.0/10)
530 \fBAllowNonRFC953Hostnames \fR\fB0\fR|\fB1\fR\fP
531 When this option is disabled, Tor blocks hostnames containing illegal
532 characters (like @ and :) rather than sending them to an exit node to be
533 resolved.  This helps trap accidental attempts to resolve URLs and so on.
534 (Default: 0)
537 \fBFastFirstHopPK \fR\fB0\fR|fB1\fR\fP
538 When this option is enabled and we aren't running as a server, Tor
539 skips the public key step for the first hop of creating circuits.  This is
540 safe since we have already used TLS to authenticate the server and to
541 establish forward-secure keys.  Turning this option off makes circuit
542 building slower.
543 (Default: 1)
545 .SH SERVER OPTIONS
547 The following options are useful only for servers (that is, if \fBORPort\fP is non-zero):
550 \fBAddress \fR\fIaddress\fP
551 The IP or fqdn of this server (e.g. moria.mit.edu). You can leave this
552 unset, and Tor will guess your IP.
555 \fBAssumeReachable \fR\fB0\fR|\fB1\fR\fP
556 This option is used when bootstrapping a new Tor network. If set to 1,
557 don't do self-reachability testing; just upload your server descriptor
558 immediately. If \fBAuthoritativeDirectory\fP is also set, this option
559 instructs the dirserver to bypass remote reachability testing too and
560 list all connected servers as running.
563 \fBContactInfo \fR\fIemail_address\fP
564 Administrative contact information for server. This line might get
565 picked up by spam harvesters, so you may want to obscure the fact
566 that it's an email address.
569 \fBExitPolicy \fR\fIpolicy\fR,\fIpolicy\fR,\fI...\fP
570 Set an exit policy for this server. Each policy is of the form
571 "\fBaccept\fP|\fBreject\fP \fIADDR\fP[\fB/\fP\fIMASK\fP]\fB[:\fP\fIPORT\fP]".
572 If \fB/\fP\fIMASK\fP is omitted then this policy just applies to the host
573 given.  Instead of giving a host or network you can also use "\fB*\fP" to
574 denote the universe (0.0.0.0/0).  \fIPORT\fP can be a single port number,
575 an interval of ports "\fIFROM_PORT\fP\fB-\fP\fITO_PORT\fP", or "\fB*\fP".
576 If \fIPORT\fP is omitted, that means "\fB*\fP".
578 For example, "accept 18.7.22.69:*,reject 18.0.0.0/8:*,accept *:*" would
579 reject any traffic destined for MIT except for web.mit.edu, and
580 accept anything else.
582 To specify all internal and link-local networks (including 0.0.0.0/8,
583 169.254.0.0/16, 127.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, and
584 172.16.0.0/12), you can use the "private" alias instead of an address.
585 These addresses are rejected by default (at the beginning of your
586 exit policy) unless you set the ExitPolicyRejectPrivate config option
587 to 0. For example, once you've done that, you could allow HTTP to
588 127.0.0.1 and block all other connections to internal networks with
589 "accept
590 127.0.0.1:80,reject private:*".  See RFC 1918 and RFC 3330 for more
591 details about internal and reserved IP address space.
593 This directive can be specified multiple times so you don't have to put
594 it all on one line.
596 Policies are considered first to last, and the first match wins. If
597 you want to _replace_ the default exit policy, end your exit policy with
598 either a reject *:* or an accept *:*. Otherwise, you're _augmenting_
599 (prepending to) the default exit policy. The default exit policy is:
600 .PD 0
601 .RS 12
602 .IP "reject *:25"
603 .IP "reject *:119"
604 .IP "reject *:135-139"
605 .IP "reject *:445"
606 .IP "reject *:465"
607 .IP "reject *:563"
608 .IP "reject *:587"
609 .IP "reject *:1214"
610 .IP "reject *:4661-4666"
611 .IP "reject *:6346-6429"
612 .IP "reject *:6699"
613 .IP "reject *:6881-6999"
614 .IP "accept *:*"
619 \fBExitPolicyRejectPrivate \fR\fB0\fR|\fB1\fR\fP
620 Reject all private (local) networks at the beginning of your exit
621 policy. See above entry on ExitPolicy. (Default: 1)
624 \fBMaxOnionsPending \fR\fINUM\fP
625 If you have more than this number of onionskins queued for decrypt, reject new ones. (Default: 100)
628 \fBMyFamily \fR\fInickname\fR,\fInickname\fR,\fI...\fP
629 Declare that this Tor server is controlled or administered by a group
630 or organization identical or similar to that of the other named servers.
631 When two servers both declare that they are in the same 'family', Tor clients
632 will not use them in the same circuit.  (Each server only needs to list the
633 other servers in its family; it doesn't need to list itself, but it won't hurt.)
636 \fBNickname \fR\fIname\fP
637 Set the server's nickname to 'name'. Nicknames must be between 1
638 and 19 characters inclusive, and must contain only the characters
639 [a-zA-Z0-9].
642 \fBNumCPUs \fR\fInum\fP
643 How many processes to use at once for decrypting onionskins. (Default: 1)
646 \fBORPort \fR\fIPORT\fP
647 Advertise this port to listen for connections from Tor clients and servers.
650 \fBORListenAddress \fR\fIIP\fR[:\fIPORT\fR]\fP
651 Bind to this IP address to listen for connections from Tor clients and
652 servers. If you specify a port, bind to this port rather than the one
653 specified in ORPort. (Default: 0.0.0.0)
654 This directive can be specified multiple times to bind to multiple
655 addresses/ports.
658 \fBPublishServerDescriptor \fR\fB0\fR|\fB1\fR\fP
659 If set to 0, Tor will act as a server if you have an ORPort
660 defined, but it will not publish its descriptor to the dirservers. This
661 option is useful if you're testing out your server, or if you're using
662 a Tor controller that handles directory publishing for you.
663 (Default: 1)
666 \fBRedirectExit \fR\fIpattern target\fP
667 Whenever an outgoing connection tries to connect to one of a given set
668 of addresses, connect to \fItarget\fP (an \fIaddress:port\fP pair) instead.
669 The address
670 pattern is given in the same format as for an exit policy.  The
671 address translation applies after exit policies are applied.  Multiple
672 \fBRedirectExit\fP options can be used: once any one has matched
673 successfully, no subsequent rules are considered.  You can specify that no
674 redirection is to be performed on a given set of addresses by using the
675 special target string "pass", which prevents subsequent rules from being
676 considered.
679 \fBShutdownWaitLength\fR \fINUM\fP
680 When we get a SIGINT and we're a server, we begin shutting down: we close
681 listeners and start refusing new circuits. After \fBNUM\fP seconds,
682 we exit. If we get a second SIGINT, we exit immediately.  (Default:
683 30 seconds)
686 \fBAccountingMax \fR\fIN\fR \fBbytes\fR|\fBKB\fR|\fBMB\fR|\fBGB\fR|\fBTB\fP
687 Never send more than the specified number of bytes in a given
688 accounting period, or receive more than that number in the period.
689 For example, with AccountingMax set to 1 GB, a server could send 900 MB
690 and receive 800 MB and continue running. It will only hibernate once one
691 of the two reaches 1 GB.
692 When the number of bytes is exhausted, Tor will hibernate until some
693 time in the next accounting period.  To prevent all servers from
694 waking at the same time, Tor will also wait until a random point in
695 each period before waking up.  If you have bandwidth cost issues,
696 enabling hibernation is preferable to setting a low bandwidth, since it
697 provides users with a collection of fast servers that are up some of
698 the time, which is more useful than a set of slow servers that are
699 always "available".
702 \fBAccountingStart \fR\fBday\fR|\fBweek\fR|\fBmonth\fR [\fIday\fR] \fIHH:MM\fR\fP
703 Specify how long accounting periods last.  If \fBmonth\fP is given,
704 each accounting period runs from the time \fIHH:MM\fR on the
705 \fIday\fRth day of one month to the same day and time of the next.
706 (The day must be between 1 and 28.)  If \fBweek\fP is given, each
707 accounting period runs from the time \fIHH:MM\fR of the \fIday\fRth
708 day of one week to the same day and time of the next week, with Monday
709 as day 1 and Sunday as day 7.  If \fBday\fR is given, each accounting
710 period runs from the time \fIHH:MM\fR each day to the same time on the
711 next day.  All times are local, and given in 24-hour time.  (Defaults to
712 "month 1 0:00".)
715 \fBServerDNSResolvConfFile \fR\fIfilename\fP
716 Overrides the default DNS configuration with the configuration in
717 \fIfilename\fP.  The file format is the same as the standard Unix
718 "\fBresolv.conf\fP" file (7).  This option, like all other
719 ServerDNS options, only affects name lookup that your server does on
720 behalf of clients.  Also, it only takes effect if Tor was built with
721 eventdns support.  (Defaults to use the system DNS configuration.)
724 \fBServerDNSSearchDomains \fR\fB0\fR|\fB1\fR\fP
725 If set to \fB1\fP, then we will search for addresses in the local search
726 domain.  For example, if this system is configured to believe it is in
727 "example.com", and a client tries to connect to "www", the client will be
728 connected to "www.example.com".
729 This option only affects name lookup that your server does on
730 behalf of clients, and only takes effect if Tor was build with
731 eventdns support.
732 (Defaults to "0".)
735 \fBServerDNSDetectHijacking \fR\fB0\fR|\fB1\fR\fP
736 When this option is set to 1, we will test periodically to determine whether
737 our local nameservers have been configured to hijack failing DNS requests
738 (usually to an advertising site).  If they are, we will attempt to correct
739 this.
740 This option only affects name lookup that your server does on
741 behalf of clients, and only takes effect if Tor was build with
742 eventdns support.
743 (Defaults to "1".)
746 \fBServerDNSTestAddresses \fR\fIaddress\fR,\fIaddress\fR,\fI...\fP
747 When we're detecting DNS hijacking, make sure that these \fIvalid\fP
748 addresses aren't getting redirected.  If they are, then our DNS is
749 completely useless, and we'll reset our exit policy to "reject *:*".
750 This option only affects name lookup that your server does on
751 behalf of clients, and only takes effect if Tor was build with
752 eventdns support.
753 (Defaults to "www.google.com, www.mit.edu, www.yahoo.com,
754 www.slashdot.org".)
757 \fBServerDNSAllowNonRFC953Hostnames \fR\fB0\fR|\fB1\fR\fP
758 When this option is disabled, Tor does not try to resolve hostnames
759 containing illegal characters (like @ and :) rather than sending them to an
760 exit node to be resolved.  This helps trap accidental attempts to resolve
761 URLs and so on.
762 This option only affects name lookup that your server does on
763 behalf of clients, and only takes effect if Tor was build with
764 eventdns support.
765 (Default: 0)
767 .SH DIRECTORY SERVER OPTIONS
769 The following options are useful only for directory servers (that is, if \fBDirPort\fP is non-zero):
772 \fBAuthoritativeDirectory \fR\fB0\fR|\fB1\fR\fP
773 When this option is set to 1, Tor operates as an authoritative
774 directory server.  Instead of caching the directory, it generates its
775 own list of good servers, signs it, and sends that to the clients.
776 Unless the clients already have you listed as a trusted directory, you
777 probably do not want to set this option.  Please coordinate with the other
778 admins at tor-ops@freehaven.net if you think you should be a directory.
781 \fBV1AuthoritativeDirectory \fR\fB0\fR|\fB1\fR\fP
782 When this option is set in addition to \fBAuthoritativeDirectory\fP, Tor also
783 generates a version 1 directory (for Tor clients up to 0.1.0.x).
784 (As of Tor 0.1.1.12 every (v2) authoritative directory still provides most of
785 the v1 directory functionality, even without this option set to 1.
786 This however is expected to change in the future.)
789 \fBVersioningAuthoritativeDirectory \fR\fB0\fR|\fB1\fR\fP
790 When this option is set to 1, Tor adds information on
791 which versions of Tor are still believed safe for use to
792 the published directory.  Each version 1 authority is
793 automatically a versioning authority; version 2 authorities
794 provide this service optionally.  See \fBRecommendedVersions\fP,
795 \fBRecommendedClientVersions\fP, and \fBRecommendedServerVersions\fP.
798 \fBNamingAuthoritativeDirectory \fR\fB0\fR|\fB1\fR\fP
799 When this option is set to 1, then the server advertises that it has
800 opinions about nickname-to-fingerprint bindings.  It will include these
801 opinions in its published network-status pages, by listing servers with
802 the flag "Named" if a correct binding between that nickname and
803 fingerprint has been registered with the dirserver.  Naming dirservers
804 will refuse to accept or publish descriptors that contradict a
805 registered binding.  See \fBapproved-routers\fP in the \fBFILES\fP
806 section below.
809 \fBHSAuthoritativeDir \fR\fB0\fR|\fB1\fR\fP
810 When this option is set in addition to \fBAuthoritativeDirectory\fP, Tor also
811 accepts and serves hidden service descriptors. (Default: 0)
814 \fBDirPort \fR\fIPORT\fP
815 Advertise the directory service on this port.
818 \fBDirListenAddress \fR\fIIP\fR[:\fIPORT\fR]\fP
819 Bind the directory service to this address. If you specify a port, bind
820 to this port rather than the one specified in DirPort. (Default: 0.0.0.0)
821 This directive can be specified multiple times to bind to multiple
822 addresses/ports.
825 \fBDirPolicy \fR\fIpolicy\fR,\fIpolicy\fR,\fI...\fP
826 Set an entrance policy for this server, to limit who can connect to the
827 directory ports.
828 The policies have the same form as exit policies above.
831 \fBRecommendedVersions \fR\fISTRING\fP
832 STRING is a comma-separated list of Tor versions currently believed
833 to be safe. The list is included in each directory, and nodes which
834 pull down the directory learn whether they need to upgrade.  This
835 option can appear multiple times: the values from multiple lines are
836 spliced together.
837 When this is set then
838 \fBVersioningAuthoritativeDirectory\fP should be set too.
841 \fBRecommendedClientVersions \fR\fISTRING\fP
842 STRING is a comma-separated list of Tor versions currently believed
843 to be safe for clients to use.  This information is included in version 2
844 directories.  If this is not set then the value of \fBRecommendedVersions\fR
845 is used.
846 When this is set then
847 \fBVersioningAuthoritativeDirectory\fP should be set too.
850 \fBRecommendedServerVersions \fR\fISTRING\fP
851 STRING is a comma-separated list of Tor versions currently believed
852 to be safe for servers to use.  This information is included in version 2
853 directories.  If this is not set then the value of \fBRecommendedVersions\fR
854 is used.
855 When this is set then
856 \fBVersioningAuthoritativeDirectory\fP should be set too.
859 \fBDirAllowPrivateAddresses \fR\fB0\fR|\fB1\fR\fP
860 If set to 1, Tor will accept router descriptors with arbitrary "Address"
861 elements. Otherwise, if the address is not an IP or is a private IP,
862 it will reject the router descriptor. Defaults to 0.
865 \fBAuthDirBadExit \fR\fIAddressPattern\fR...\fP
866 Authoritative directories only.  A set of address patterns for servers that
867 will be listed as bad exits in any network status document this authority
868 publishes, if \fBAuthDirListBadExits\fR is set.
871 \fBAuthDirInvalid \fR\fIAddressPattern\fR...\fP
872 Authoritative directories only. A set of address patterns for servers that
873 will never be listed as "valid" in any network status document that this
874 authority publishes.
877 \fBAuthDirReject \fR\fIAddressPattern\fR...\fP
878 Authoritative directories only.  A set of address patterns for servers that
879 will never be listed at all in any network status document that this
880 authority publishes, or accepted as an OR address in any descriptor submitted
881 for publication by this authority.
884 \fBAuthDirListBadExits \fR\fB0\fR|\fB1\fR\fP
885 Authoritative directories only.  If set to 1, this directory has
886 some opinion about which nodes are unsuitable as exit nodes.  (Do not
887 set this to 1 unless you plan to list nonfunctioning exits as bad;
888 otherwise, you are effectively voting in favor of every declared exit
889 as an exit.)
892 \fBAuthDirRejectUnlisted \fR\fB0\fR|\fB1\fR\fP
893 Authoritative directories only.  If set to 1, the directory server
894 rejects all uploaded server descriptors that aren't explicitly listed
895 in the fingerprints file. This acts as a "panic button" if we get
896 Sybiled. (Default: 0)
898 .SH HIDDEN SERVICE OPTIONS
900 The following options are used to configure a hidden service.
903 \fBHiddenServiceDir \fR\fIDIRECTORY\fP
904 Store data files for a hidden service in DIRECTORY.  Every hidden
905 service must have a separate directory.  You may use this option multiple
906 times to specify multiple services.
909 \fBHiddenServicePort \fR\fIVIRTPORT \fR[\fITARGET\fR]\fP
910 Configure a virtual port VIRTPORT for a hidden service.  You may use this
911 option multiple times; each time applies to the service using the most recent
912 hiddenservicedir.  By default, this option maps the virtual port to the
913 same port on 127.0.0.1.  You may override the target port, address, or both
914 by specifying a target of addr, port, or addr:port.
917 \fBHiddenServiceNodes \fR\fInickname\fR,\fInickname\fR,\fI...\fP
918 If possible, use the specified nodes as introduction points for the hidden
919 service. If this is left unset, Tor will be smart and pick some reasonable
920 ones; most people can leave this unset.
923 \fBHiddenServiceExcludeNodes \fR\fInickname\fR,\fInickname\fR,\fI...\fP
924 Do not use the specified nodes as introduction points for the hidden
925 service. In normal use there is no reason to set this.
928 \fBPublishHidServDescriptors \fR\fB0\fR|\fB1\fR\fP
929 If set to 0, Tor will run any hidden services you configure, but it won't
930 advertise them to the rendezvous directory. This option is only useful
931 if you're using a Tor controller that handles hidserv publishing for you.
932 (Default: 1)
935 \fBRendPostPeriod \fR\fIN\fR \fBseconds\fR|\fBminutes\fR|\fBhours\fR|\fBdays\fR|\fBweeks\fP
936 Every time the specified period elapses, Tor uploads any rendezvous
937 service descriptors to the directory servers.  This information is also
938 uploaded whenever it changes.  (Default: 20 minutes)
940 .\" UNDOCUMENTED
941 .\" ignoreversion
943 .SH SIGNALS
944 Tor catches the following signals:
947 \fBSIGTERM\fR
948 Tor will catch this, clean up and sync to disk if necessary, and exit.
951 \fBSIGINT\fR
952 Tor clients behave as with SIGTERM; but Tor servers will do a controlled
953 slow shutdown, closing listeners and waiting 30 seconds before exiting.
954 (The delay can be configured with the ShutdownWaitLength config option.)
957 \fBSIGHUP\fR
958 The signal instructs Tor to reload its configuration (including closing
959 and reopening logs), fetch a new directory, and kill and restart its
960 helper processes if applicable.
963 \fBSIGUSR1\fR
964 Log statistics about current connections, past connections, and
965 throughput.
968 \fBSIGUSR2\fR
969 Switch all logs to loglevel debug. You can go back to the old loglevels
970 by sending a SIGHUP.
973 \fBSIGCHLD\fR
974 Tor receives this signal when one of its helper processes has exited,
975 so it can clean up.
978 \fBSIGPIPE\fR
979 Tor catches this signal and ignores it.
982 \fBSIGXFSZ\fR
983 If this signal exists on your platform, Tor catches and ignores it.
985 .SH FILES
988 .B @CONFDIR@/torrc
989 The configuration file, which contains "option value" pairs.
992 .B @LOCALSTATEDIR@/lib/tor/
993 The tor process stores keys and other data here.
996 .B \fIDataDirectory\fP/cached-status/*
997 The most recently downloaded network status document for each authority.  Each file holds one such document; the filenames are the hexadecimal identity key fingerprints of the directory authorities.
1000 .B \fIDataDirectory\fB/cached-routers\fR and \fBcached-routers.new\fR
1001 These files hold downloaded router statuses.  Some routers may appear more than once; if so, the most recently published descriptor is used.  The ".new" file is an append-only journal; when it gets too large, all entries are merged into a new cached-routers file.
1004 .B \fIDataDirectory\fP/state
1005 A set of persistent key-value mappings.  These are documented in the file.  These include:
1006 .PD 0
1007 .RS 5
1008 .IP "- The current entry guards and their status."
1009 .IP "- The current bandwidth accounting values (unused so far; see below)."
1010 .IP "- When the file was last written"
1011 .IP "- What version of Tor generated the state file"
1012 .IP "- A short history of bandwidth usage, as produced in the router descriptors."
1017 .B \fIDataDirectory\fP/bw_accounting
1018 Used to track bandwidth accounting values (when the current period starts and ends; how much has been read and written so far this period).  This file is obsolete, and the data is now stored in the 'state' file as well.  Only used when bandwidth accounting is enabled.
1021 .B \fIDataDirectory\fP/control_auth_cookie
1022 Used for cookie authentication with the controller. Regenerated on startup.  See control-spec.txt for details.  Only used when cookie authentication is enabled.
1025 .B \fIDataDirectory\fP/keys/*
1026 Only used by servers.  Holds identity keys and onion keys.
1029 .B \fIDataDirectory\fP/fingerprint
1030 Only used by servers.  Holds the fingerprint of the server's identity key.
1033 .B \fIDataDirectory\fP/approved-routers
1034 Only for naming authoritative directory servers (see \fBNamingAuthoritativeDirectory\fP).  This file lists nickname to identity bindings.  Each line lists a nickname and a fingerprint separated by whitespace.  See your \fBfingerprint\fP file in the \fIDataDirectory\fP for an example line.  If the nickname is \fB!reject\fP then descriptors from the given identity (fingerprint) are rejected by this server. If it is \fB!invalid\fP then descriptors are accepted but marked in the directory as not valid, that is, not recommended.
1037 .B \fIHiddenServiceDirectory\fP/hostname 
1038 The <base32-encoded-fingerprint>.onion domain name for this hidden service.
1041 .B \fIHiddenServiceDirectory\fP/private_key 
1042 The private key for this hidden service.
1043 .SH SEE ALSO
1044 .BR privoxy (1),
1045 .BR tsocks (1),
1046 .BR torify (1)
1048 .BR http://tor.eff.org/
1050 .SH BUGS
1051 Plenty, probably. Tor is still in development. Please report them.
1052 .SH AUTHORS
1053 Roger Dingledine <arma@mit.edu>, Nick Mathewson <nickm@alum.mit.edu>.