X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=apt_dht%2Fapt_dht_conf.py;h=42a3d38d3bdd002b0e5fc852ab807b7e4123d3a7;hb=8f102eb1964db2ac18d4bac9e399c069a4cb616e;hp=0c5ca52e5adae4ae0028e5c2133d9ac3b57db0a9;hpb=7dab2471d589ea439ccbfe794258863c2af858e9;p=quix0rs-apt-p2p.git diff --git a/apt_dht/apt_dht_conf.py b/apt_dht/apt_dht_conf.py index 0c5ca52..42a3d38 100644 --- a/apt_dht/apt_dht_conf.py +++ b/apt_dht/apt_dht_conf.py @@ -16,6 +16,8 @@ if home == '${HOME}' or not os.path.isdir(home): home = os.path.expanduser('~') if not os.path.isdir(home): home = os.path.abspath(os.path.dirname(sys.argv[0])) +DEFAULT_CONFIG_FILES=['/etc/apt-dht/apt-dht.conf', + home + '/.apt-dht/apt-dht.conf'] DEFAULTS = { @@ -25,22 +27,33 @@ DEFAULTS = { # Directory to store the downloaded files in 'CACHE_DIR': home + '/.apt-dht/cache', + # Other directories containing packages to share with others + # WARNING: all files in these directories will be hashed and available + # for everybody to download + 'OTHER_DIRS': """""", + # User name to try and run as 'USERNAME': '', + + # Whether it's OK to use an IP addres from a known local/private range + 'LOCAL_OK': 'no', # Which DHT implementation to use. # It must be possile to do "from .DHT import DHT" to get a class that # implements the IDHT interface. 'DHT': 'apt_dht_Khashmir', - # Whether to only run the DHT (for providing a login node) + # Whether to only run the DHT (for providing only a bootstrap node) 'DHT-ONLY': 'no', } DHT_DEFAULTS = { # bootstrap nodes to contact to join the DHT 'BOOTSTRAP': """www.camrdale.org:9977 - steveholt.hopto.org:9977""", + steveholt.hopto.org:9976""", + + # whether this node is a bootstrap node + 'BOOTSTRAP_NODE': "no", # Kademlia "K" constant, this should be an even number 'K': '8', @@ -49,7 +62,7 @@ DHT_DEFAULTS = { 'HASH_LENGTH': '160', # checkpoint every this many seconds - 'CHECKPOINT_INTERVAL': '15m', # fifteen minutes + 'CHECKPOINT_INTERVAL': '5m', # five minutes ### SEARCHING/STORING # concurrent xmlrpc calls per find node/value request! @@ -77,6 +90,9 @@ DHT_DEFAULTS = { # expire entries older than this 'KE_AGE': '1h', # 60 minutes + + # whether to spew info about the requests/responses in the protocol + 'SPEW': 'yes', } class AptDHTConfigParser(SafeConfigParser):