[tor-commits] r24533: {arm} Overwriting local connections with our fingerprint so they'r (arm/trunk/src/interface/connections)

Damian Johnson atagar1 at gmail.com
Sat Apr 2 20:39:38 UTC 2011


Author: atagar
Date: 2011-04-02 20:39:38 +0000 (Sat, 02 Apr 2011)
New Revision: 24533

Modified:
   arm/trunk/src/interface/connections/connEntry.py
Log:
Overwriting local connections with our fingerprint so they're identified as our relay.



Modified: arm/trunk/src/interface/connections/connEntry.py
===================================================================
--- arm/trunk/src/interface/connections/connEntry.py	2011-04-02 19:57:30 UTC (rev 24532)
+++ arm/trunk/src/interface/connections/connEntry.py	2011-04-02 20:39:38 UTC (rev 24533)
@@ -129,11 +129,11 @@
     determined.
     """
     
-    conn = torTools.getConn()
-    orPort = self.port if self.isORPort else None
-    myFingerprint = conn.getRelayFingerprint(self.ipAddr, orPort)
+    myFingerprint = self.getFingerprint()
     
-    if myFingerprint: return conn.getRelayNickname(myFingerprint)
+    if myFingerprint != "UNKNOWN":
+      conn = torTools.getConn()
+      return conn.getRelayNickname(myFingerprint)
     else: return "UNKNOWN"
 
 class ConnectionEntry(entries.ConnectionPanelEntry):
@@ -190,6 +190,10 @@
     self.startTime = time.time()
     self.isInitialConnection = False
     
+    # overwrite the local fingerprint with ours
+    conn = torTools.getConn()
+    self.local.fingerprintOverwrite = conn.getInfo("fingerprint")
+    
     # True if the connection has matched the properties of a client/directory
     # connection every time we've checked. The criteria we check is...
     #   client    - first hop in an established circuit
@@ -204,7 +208,6 @@
     self.appPid = None
     self.isAppResolving = False
     
-    conn = torTools.getConn()
     myOrPort = conn.getOption("ORPort")
     myDirPort = conn.getOption("DirPort")
     mySocksPort = conn.getOption("SocksPort", "9050")



More information about the tor-commits mailing list