r155 - in /debtorrent/trunk: DebTorrent/download_bt1.py config.debtorrent.ini

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Fri Jul 13 19:25:25 UTC 2007


Author: camrdale-guest
Date: Fri Jul 13 19:25:24 2007
New Revision: 155

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=155
Log:
Reorder the default options.

Modified:
    debtorrent/trunk/DebTorrent/download_bt1.py
    debtorrent/trunk/config.debtorrent.ini

Modified: debtorrent/trunk/DebTorrent/download_bt1.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/download_bt1.py?rev=155&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/download_bt1.py (original)
+++ debtorrent/trunk/DebTorrent/download_bt1.py Fri Jul 13 19:25:24 2007
@@ -59,29 +59,57 @@
     False = 0
 
 defaults = [
-    ('max_uploads', 7,
-        "the maximum number of uploads to allow at once."),
-    ('keepalive_interval', 120.0,
-        'number of seconds to pause between sending keepalives'),
-    ('download_slice_size', 2 ** 14,
-        "How many bytes to query for per request."),
+    # Not in the config file
+    ('configfile', '', 'the configuration file to use, if not specified then ' +
+        'a file in the .DebTorrent directory in the user\'s home directory '+
+        'will be used'),
+    ('responsefile', '',
+        'file the server response was stored in, alternative to url'),
+    ('url', '',
+        'url to get file from, alternative to responsefile'),
+    # Locations
+    ('download_dir', '',
+        'directory to save the download in, blank indicates use the user\'s ' +
+        'home directory'),
+    ('cache_dir', '', 'the directory to use to get/store cache files, if not ' + 
+        'specified then a .DebTorrent directory in the user\'s home directory ' +
+        'will be used'),
+    ('expire_cache_data', 10,
+        'the number of days after which you wish to expire old cache data ' +
+        '(0 = disabled)'),
+    # Rate limits
+    ('max_upload_rate', 0,
+        'maximum kB/s to upload at (0 = no limit, -1 = automatic)'),
+    ('max_download_rate', 0,
+        'maximum kB/s to download at (0 = no limit)'),
+    ('upload_rate_fudge', 5.0, 
+        'time equivalent of writing to kernel-level TCP buffer, for rate adjustment'),
+    ('tcp_ack_fudge', 0.03,
+        'how much TCP ACK download overhead to add to upload rate calculations ' +
+        '(0 = disabled)'),
+    ('max_rate_period', 20.0,
+        'maximum amount of time to guess the current rate estimate represents'),
     ('upload_unit_size', 1460,
-        "when limiting upload rate, how many bytes to send at a time"),
-    ('max_message_length', 2 ** 23,
-        "maximum length prefix encoding you'll accept over the wire - larger values get the connection dropped."),
+        'when limiting upload rate, how many bytes to send at a time'),
+    # Connections
+    ('bind', '', 
+        'comma-separated list of ips/hostnames to bind to locally'),
     ('ip', '',
-        "ip to report you have to the tracker."),
+        'ip to report you have to the tracker'),
     ('minport', 10000, 'minimum port to listen on, counts up if unavailable'),
     ('maxport', 60000, 'maximum port to listen on'),
     ('random_port', 1, 'whether to choose randomly inside the port range ' +
         'instead of counting up linearly'),
-    ('port', 9988, 'port to listen for apt on'),
-    ('min_time_between_log_flushes', 3.0,
-        'minimum time it must have been since the last flush to do another one'),
-    ('responsefile', '',
-        'file the server response was stored in, alternative to url'),
-    ('url', '',
-        'url to get file from, alternative to responsefile'),
+#    ('ipv6_enabled', autodetect_ipv6(),
+    ('ipv6_enabled', 0,
+        'allow the client to connect to peers via IPv6'),
+    ('ipv6_binds_v4', autodetect_socket_style(),
+        'set if an IPv6 server socket will also field IPv4 connections'),
+    ('timeout', 300.0,
+        'time to wait between closing sockets which nothing has been received on'),
+    ('timeout_check_interval', 60.0,
+        'time to wait between checking if any connections have timed out'),
+    # Encryption
     ('crypto_allowed', int(CRYPTO_OK),
         'whether to allow the client to accept encrypted connections'),
     ('crypto_only', 0,
@@ -89,122 +117,120 @@
     ('crypto_stealth', 0,
         'whether to prevent all non-encrypted connection attempts; ' +
         'will result in an effectively firewalled state on older trackers'),
-    ('selector_enabled', 1,
-        'whether to enable the file selector and fast resume function'),
-    ('expire_cache_data', 10,
-        'the number of days after which you wish to expire old cache data ' +
-        '(0 = disabled)'),
-    ('priority', '',
-        'a list of file priorities separated by commas, must be one per file, ' +
-        '0 = highest, 1 = normal, 2 = lowest, -1 = download disabled'),
-    ('download_dir', '',
-        'directory to save the download in, blank indicates use the user\'s home directory'),
-    ('timeout', 300.0,
-        'time to wait between closing sockets which nothing has been received on'),
-    ('timeout_check_interval', 60.0,
-        'time to wait between checking if any connections have timed out'),
+    # APT Requests
+    ('port', 9988, 'port to listen for apt on'),
+    ('show_infopage', 1, 'whether to display an info page when the ' +
+        'APT requester\'s root directory is loaded'),
+    ('infopage_redirect', '', 'a URL to redirect the info page to'),
+    ('favicon', '', 
+        'file containing x-icon data to return when browser requests favicon.ico'),
+    ('allow_get', 0, 
+        'adds a /file?infohash={hash} url that allows users to download the ' +
+        'dtorrent file'),
+    ('logfile', '', 
+        'file to write the APT request listener logs to (default is stdout)'),
+    ('min_time_between_log_flushes', 3.0,
+        'minimum time it must have been since the last flush to do another one'),
+    ('hupmonitor', 0, 
+        'whether to reopen the log file upon receipt of HUP signal'),
+    ('allowed_ips', '', 
+        'only allow connections from IPs specified in the given file; '+
+        'file contains subnet data in the format: aa.bb.cc.dd/len'),
+    ('banned_ips', '', 
+        'don\'t allow connections from IPs specified in the given file; ' +
+        'file contains IP range data in the format: xxx:xxx:ip1-ip2'),
+    ('parse_ip_files', 60, 
+        'seconds between reloading of allowed_ips and banned_ips lists for apt'),
+    # Backup HTTP Downloader
+    ('disable_http_downloader', 0, 
+        '(for testing purposes only) whether to disable the backup HTTP downloader'),
+    # End of Normal Options
+    # BitTorrent Options
+    ('keepalive_interval', 120.0,
+        'number of seconds to pause between sending keepalives'),
+    ('download_slice_size', 2 ** 14,
+        'How many bytes to query for per request.'),
     ('max_slice_length', 2 ** 17,
-        "maximum length slice to send to peers, larger requests are ignored"),
-    ('max_rate_period', 20.0,
-        "maximum amount of time to guess the current rate estimate represents"),
-    ('bind', '', 
-        'comma-separated list of ips/hostnames to bind to locally'),
-#    ('ipv6_enabled', autodetect_ipv6(),
-    ('ipv6_enabled', 0,
-         'allow the client to connect to peers via IPv6'),
-    ('ipv6_binds_v4', autodetect_socket_style(),
-        "set if an IPv6 server socket will also field IPv4 connections"),
-    ('upnp_nat_access', 1,
-        'attempt to autoconfigure a UPnP router to forward a server port ' +
-        '(0 = disabled, 1 = mode 1 [fast], 2 = mode 2 [slow])'),
-    ('upload_rate_fudge', 5.0, 
-        'time equivalent of writing to kernel-level TCP buffer, for rate adjustment'),
-    ('tcp_ack_fudge', 0.03,
-        'how much TCP ACK download overhead to add to upload rate calculations ' +
-        '(0 = disabled)'),
-    ('display_interval', .5,
-        'time between updates of displayed information'),
+        'maximum length slice to send to peers, larger requests are ignored'),
+    ('max_message_length', 2 ** 23,
+        'maximum length prefix encoding you\'ll accept over the wire - ' +
+        'larger values get the connection dropped.'),
+    ('rarest_first_cutoff', 2,
+        "number of downloads at which to switch from random to rarest first"),
+    ('rarest_first_priority_cutoff', 5,
+        'the number of peers which need to have a piece before other ' +
+        'partials take priority over rarest first'),
+    ('breakup_seed_bitfield', 1,
+        'sends an incomplete bitfield and then fills with have messages, '
+        'in order to get around stupid ISP manipulation'),
+    ('snub_time', 30.0,
+        'seconds to wait for data to come in over a connection before ' +
+        'assuming it\'s semi-permanently choked'),
+    # Incentive Mechanism
+    ('max_uploads', 7,
+        'the maximum number of uploads to allow at once.'),
+    ('min_uploads', 4,
+        'the number of uploads to fill out to with extra optimistic unchokes'),
+    ('round_robin_period', 30,
+        'the number of seconds between the client\'s switching upload targets'),
+    ('auto_kick', 1,
+        'whether to allow the client to automatically kick/ban peers that send bad data'),
+    ('security', 1,
+        'whether to enable extra security features intended to prevent abuse'),
+    # Tracker Connections
+    ('default_tracker', 'http://dttracker.debian.net:6969/announce', 
+        'the default tracker address to use for new torrents'),
     ('rerequest_interval', 5 * 60,
         'time to wait between requesting more peers'),
     ('min_peers', 20, 
         'minimum number of peers to not do rerequesting'),
-    ('http_timeout', 60, 
-        'number of seconds to wait before assuming that an http connection has timed out'),
     ('max_initiate', 40,
         'number of peers at which to stop initiating new connections'),
-    ('check_hashes', 1,
-        'whether to check hashes on disk'),
-    ('max_upload_rate', 0,
-        'maximum kB/s to upload at (0 = no limit, -1 = automatic)'),
-    ('max_download_rate', 0,
-        'maximum kB/s to download at (0 = no limit)'),
-# Remove allocation controls for now (must pre-allocate)
-#    ('alloc_type', 'pre-allocate',
-#        'allocation type (may be normal, background, pre-allocate or sparse)'),
-#    ('alloc_rate', 2.0,
-#        'rate (in MiB/s) to allocate space at using background allocation'),
+    ('max_connections', 0,
+        'the absolute maximum number of peers to connect with (0 = no limit)'),
+    ('http_timeout', 60, 
+        'number of seconds to wait before assuming that an http connection ' +
+        'has timed out'),
     ('buffer_reads', 1,
         'whether to buffer disk reads'),
     ('write_buffer_size', 4,
         'the maximum amount of space to use for buffering disk writes ' +
         '(in megabytes, 0 = disabled)'),
-    ('breakup_seed_bitfield', 1,
-        'sends an incomplete bitfield and then fills with have messages, '
-        'in order to get around stupid ISP manipulation'),
-    ('snub_time', 30.0,
-        "seconds to wait for data to come in over a connection before assuming it's semi-permanently choked"),
-    ('spew', 0,
-        "whether to display diagnostic info to stdout"),
-    ('rarest_first_cutoff', 2,
-        "number of downloads at which to switch from random to rarest first"),
-    ('rarest_first_priority_cutoff', 5,
-        'the number of peers which need to have a piece before other partials take priority over rarest first'),
-    ('min_uploads', 4,
-        "the number of uploads to fill out to with extra optimistic unchokes"),
     ('max_files_open', 50,
         'the maximum number of files to keep open at a time, 0 means no limit'),
-    ('round_robin_period', 30,
-        "the number of seconds between the client's switching upload targets"),
+    ('check_hashes', 1,
+        'whether to check hashes on disk'),
+    ('double_check', 1,
+        'whether to double-check data being written to the disk for errors ' +
+        '(may increase CPU load)'),
+    ('triple_check', 0,
+        'whether to thoroughly check data being written to the disk ' +
+        '(may slow disk access)'),
+    ('lock_files', 1,
+        'whether to lock files the client is working with'),
+    ('lock_while_reading', 0,
+        'whether to lock access to files being read'),
+    ('auto_flush', 0,
+        'minutes between automatic flushes to disk (0 = disabled)'),
+    # Advanced Features
     ('super_seeder', 0,
-        "whether to use special upload-efficiency-maximizing routines (only for dedicated seeds)"),
-    ('security', 1,
-        "whether to enable extra security features intended to prevent abuse"),
-    ('max_connections', 0,
-        "the absolute maximum number of peers to connect with (0 = no limit)"),
-    ('auto_kick', 1,
-        "whether to allow the client to automatically kick/ban peers that send bad data"),
-    ('double_check', 1,
-        "whether to double-check data being written to the disk for errors (may increase CPU load)"),
-    ('triple_check', 0,
-        "whether to thoroughly check data being written to the disk (may slow disk access)"),
-    ('lock_files', 1,
-        "whether to lock files the client is working with"),
-    ('lock_while_reading', 0,
-        "whether to lock access to files being read"),
-    ('auto_flush', 0,
-        "minutes between automatic flushes to disk (0 = disabled)"),
+        'whether to use special upload-efficiency-maximizing routines ' +
+        '(only for dedicated seeds)'),
     ('dedicated_seed_id', '',
-        "code to send to tracker identifying as a dedicated seed"),
-    ('min_time_between_log_flushes', 3.0,
-        'minimum time it must have been since the last flush to do another one'),
-    ('hupmonitor', 0, 'whether to reopen the log file upon receipt of HUP signal'),
-    ('parse_ip_files', 60, 'seconds between reloading of ' +
-             'allowed_ips and banned_ips lists for apt'),
-    ('show_infopage', 1, "whether to display an info page when the tracker's root dir is loaded"),
-    ('infopage_redirect', '', 'a URL to redirect the info page to'),
-    ('favicon', '', 'file containing x-icon data to return when browser requests favicon.ico'),
-    ('allowed_ips', '', 'only allow connections from IPs specified in the given file; '+
-             'file contains subnet data in the format: aa.bb.cc.dd/len'),
-    ('banned_ips', '', "don't allow connections from IPs specified in the given file; "+
-             'file contains IP range data in the format: xxx:xxx:ip1-ip2'),
-    ('logfile', '', 'file to write the tracker logs, use - for stdout (default)'),
-    ('allow_get', 0, 'adds a /file?hash={hash} url that allows users to download the torrent file'),
-    ('default_tracker', 'http://dttracker.debian.net:6969/announce', 'the default tracker address to use for new torrents'),
-    ('configfile', '', 'the configuration file to use, if not ' + 
-             'specified then a file in the .DebTorrent directory in the user\'s home directory will be used'),
-    ('cache_dir', '', 'the directory to use to get/store cache files, if not ' + 
-             'specified then a .DebTorrent directory in the user\'s home directory will be used'),
-    ('disable_http_downloader', 0, '(for testing purposes only) whether to disable the backup HTTP downloader'),
+        'code to send to tracker identifying as a dedicated seed'),
+
+    ('selector_enabled', 1,
+        'whether to enable the file selector and fast resume function'),
+    ('priority', '',
+        'a list of file priorities separated by commas, must be one per file, ' +
+        '0 = highest, 1 = normal, 2 = lowest, -1 = download disabled'),
+    ('upnp_nat_access', 1,
+        'attempt to autoconfigure a UPnP router to forward a server port ' +
+        '(0 = disabled, 1 = mode 1 [fast], 2 = mode 2 [slow])'),
+    ('display_interval', .5,
+        'time between updates of displayed information'),
+    ('spew', 0,
+        'whether to display diagnostic info to stdout'),
     ]
 
 argslistheader = 'Arguments are:\n\n'

Modified: debtorrent/trunk/config.debtorrent.ini
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/config.debtorrent.ini?rev=155&op=diff
==============================================================================
--- debtorrent/trunk/config.debtorrent.ini (original)
+++ debtorrent/trunk/config.debtorrent.ini Fri Jul 13 19:25:24 2007
@@ -238,12 +238,12 @@
 #
 # These modes are:
 #
-# 0. No encryption permitted. The client won't make any encrypted
+# 0. No encryption permitted. The client won't make or accept any encrypted
 #    connections.
 #
 # 1. Encryption enabled (default). The client will accept incoming
 #    encrypted connections, and will make outgoing encrypted connections
-#    if the tracker tells it that peer requires it (and if the tracker has
+#    if the tracker tells it that the peer requires it (and if the tracker has
 #    the extensions to do so). In this mode, the client will recognize
 #    header-only encryption.
 #
@@ -262,10 +262,14 @@
 #
 # Crypto Allowed
 #
-# Whether to allow the client to accept encrypted connections.
-#
-
-# crypto_allowed = 1
+# Whether to allow the client to accept encrypted connections. The default
+# value for this option is determined by the presence of the python "Crypto"
+# module (debian package "python-crypto") necessary for encryption to work.
+# It is therefore not recommended that you change the default, unless you want
+# to specifically disable encryption.
+#
+
+# crypto_allowed = 0
 
 #
 # Crypto Only
@@ -459,7 +463,8 @@
 #
 # Download Slice Size
 #
-# The number of bytes to ask a peer for in a request.
+# The number of bytes to ask a peer for in a request. The default is 16384
+# which is 16K or 2^14.
 #
 
 # download_slice_size = 16384
@@ -468,7 +473,7 @@
 # Maximum Slice Length
 #
 # The maximum length slice to send to peers, in bytes, larger requests are 
-# ignored.
+# ignored. The default value is 131702 which is 128K or 2^17.
 #
 
 # max_slice_length = 131072
@@ -477,7 +482,8 @@
 # Maximum Message Length
 #
 # The maximum length (in bytes) prefix encoding you'll accept over a
-# connection. Larger values get the connection dropped.
+# connection. Larger values get the connection dropped. The default value is
+# 8,388,608 which is 8M or 2^23.
 #
 
 # max_message_length = 8388608




More information about the Debtorrent-commits mailing list