[or-cvs] r10300: stop resolving domain names for simulated client requests, a (puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl)

kloesing at seul.org kloesing at seul.org
Wed May 23 19:24:49 UTC 2007


Author: kloesing
Date: 2007-05-23 15:24:49 -0400 (Wed, 23 May 2007)
New Revision: 10300

Modified:
   puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java
   puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java
   puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java
   puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java
Log:
stop resolving domain names for simulated client requests, allow other IP addresses than 127.0.0.1, adjusted some configuration settings

Modified: puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java
===================================================================
--- puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java	2007-05-23 04:02:52 UTC (rev 10299)
+++ puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java	2007-05-23 19:24:49 UTC (rev 10300)
@@ -251,8 +251,9 @@
 						socksPort);
 				Proxy p = new Proxy(Type.SOCKS, isa);
 
-				// create target address for socket
-				InetSocketAddress hs = new InetSocketAddress(targetAddress,
+				// create target address for socket -- don't resolve the target address
+				// to an IP address!
+				InetSocketAddress hs = InetSocketAddress.createUnresolved(targetAddress,
 						targetPort);
 
 				// start loop

Modified: puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java
===================================================================
--- puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java	2007-05-23 04:02:52 UTC (rev 10299)
+++ puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java	2007-05-23 19:24:49 UTC (rev 10300)
@@ -34,10 +34,9 @@
 
 		this.configuration.add("VersioningAuthoritativeDirectory 1");
 
-		this.configuration.add("DirAllowPrivateAddresses 1");
-
 		this.configuration.add("NamingAuthoritativeDirectory 1");
 
+		this.configuration.add("V2AuthoritativeDirectory 1");
 		this.configuration.add("V1AuthoritativeDirectory 1");
 
 		// TODO this only works since Tor 0.1.2.x!!!
@@ -78,7 +77,7 @@
 
 		// put together everything
 		String dirServerString = "DirServer " + this.nodeName
-				+ " hs 127.0.0.1:" + this.dirPort + " " + fingerprint;
+				+ " hs " + localIpAddress + ":" + this.dirPort + " " + fingerprint;
 		return dirServerString;
 	}
 }

Modified: puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java
===================================================================
--- puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java	2007-05-23 04:02:52 UTC (rev 10299)
+++ puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java	2007-05-23 19:24:49 UTC (rev 10300)
@@ -164,6 +164,9 @@
 		this.configuration.add("Log notice stdout");
 		this.configuration.add("Log debug file log");
 
+		// TODO do we need this in all nodes or only in directory nodes?!
+		this.configuration.add("DirAllowPrivateAddresses 1");
+
 		// allow two nodes on the same circuit to be in the same /16 net
 		// TODO this depends in private or public network setting!!!
 		// TODO even more important: this only works since Tor 0.1.2.x!!!

Modified: puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java
===================================================================
--- puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java	2007-05-23 04:02:52 UTC (rev 10299)
+++ puppetor/trunk/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java	2007-05-23 19:24:49 UTC (rev 10300)
@@ -21,6 +21,8 @@
 
 public class RouterNodeImpl extends ProxyNodeImpl implements RouterNode {
 
+	protected final String localIpAddress = "127.0.0.1";
+	
 	/**
 	 * OR port of this router.
 	 */
@@ -70,14 +72,14 @@
 		this.configuration.add("DirPort " + dirPort);
 
 		// this node's address should be localhost and not guessed by Tor
-		this.configuration.add("Address 127.0.0.1");
+		this.configuration.add("Address " + localIpAddress);
 
 		// the OR port may only be contacted locally
-		this.configuration.add("ORListenAddress 127.0.0.1");
+		this.configuration.add("ORListenAddress " + localIpAddress);
 
 		// offer directory only locally (either by being an authority, or by
 		// mirroring it)
-		this.configuration.add("DirListenAddress 127.0.0.1");
+		this.configuration.add("DirListenAddress " + localIpAddress);
 
 		// allow exit to private network and everything else (node will only
 		// be used by other nodes in the private network, so no worry)



More information about the tor-commits mailing list