[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/master] Dropping unused getMyDirAuthorities() method



commit 46f3a5a0341f1c148d62cb3a82fc52e61fd0d8a8
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Jun 1 19:45:16 2013 -0700

    Dropping unused getMyDirAuthorities() method
    
    We once used getMyDirAuthorities() in our connection panel to identify
    directory connections but evidently we're not using it nowadays. No need to
    keep a hardcoded list of authorities - yay!
---
 src/util/torTools.py |   44 --------------------------------------------
 1 file changed, 44 deletions(-)

diff --git a/src/util/torTools.py b/src/util/torTools.py
index 7c8eb9c..a603f21 100644
--- a/src/util/torTools.py
+++ b/src/util/torTools.py
@@ -20,18 +20,6 @@ from util import connections
 
 from stem.util import conf, enum, log, proc, str_tools, system
 
-# Addresses of the default directory authorities for tor version 0.2.3.0-alpha
-# (this comes from the dirservers array in src/or/config.c).
-DIR_SERVERS = [("86.59.21.38", "80"),         # tor26
-               ("128.31.0.39", "9031"),       # moria1
-               ("216.224.124.114", "9030"),   # ides
-               ("212.112.245.170", "80"),     # gabelmoo
-               ("194.109.206.212", "80"),     # dizum
-               ("193.23.244.244", "80"),      # dannenberg
-               ("208.83.223.34", "443"),      # urras
-               ("213.115.239.118", "443"),    # maatuska
-               ("82.94.251.203", "80")]       # Tonga
-
 # message logged by default when a controller can't set an event type
 DEFAULT_FAILED_EVENT_MSG = "Unsupported event type: %s"
 
@@ -579,38 +567,6 @@ class Controller:
 
     return (None, None)
   
-  def getMyDirAuthorities(self):
-    """
-    Provides a listing of IP/port tuples for the directory authorities we've
-    been configured to use. If set in the configuration then these are custom
-    authorities, otherwise its an estimate of what Tor has been hardcoded to
-    use (unfortunately, this might be out of date).
-    """
-    
-    # There's two configuration options that can overwrite the default
-    # authorities: DirServer and AlternateDirAuthority.
-    
-    # TODO: Both options accept a set of flags to more precisely set what they
-    # overwrite. Ideally this would account for these flags to more accurately
-    # identify authority connections from relays.
-    
-    dirServerCfg = self.getOption("DirServer", [], True)
-    altDirAuthCfg = self.getOption("AlternateDirAuthority", [], True)
-    altAuthoritiesCfg = dirServerCfg + altDirAuthCfg
-    
-    if altAuthoritiesCfg:
-      result = []
-      
-      # entries are of the form:
-      # [nickname] [flags] address:port fingerprint
-      for entry in altAuthoritiesCfg:
-        locationComp = entry.split()[-2] # address:port component
-        result.append(tuple(locationComp.split(":", 1)))
-      
-      return result
-    else:
-      return list(DIR_SERVERS)
-  
   def getPathPrefix(self):
     """
     Provides the path prefix that should be used for fetching tor resources.



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits