diff options
Diffstat (limited to 'man5/opentracker.conf.5')
| -rw-r--r-- | man5/opentracker.conf.5 | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/man5/opentracker.conf.5 b/man5/opentracker.conf.5 new file mode 100644 index 0000000..67e624f --- /dev/null +++ b/man5/opentracker.conf.5 | |||
| @@ -0,0 +1,143 @@ | |||
| 1 | .Dd 2026-10-28 | ||
| 2 | .Dt opentracker.conf 5 | ||
| 3 | .Os Unix | ||
| 4 | .Sh NAME | ||
| 5 | .Nm opentracker.conf | ||
| 6 | .Nd configuration file for opentracker | ||
| 7 | .Sh SYNOPSIS | ||
| 8 | .Nm | ||
| 9 | .Sh DESCRIPTION | ||
| 10 | The | ||
| 11 | .Nm | ||
| 12 | configuration file specifies various options for configuring the behavior of the opentracker program. | ||
| 13 | .Pp | ||
| 14 | Lines starting with '#' are comments and are ignored. Options are specified as 'keyword value' pairs. | ||
| 15 | .Pp | ||
| 16 | The following options are available: | ||
| 17 | .Pp | ||
| 18 | .Bl -tag -width ".It access.proxy" -compact | ||
| 19 | .It listen.tcp_udp Ar address | ||
| 20 | Specifies an address opentracker will listen on for both TCP and UDP connections. If none are specified, opentracker listens on 0.0.0.0:6969 by default. Can be added more than once. | ||
| 21 | .Pp | ||
| 22 | .It listen.tcp Ar address | ||
| 23 | Specifies the address opentracker will listen on for TCP connections. Can be added more than once. | ||
| 24 | .Pp | ||
| 25 | .It listen.udp Ar address | ||
| 26 | Specifies the address opentracker will listen on for UDP connections. Can be added more than once. | ||
| 27 | .Pp | ||
| 28 | A listen statement may carry options after the address, as in | ||
| 29 | .Dl listen.udp 10.0.0.5:6969 workers=4 shared | ||
| 30 | where | ||
| 31 | .Cm workers Ns = Ns Ar count | ||
| 32 | sets the worker count for that socket alone and is ignored for TCP, and | ||
| 33 | .Cm shared | ||
| 34 | permits another process to bind the same address. | ||
| 35 | .Pp | ||
| 36 | .It listen.udp.workers Ar threads | ||
| 37 | Specifies how many threads will be spawned to handle UDP requests, for every | ||
| 38 | listen statement that does not carry a | ||
| 39 | .Cm workers | ||
| 40 | option of its own. Defaults to 1. A count of 0 serves UDP from the event loop, | ||
| 41 | in the thread that also serves TCP. See | ||
| 42 | .Sx TUNING | ||
| 43 | before raising it. | ||
| 44 | .Pp | ||
| 45 | .It listen.tcp.workers Ar threads | ||
| 46 | Specifies how many threads accept and answer HTTP connections, for every | ||
| 47 | listen statement that does not carry a | ||
| 48 | .Cm workers | ||
| 49 | option of its own. Defaults to 0, which serves them from the event loop. See | ||
| 50 | .Sx TUNING | ||
| 51 | before raising it. | ||
| 52 | .Pp | ||
| 53 | .It listen.shared Ar boolean | ||
| 54 | Permits another process to bind the same address, for every listen statement | ||
| 55 | that does not carry a | ||
| 56 | .Cm shared | ||
| 57 | option of its own. Defaults to 0, and is useful only where a second tracker is | ||
| 58 | deliberately run on the same address. | ||
| 59 | .Pp | ||
| 60 | .It access.whitelist Ar path/to/whitelist | ||
| 61 | Specifies the path to the whitelist file containing all torrent hashes that opentracker will serve. Use this option if opentracker runs in a non-open mode. | ||
| 62 | .Pp | ||
| 63 | .It access.blacklist Ar path/to/blacklist | ||
| 64 | Specifies the path to the blacklist file containing all torrent hashes that opentracker will not serve. Use this option if opentracker was compiled to allow blacklisting. | ||
| 65 | .Pp | ||
| 66 | .It access.fifo_add Ar path/to/adder.fifo | ||
| 67 | Specifies the path to the FIFO (named pipe) used for dynamic changesets to accesslists. Info hashes written to this FIFO will be added to the main accesslist file. | ||
| 68 | .Pp | ||
| 69 | .It access.fifo_delete Ar path/to/deleter.fifo | ||
| 70 | Specifies the path to the FIFO (named pipe) used for dynamic changesets to accesslists. Info hashes written to this FIFO will be removed from the main accesslist file. | ||
| 71 | .Pp | ||
| 72 | .It access.stats Ar ip_address_or_network | ||
| 73 | Specifies the IP address or network in CIDR notation allowed to fetch stats from opentracker. | ||
| 74 | .Pp | ||
| 75 | .It access.stats_path Ar path | ||
| 76 | Specifies the path to the stats location. You can configure opentracker to appear anywhere on your tracker. Defaults to /stats. | ||
| 77 | .Pp | ||
| 78 | .It access.proxy Ar ip_address_or_network | ||
| 79 | Specifies the IP address or network of the reverse proxies. Opentracker will take the X-Forwarded-For address instead of the source IP address. Can be added more than once. | ||
| 80 | .Pp | ||
| 81 | .It livesync.cluster.listen Ar ip_address:port | ||
| 82 | Specifies the IP address and port opentracker will listen on for incoming live sync packets to keep a cluster of opentrackers synchronized. | ||
| 83 | .Pp | ||
| 84 | .It livesync.cluster.node_ip Ar ip_address | ||
| 85 | Specifies one trusted IP address for sync between trackers running in a cluster. Can be added more than once. | ||
| 86 | .Pp | ||
| 87 | .It tracker.rootdir Ar path | ||
| 88 | Specifies the directory opentracker will chroot/chdir to. All black/white list files must be located in this directory. | ||
| 89 | .Pp | ||
| 90 | .It tracker.user Ar username | ||
| 91 | Specifies the user opentracker will setuid to after binding to potentially privileged ports. | ||
| 92 | .Pp | ||
| 93 | .It tracker.redirect_url Ar URL | ||
| 94 | Specifies the URL opentracker will redirect to in response to a "GET / HTTP" request. | ||
| 95 | .El | ||
| 96 | .Sh TUNING | ||
| 97 | A worker is a thread that blocks in a read until a datagram arrives. Where the | ||
| 98 | kernel spreads arriving datagrams over a group of sockets bound to one address, | ||
| 99 | opentracker binds one socket per worker and throughput rises with the worker | ||
| 100 | count. Linux does so, and FreeBSD since 12.0. Where a kernel does not, every | ||
| 101 | worker reads the same socket and they contend for its receive queue, so more | ||
| 102 | than one worker costs throughput. opentracker asks at start up and binds a | ||
| 103 | group only where the answer is yes. | ||
| 104 | .Pp | ||
| 105 | .Pa tests/udp_scaling.py | ||
| 106 | in the source distribution sweeps the setting against a running tracker. | ||
| 107 | Measure on the machine that will carry the traffic. | ||
| 108 | .Pp | ||
| 109 | A TCP worker accepts a connection and answers it on its own stack, without | ||
| 110 | the event loop seeing it at all; only a connection it cannot finish is handed | ||
| 111 | over. One worker serves less than none, because accepting leaves the event | ||
| 112 | loop's thread without anything gained in return, so the setting is worth | ||
| 113 | either 0 or at least 2. | ||
| 114 | .Pa tests/http_load.c | ||
| 115 | in the source distribution drives the tracker over HTTP to measure it. | ||
| 116 | .Pp | ||
| 117 | On FreeBSD the | ||
| 118 | .Xr accf_data 9 | ||
| 119 | filter has the kernel hold a new connection until data arrives on it, so the | ||
| 120 | tracker is woken once with the request already there. opentracker uses it | ||
| 121 | wherever it is available; enable it with | ||
| 122 | .Cm options ACCEPT_FILTER_DATA | ||
| 123 | in the kernel or | ||
| 124 | .Va kld_list Ns = Ns Qq accf_data | ||
| 125 | in | ||
| 126 | .Xr rc.conf 5 . | ||
| 127 | .Sh EXAMPLES | ||
| 128 | To specify the address opentracker will listen on for both TCP and UDP connections: | ||
| 129 | .Dl listen.tcp_udp 0.0.0.0:6969 | ||
| 130 | .Pp | ||
| 131 | To specify the address opentracker will listen on for TCP connections: | ||
| 132 | .Dl listen.tcp 0.0.0.0 | ||
| 133 | .Pp | ||
| 134 | To specify the address opentracker will listen on for UDP connections: | ||
| 135 | .Dl listen.udp 0.0.0.0:6969 | ||
| 136 | .Pp | ||
| 137 | .Sh SEE ALSO | ||
| 138 | .Xr opentracker 1 | ||
| 139 | .Pp | ||
| 140 | .Sh AUTHOR | ||
| 141 | .An Dirk Engling | ||
| 142 | .Aq Mt erdgeist@erdgeist.org | ||
| 143 | .Pp | ||
