.TH "apt-p2p.conf" "5" .SH "NAME" apt-p2p.conf \(em configuration file for apt-p2p.conf .SH "DESCRIPTION" .PP Configuration information for apt-p2p.conf is searched for in the following order, with later entries overriding former ones: .IP " 1." 6 /etc/apt-p2p/apt-p2p.conf .IP " 2." 6 $HOME/.apt-p2p/apt-p2p.conf .IP " 3." 6 the location specified by the config-file parameter .SH "FORMAT" .PP apt-p2p.conf has a structure similar to Microsoft Windows INI files. The configuration file consists of sections, led by a '[section]' header and followed by 'name = value' or 'name: value' entries, with continuations in the style of RFC 822 (values can span multiple lines by starting the subsequent lines with one or more spaces). Some values indicate times, in which case a suffix of 'd' for days, 'h' for hours, 'm' for minutes, and 's' for seconds can be used. Boolean values can be '1', 'yes', 'true', and 'on' to evaluate to True, or '0', 'no', 'false', and 'off' to evaluate to false. Note that leading whitespace is removed from values, and case is not important. Lines beginning with '#' or ';' are ignored and may be used to provide comments. .SH "VARIABLES" .PP There are 2 required sections in the config file. The first is the DEFAULT section, providing variables for the configuration of the main application. The second is the section that provides variables for the configuration of the DHT. .SS "DEFAULT" .IP "\fBPORT = \fInumber\fR\fP" 10 The \fInumber\fR of the port to listen on for requests. The main application will use this TCP port to listen for requests from APT, and for uploads to other peers. If a port is not specified for the DHT, it will also use this UDP port to listen for DHT requests. (Default is 9977.) .IP "\fBUPLOAD_LIMIT = \fIspeed\fR\fP" 10 The \fIspeed\fR to limit sending data to peers to, in KBytes/sec. Set this to 0 to not limit the upload bandwidth. (Default is 0) .IP "\fBMIN_DOWNLOAD_PEERS = \fInumber\fR\fP" 10 The minimum \fInumber\fR of peers before the mirror is not used. If there are fewer peers than this for a file, the mirror will also be used to speed up the download. Set to 0 to never use the mirror if there are peers. (Default is 3) .IP "\fBCACHE_DIR = \fIdirectory\fR\fP" 10 The \fIdirectory\fR to store the downloaded files in. (Default is $HOME/.apt-p2p/cache.) .IP "\fBOTHER_DIRS = \fIlist\fR\fP" 10 The \fIlist\fR of directories containing packages to share with others. All files in these directories will be hashed and available for everybody to download. (Default is to share only the files downloaded.) .IP "\fBLOCAL_OK = \fIboolean\fR\fP" 10 Whether it's OK for the application to use for sharing files an IP address from a known local or private range (RFC 1918). This should only be set true if you are running your own private apt-p2p network that no one else will be connecting to. (Default is false) .IP "\fBREMOTE_STATS = \fIboolean\fR\fP" 10 Whether a remote peer can access the statistics page. (Default is True) .IP "\fBUNLOAD_PACKAGES_CACHE = \fItime\fR\fP" 10 The \fItime\fR of inactivity to wait for before unloading the packages cache. The packages cache uses a lot of memory, and only takes a few seconds to reload when a new request arrives. (Default is 5 minutes.) .IP "\fBKEY_REFRESH = \fItime\fR\fP" 10 The \fItime\fR after which to refresh DHT keys. This should be a time slightly less than the DHT's KEY_EXPIRE value. (Default is 2.5 hours.) .IP "\fBUSERNAME = \fIuser\fR\fP" 10 The \fIuser\fR name to try and run as. Leaving this blank will try to run as current user. (Default is 'apt-p2p'.) .IP "\fBDHT = \fIstring\fR\fP" 10 The DHT implementation to use. It must be possile to do (in python) 'from .DHT import DHT' to get a class that implements the IDHT interface. There should also be a similarly named section in the config file to specify the options for the DHT. (Default is 'apt_p2p_Khashmir') .IP "\fBDHT-ONLY = \fIboolean\fR\fP" 10 Whether to only run the DHT. This can be useful for providing only a bootstrap node. (Default is false) .SS "apt_p2p_Khashmir" .IP "\fBPORT = \fInumber\fR\fP" 10 The \fInumber\fR of the port to listen on for DHT (UDP) requests. (Default is to use the value specified in the DEFAULT section.) .IP "\fBBOOTSTRAP = \fIlist\fR\fP" 10 The \fIlist\fR of bootstrap nodes to contact to join the DHT. Each node should be on a separate line, and start with the IP address or host name, followed by a colon and the port number. (Default is a list of known good nodes.) .IP "\fBBOOTSTRAP_NODE = \fIboolean\fR\fP" 10 Whether this node is a bootstrap node. (Default is false) .IP "\fBCHECKPOINT_INTERVAL = \fItime\fR\fP" 10 The \fItime\fR to wait between saves of the running state. (Default is 5 minutes.) .IP "\fBCONCURRENT_REQS = \fInumber\fR\fP" 10 The concurrent \fInumber\fR of calls per find node/value request. (Default is 8.) .IP "\fBSTORE_REDUNDANCY = \fInumber\fR\fP" 10 The \fInumber\fR of redundant copies of a value to store in the DHT. (Default is 6.) .IP "\fBRETRIEVE_VALUES = \fInumber\fR\fP" 10 The \fInumber\fR of values to attempt to retrieve from the DHT. Setting this to 0 will try and get all values (which could take a while if a lot of nodes have values). Setting it negative will try to get that number of results from only the closest STORE_REDUNDANCY nodes to the hash. (Default is \-10000, which is a large negative number so all values from the closest STORE_REDUNDANCY nodes will be retrieved.) .IP "\fBMAX_FAILURES = \fInumber\fR\fP" 10 The \fInumber\fR of times in a row a node can fail to respond before it's booted from the routing table. (Default is 3.) .IP "\fBMIN_PING_INTERVAL = \fItime\fR\fP" 10 The minimum \fItime\fR to wait before re-pinging a node. (Default is 15 minutes.) .IP "\fBBUCKET_STALENESS = \fItime\fR\fP" 10 The maximum \fItime\fR to wait before refreshing a bucket. (Default is 1 hour.) .IP "\fBLOCAL_OK = \fIboolean\fR\fP" 10 Whether it's OK to add nodes to the routing table that use an IP address from a known local or private range (RFC 1918). This should only be set true if you are running your own private apt-p2p network that no one else will be connecting to. (Default is to use the value specified in the DEFAULT section.) .IP "\fBKEY_EXPIRE = \fItime\fR\fP" 10 The \fItime\fR to wait before expiring unrefreshed keys. (Default is 3 hours.) .IP "\fBKRPC_TIMEOUT = \fItime\fR\fP" 10 The \fItime\fR to wait before KRPC requests timeout. (Default is 9 seconds.) .IP "\fBKRPC_INITIAL_DELAY = \fItime\fR\fP" 10 The \fItime\fR to start with when resending KRPC requests using exponential backoff. The request will first be resent after the delay set here. The request will be resent again after twice the delay set here, and so on. e.g. if TIMEOUT is 9 sec., and INITIAL_DELAY is 2 sec., then requests will be resent at times 0, 2 (2 sec. later), and 6 (4 sec. later), and then will timeout at 9. (Default is 2 seconds.) .IP "\fBSPEW = \fIboolean\fR\fP" 10 Whether to log lots of info about the requests and responses in the protocol. (Default is false) .SH "SEE ALSO" .PP \fBapt-p2p\fP\fB(8)\fP .SH "AUTHOR" .PP This manual page was written by Cameron Dale for the \fBDebian\fP system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. .PP On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. .\" created by instant / docbook-to-man, Sun 22 Feb 2015, 01:31