r224 - in /debtorrent/branches/unique: DebTorrent/BT1/AptListener.py DebTorrent/download_bt1.py debtorrent-client.conf test.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Sun Aug 12 02:03:14 UTC 2007


Author: camrdale-guest
Date: Sun Aug 12 02:03:14 2007
New Revision: 224

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=224
Log:
Add a force_tracker option for testing purposes.

Modified:
    debtorrent/branches/unique/DebTorrent/BT1/AptListener.py
    debtorrent/branches/unique/DebTorrent/download_bt1.py
    debtorrent/branches/unique/debtorrent-client.conf
    debtorrent/branches/unique/test.py

Modified: debtorrent/branches/unique/DebTorrent/BT1/AptListener.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/branches/unique/DebTorrent/BT1/AptListener.py?rev=224&op=diff
==============================================================================
--- debtorrent/branches/unique/DebTorrent/BT1/AptListener.py (original)
+++ debtorrent/branches/unique/DebTorrent/BT1/AptListener.py Sun Aug 12 02:03:14 2007
@@ -551,6 +551,9 @@
         for header, value in headers.items():
             response[header] = value.strip()
 
+        if self.config["force_tracker"]:
+            response['announce'] = self.config["force_tracker"]
+            
         if path.count('dists'):
             mirror = 'http://' + '/'.join(path[:path.index('dists')]) + '/'
             response.setdefault('deb_mirrors', []).append(mirror)

Modified: debtorrent/branches/unique/DebTorrent/download_bt1.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/branches/unique/DebTorrent/download_bt1.py?rev=224&op=diff
==============================================================================
--- debtorrent/branches/unique/DebTorrent/download_bt1.py (original)
+++ debtorrent/branches/unique/DebTorrent/download_bt1.py Sun Aug 12 02:03:14 2007
@@ -190,6 +190,8 @@
     # Tracker Connections
     ('default_tracker', 'http://dttracker.debian.net:6969/announce', 
         'the default tracker address to use for new torrents'),
+    ('force_tracker', '', 
+        'set this to the tracker address to use for all torrents'),
     ('rerequest_interval', 5 * 60,
         'time to wait between requesting more peers'),
     ('min_peers', 20, 

Modified: debtorrent/branches/unique/debtorrent-client.conf
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/branches/unique/debtorrent-client.conf?rev=224&op=diff
==============================================================================
--- debtorrent/branches/unique/debtorrent-client.conf (original)
+++ debtorrent/branches/unique/debtorrent-client.conf Sun Aug 12 02:03:14 2007
@@ -601,6 +601,19 @@
 # default_tracker = "http://dttracker.debian.net:6969/announce"
 
 #
+# Force Tracker
+#
+# If set, this will force all new torrents to use this address for the tracker,
+# regardless of the one specified for the torrent.
+#
+# WARNING: This may seriously limit the number of peers you can find, since
+#          most will be using the address specified in the torrent. This option
+#          is only intended for testing purposes.
+#
+
+# force_tracker = ""
+
+#
 # Rerequest Interval
 #
 # The time to wait between requesting more peers from the tracker (in seconds).

Modified: debtorrent/branches/unique/test.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/branches/unique/test.py?rev=224&op=diff
==============================================================================
--- debtorrent/branches/unique/test.py (original)
+++ debtorrent/branches/unique/test.py Sun Aug 12 02:03:14 2007
@@ -556,7 +556,7 @@
         sleep(5)
         
         for k, v in downloaders.items():
-            opts = v[1] + ['--default_tracker', tracker_address(v[0])]
+            opts = v[1] + ['--force_tracker', tracker_address(v[0])]
             running_downloaders[k] = start_downloader(k, opts, **v[2])
     
         sleep(10)




More information about the Debtorrent-commits mailing list