6b7762ddd4c8f27a565f50bc3576425dd7c41f3c
[quix0rs-apt-p2p.git] / debian / apt-dht.conf.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4   <!ENTITY dhfirstname "<firstname>Cameron</firstname>">
5   <!ENTITY dhsurname   "<surname>Dale</surname>">
6   <!-- Please adjust the date whenever revising the manpage. -->
7   <!ENTITY dhdate      "<date>February 17, 2008</date>">
8   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
9        allowed: see man(7), man(1). -->
10   <!ENTITY dhsection   "<manvolnum>5</manvolnum>">
11   <!ENTITY dhemail     "<email>camrdale@gmail.com</email>">
12   <!ENTITY dhusername  "Cameron Dale">
13   <!ENTITY dhucpackage "<refentrytitle>apt-dht.conf</refentrytitle>">
14   <!ENTITY dhpackage   "apt-dht">
15
16   <!ENTITY debian      "<productname>Debian</productname>">
17   <!ENTITY gnu         "<acronym>GNU</acronym>">
18   <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
19 ]>
20
21 <refentry>
22   <refentryinfo>
23     <address>
24       &dhemail;
25     </address>
26     <author>
27       &dhfirstname;
28       &dhsurname;
29     </author>
30     <copyright>
31       <year>2008</year>
32       <holder>&dhusername;</holder>
33     </copyright>
34     &dhdate;
35   </refentryinfo>
36   <refmeta>
37     &dhucpackage;
38
39     &dhsection;
40   </refmeta>
41
42   <refnamediv>
43     <refname>&dhpackage;</refname>
44
45     <refpurpose>configuration file for &dhpackage;</refpurpose>
46   </refnamediv>
47
48   <refsect1>
49     <title>DESCRIPTION</title>
50
51     <para>Configuration information for &dhpackage; is searched for in the following order, with later
52       entries overriding former ones:
53       <OrderedList>
54         <ListItem><para>/etc/apt-dht/apt-dht.conf</para></ListItem>
55         <ListItem><para>${HOME}/.apt-dht/apt-dht.conf</para></ListItem>
56         <ListItem><para>the location specified by the config-file parameter</para></ListItem>
57       </OrderedList>
58     </para>
59     
60   </refsect1>
61   <refsect1>
62     <title>FORMAT</title>
63
64     <para>&dhpackage; has a structure similar to Microsoft Windows INI files.
65         The configuration file consists of sections, led by a ``[section]'' header and followed
66         by ``name = value'' or ``name: value'' entries, with continuations in the style of RFC 822
67         (values can span multiple lines by starting the subsequent lines with one or more spaces).
68         Some values indicate times, in which case a suffix of 'd' for
69         days, 'h' for hours, 'm' for minutes, and 's' for seconds can be used.
70         Boolean values can be '1', 'yes', 'true', and 'on' to evaluate to True,
71         or '0', 'no', 'false', and 'off' to evaluate to false.
72         Note that leading whitespace is removed from values, and case is not important.
73         Lines beginning with "#" or ";" are ignored and may be used to provide comments.</para>
74     
75   </refsect1>
76   <refsect1>
77     <title>VARIABLES</title>
78       <para>There are 2 required sections in the config file. The first is the DEFAULT section, providing
79         variables for the configuration of the main application. The second is the section that provides
80         variables for the configuration of the DHT.</para>
81         
82       <refsect2>
83         <title>DEFAULT</title>
84
85         <variablelist>
86           <varlistentry>
87             <term><option>PORT = <replaceable>number</replaceable></option></term>
88              <listitem>
89               <para>The <replaceable>number</replaceable> of the port to listen on for requests.
90                   The main application will use this TCP port to listen for requests from APT, and
91                   for uploads to other peers. If a port is not specified for the DHT, it will also
92                   use this UDP port to listen for DHT requests.
93                   (Default is 9977.)</para>
94             </listitem>
95           </varlistentry>
96           <varlistentry>
97             <term><option>CACHE_DIR = <replaceable>directory</replaceable></option></term>
98              <listitem>
99               <para>The <replaceable>directory</replaceable> to store the downloaded files in.
100                 (Default is ${HOME}/.apt-dht/cache.)</para>
101             </listitem>
102           </varlistentry>
103           <varlistentry>
104             <term><option>OTHER_DIRS = <replaceable>list</replaceable></option></term>
105              <listitem>
106               <para>The <replaceable>list</replaceable> of directories containing packages to share with others.
107                 All files in these directories will be hashed and available for everybody to download.
108                 (Default is to share only the files downloaded.)</para>
109             </listitem>
110           </varlistentry>
111           <varlistentry>
112             <term><option>LOCAL_OK = <replaceable>boolean</replaceable></option></term>
113              <listitem>
114               <para>Whether it's OK to use an IP addres from a known local or private range.
115                 (Default is false)</para>
116             </listitem>
117           </varlistentry>
118           <varlistentry>
119             <term><option>UNLOAD_PACKAGES_CACHE = <replaceable>time</replaceable></option></term>
120              <listitem>
121               <para>The <replaceable>time</replaceable> of inactivity to wait for before unloading the
122                   packages cache. The packages cache uses a lot of memory, and only takes a few seconds
123                   to reload when a new request arrives. (Default is 5 minutes.)</para>
124             </listitem>
125           </varlistentry>
126           <varlistentry>
127             <term><option>DHT = <replaceable>string</replaceable></option></term>
128              <listitem>
129               <para>The DHT implementation to use. It must be possile to do (in python)
130                 ``from &lt;DHT&gt;.DHT import DHT'' to get a class that implements the IDHT interface.
131                 There should also be a similarly named section below to specify the options for the DHT.
132                 (Default is `apt_dht_Khashmir')</para>
133             </listitem>
134           </varlistentry>
135           <varlistentry>
136             <term><option>DHT-ONLY = <replaceable>boolean</replaceable></option></term>
137              <listitem>
138               <para>Whether to only run the DHT. This can be useful for providing only a bootstrap node.
139                 (Default is false)</para>
140             </listitem>
141           </varlistentry>
142         </variablelist>
143       </refsect2>
144       <refsect2>
145         <title>apt_dht_Khashmir</title>
146
147         <variablelist>
148           <varlistentry>
149             <term><option>PORT = <replaceable>number</replaceable></option></term>
150              <listitem>
151               <para>The <replaceable>number</replaceable> of the port to listen on for DHT (UDP) requests.
152                   (Default is to use the value specified in the DEFAULT section.)</para>
153             </listitem>
154           </varlistentry>
155           <varlistentry>
156             <term><option>BOOTSTRAP = <replaceable>list</replaceable></option></term>
157              <listitem>
158               <para>The <replaceable>list</replaceable> of bootstrap nodes to contact to join the DHT.
159                 Each node should be on a separate line, and start with the IP address or host name,
160                 followed by a colon and the port number.
161                 (Default is a list of known good nodes.)</para>
162             </listitem>
163           </varlistentry>
164           <varlistentry>
165             <term><option>BOOTSTRAP_NODE = <replaceable>boolean</replaceable></option></term>
166              <listitem>
167               <para>Whether this node is a bootstrap node.
168                 (Default is false)</para>
169             </listitem>
170           </varlistentry>
171           <varlistentry>
172             <term><option>K = <replaceable>number</replaceable></option></term>
173              <listitem>
174               <para>The <replaceable>number</replaceable> of the Kademlia "K" constant.
175                   It should be an even number.
176                   (Default is 8.)</para>
177             </listitem>
178           </varlistentry>
179           <varlistentry>
180             <term><option>HASH_LENGTH = <replaceable>number</replaceable></option></term>
181              <listitem>
182               <para>The <replaceable>number</replaceable> of bits in the hash to use.
183                   (Default is 160.)</para>
184             </listitem>
185           </varlistentry>
186           <varlistentry>
187             <term><option>CHECKPOINT_INTERVAL = <replaceable>time</replaceable></option></term>
188              <listitem>
189               <para>The <replaceable>time</replaceable> to wait between saves of the running state.
190                   (Default is 5 minutes.)</para>
191             </listitem>
192           </varlistentry>
193           <varlistentry>
194             <term><option>CONCURRENT_REQS = <replaceable>number</replaceable></option></term>
195              <listitem>
196               <para>The concurrent <replaceable>number</replaceable> of calls per find node/value request.
197                   (Default is 4.)</para>
198             </listitem>
199           </varlistentry>
200           <varlistentry>
201             <term><option>STORE_REDUNDANCY = <replaceable>number</replaceable></option></term>
202              <listitem>
203               <para>The <replaceable>number</replaceable> of redundant copies of a value to store in the DHT.
204                   (Default is 3.)</para>
205             </listitem>
206           </varlistentry>
207           <varlistentry>
208             <term><option>MAX_FAILURES = <replaceable>number</replaceable></option></term>
209              <listitem>
210               <para>The <replaceable>number</replaceable> of times in a row a node can fail to
211                   respond before it's booted from the routing table.
212                   (Default is 3.)</para>
213             </listitem>
214           </varlistentry>
215           <varlistentry>
216             <term><option>MIN_PING_INTERVAL = <replaceable>time</replaceable></option></term>
217              <listitem>
218               <para>The minimum <replaceable>time</replaceable> to wait before re-pinging a node.
219                   (Default is 15 minutes.)</para>
220             </listitem>
221           </varlistentry>
222           <varlistentry>
223             <term><option>BUCKET_STALENESS = <replaceable>time</replaceable></option></term>
224              <listitem>
225               <para>The maximum <replaceable>time</replaceable> to wait before refreshing a bucket.
226                   (Default is 1 hour.)</para>
227             </listitem>
228           </varlistentry>
229           <varlistentry>
230             <term><option>KEINITIAL_DELAY = <replaceable>time</replaceable></option></term>
231              <listitem>
232               <para>The <replaceable>time</replaceable> to wait after startup before starting the key expirer.
233                   (Default is 15 seconds.)</para>
234             </listitem>
235           </varlistentry>
236           <varlistentry>
237             <term><option>KE_DELAY = <replaceable>time</replaceable></option></term>
238              <listitem>
239               <para>The <replaceable>time</replaceable> to wait between runs of the key expirer.
240                   (Default is 20 minutes.)</para>
241             </listitem>
242           </varlistentry>
243           <varlistentry>
244             <term><option>KE_AGE = <replaceable>time</replaceable></option></term>
245              <listitem>
246               <para>The <replaceable>time</replaceable> to wait before expiring unrefreshed keys.
247                   (Default is 1 hour.)</para>
248             </listitem>
249           </varlistentry>
250           <varlistentry>
251             <term><option>SPEW = <replaceable>boolean</replaceable></option></term>
252              <listitem>
253               <para>Whether to log lots of info about the requests and responses in the protocol.
254                 (Default is false)</para>
255             </listitem>
256           </varlistentry>
257         </variablelist>
258      </refsect2>
259   </refsect1>
260
261   <refsect1>
262     <title>SEE ALSO</title>
263
264     <para>
265       <citerefentry><refentrytitle>apt-dht</refentrytitle><manvolnum>8</manvolnum></citerefentry>
266     </para>
267   </refsect1>
268   <refsect1>
269     <title>AUTHOR</title>
270     <para>This manual page was written by &dhusername; &lt;&dhemail;> for
271       the &debian; system (but may be used by others).  Permission is
272       granted to copy, distribute and/or modify this document under
273       the terms of the &gnu; General Public License, Version 2 or any
274       later version published by the Free Software Foundation.
275     </para>
276     <para>
277       On Debian systems, the complete text of the GNU General Public
278       License can be found in /usr/share/common-licenses/GPL.
279     </para>
280   </refsect1>
281 </refentry>
282
283 <!-- Keep this comment at the end of the file
284 Local variables:
285 mode: sgml
286 sgml-omittag:t
287 sgml-shorttag:t
288 sgml-minimize-attributes:nil
289 sgml-always-quote-attributes:t
290 sgml-indent-step:2
291 sgml-indent-data:t
292 sgml-parent-document:nil
293 sgml-default-dtd-file:nil
294 sgml-exposed-tags:nil
295 sgml-local-catalogs:nil
296 sgml-local-ecat-files:nil
297 End:
298 -->