b481193f9475a0cfc3e7d241e4891ea458acff0a
[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>KEY_EXPIRE = <replaceable>time</replaceable></option></term>
231              <listitem>
232               <para>The <replaceable>time</replaceable> to wait before expiring unrefreshed keys.
233                   (Default is 1 hour.)</para>
234             </listitem>
235           </varlistentry>
236           <varlistentry>
237             <term><option>SPEW = <replaceable>boolean</replaceable></option></term>
238              <listitem>
239               <para>Whether to log lots of info about the requests and responses in the protocol.
240                 (Default is false)</para>
241             </listitem>
242           </varlistentry>
243         </variablelist>
244      </refsect2>
245   </refsect1>
246
247   <refsect1>
248     <title>SEE ALSO</title>
249
250     <para>
251       <citerefentry><refentrytitle>apt-dht</refentrytitle><manvolnum>8</manvolnum></citerefentry>
252     </para>
253   </refsect1>
254   <refsect1>
255     <title>AUTHOR</title>
256     <para>This manual page was written by &dhusername; &lt;&dhemail;> for
257       the &debian; system (but may be used by others).  Permission is
258       granted to copy, distribute and/or modify this document under
259       the terms of the &gnu; General Public License, Version 2 or any
260       later version published by the Free Software Foundation.
261     </para>
262     <para>
263       On Debian systems, the complete text of the GNU General Public
264       License can be found in /usr/share/common-licenses/GPL.
265     </para>
266   </refsect1>
267 </refentry>
268
269 <!-- Keep this comment at the end of the file
270 Local variables:
271 mode: sgml
272 sgml-omittag:t
273 sgml-shorttag:t
274 sgml-minimize-attributes:nil
275 sgml-always-quote-attributes:t
276 sgml-indent-step:2
277 sgml-indent-data:t
278 sgml-parent-document:nil
279 sgml-default-dtd-file:nil
280 sgml-exposed-tags:nil
281 sgml-local-catalogs:nil
282 sgml-local-ecat-files:nil
283 End:
284 -->