Fix a bug in the Hash checker when updating exactly to a piece boundary.
[quix0rs-apt-p2p.git] / apt-p2p.conf
1 # The apt-p2p configuration file.
2 #
3 # This is an ini-type configuration file, using sections identified by
4 # square brackets. Values are specified on a single line using the '='
5 # sign. Some values indicate times, in which case a suffix of 'd' for
6 # days, 'h' for hours, 'm' for minutes, and 's' for seconds can be used.
7 # Some values can span multiple lines by starting the subsequent lines
8 # with one or more spaces.
9 #
10 #########################  DEFAULT  ###################################
11 # This is the default section containing the configuration options for the
12 # main application.
13 [DEFAULT]
14
15 # The number of the port to listen on for requests.
16 # The main application will use this TCP port to listen for requests from APT, and
17 # for uploads to other peers. If a port is not specified for the DHT, it will also
18 # use this UDP port to listen for DHT requests.
19 PORT = 9977
20
21 # The rate to limit sending data to peers to, in KBytes/sec.
22 # Set this to 0 to not limit the upload bandwidth.
23 UPLOAD_LIMIT = 0
24
25 # Directory to store the downloaded files in
26 CACHE_DIR = /var/cache/apt-p2p
27     
28 # Other directories containing packages to share with others
29 # WARNING: all files in these directories will be hashed and available
30 #          for everybody to download
31 # OTHER_DIRS = 
32     
33 # Whether it's OK to use an IP address from a known local/private range
34 LOCAL_OK = no
35
36 # Unload the packages cache after an interval of inactivity this long.
37 # The packages cache uses a lot of memory, and only takes a few seconds
38 # to reload when a new request arrives.
39 UNLOAD_PACKAGES_CACHE = 5m
40
41 # Refresh the DHT keys after this much time has passed.
42 # This should be a time slightly less than the DHT's KEY_EXPIRE value.
43 KEY_REFRESH = 57m
44
45 # Which DHT implementation to use.
46 # It must be possible to do "from <DHT>.DHT import DHT" to get a class that
47 # implements the IDHT interface. There should also be a similarly named
48 # section below to specify the options for the DHT.
49 DHT = apt_p2p_Khashmir
50
51 # Whether to only run the DHT (for providing only a bootstrap node)
52 DHT-ONLY = no
53
54 #######################  apt_p2p_Khashmir  ############################
55 # This is the default (included) DHT to use.
56 [apt_p2p_Khashmir]
57
58 # To specify a different (UDP) port for the DHT to use.
59 # If not specified here, the PORT value in the DEFAULT section will be used.
60 # PORT = 
61
62 # bootstrap nodes to contact to join the DHT
63 BOOTSTRAP = www.camrdale.org:9977
64             steveholt.hopto.org:9976
65
66 # whether this node is a bootstrap node
67 BOOTSTRAP_NODE = no
68
69 # Kademlia "K" constant, this should be an even number
70 K = 8
71
72 # SHA1 is 160 bits long
73 HASH_LENGTH = 160
74
75 # interval between saving the running state
76 CHECKPOINT_INTERVAL = 5m
77
78 # concurrent number of calls per find node/value request!
79 CONCURRENT_REQS = 4
80
81 # how many hosts to post values to
82 STORE_REDUNDANCY = 3
83
84 # How many values to attempt to retrieve from the DHT.
85 # Setting this to 0 will try and get all values (which could take a while if
86 # a lot of nodes have values). Setting it negative will try to get that
87 # number of results from only the closest STORE_REDUNDANCY nodes to the hash.
88 # The default is a large negative number so all values from the closest
89 # STORE_REDUNDANCY nodes will be retrieved.
90 RETRIEVE_VALUES = -10000
91
92 # how many times in a row a node can fail to respond before it's booted from the routing table
93 MAX_FAILURES = 3
94
95 # never ping a node more often than this
96 MIN_PING_INTERVAL = 15m
97
98 # refresh buckets that haven't been touched in this long
99 BUCKET_STALENESS = 1h
100
101 # expire unrefreshed entries older than this
102 KEY_EXPIRE = 1h
103
104 # whether to spew info about the requests/responses in the protocol
105 SPEW = no