[tor-commits] r24758: {projects} last modification for StrictNodes, exit node support (in projects/android/trunk/Orbot: res/xml src/org/torproject/android/service)

Nathan Freitas nathan at freitas.net
Tue May 17 02:02:36 UTC 2011


Author: n8fr8
Date: 2011-05-17 02:02:36 +0000 (Tue, 17 May 2011)
New Revision: 24758

Modified:
   projects/android/trunk/Orbot/res/xml/preferences.xml
   projects/android/trunk/Orbot/src/org/torproject/android/service/TorService.java
Log:
last modification for StrictNodes, exit node support


Modified: projects/android/trunk/Orbot/res/xml/preferences.xml
===================================================================
--- projects/android/trunk/Orbot/res/xml/preferences.xml	2011-05-16 14:39:26 UTC (rev 24757)
+++ projects/android/trunk/Orbot/res/xml/preferences.xml	2011-05-17 02:02:36 UTC (rev 24758)
@@ -42,17 +42,26 @@
 
 </PreferenceCategory>
 
-<PreferenceCategory android:title="Exit Nodes">
-
+<PreferenceCategory android:title="Node Configuration" android:summary="These are advanced settings that can reduce your anonymity">
+<EditTextPreference android:key="pref_entrance_nodes"
+android:title="Entrance Nodes"
+android:summary="Fingerprints, nicks, countries and addresses for the first hop"
+android:dialogTitle="Enter Entrance Nodes"
+/>
 <EditTextPreference android:key="pref_exit_nodes"
 android:title="Exit Nodes"
-android:summary="Fingerprints, nicknames, country codes and address patterns for the last hop"
+android:summary="Fingerprints, nicks, countries and addresses for the last hop"
 android:dialogTitle="Enter Exit Nodes"
 />
+<EditTextPreference android:key="pref_exclude_nodes"
+android:title="Exclude Nodes"
+android:summary="Fingerprints, nicks, countries and addresses to exclude"
+android:dialogTitle="Enter Exclude Nodes"
+/>
 
 <CheckBoxPreference android:defaultValue="false" 
-android:title="Strict Exit Nodes" android:key="pref_strict_exit_nodes" 
-android:summary="Use only these specific exit nodes"/>
+android:title="Strict Nodes" android:key="pref_strict_nodes" 
+android:summary="Use *only* these specified nodes"/>
 
 </PreferenceCategory> 
 <PreferenceCategory android:title="Bridges">

Modified: projects/android/trunk/Orbot/src/org/torproject/android/service/TorService.java
===================================================================
--- projects/android/trunk/Orbot/src/org/torproject/android/service/TorService.java	2011-05-16 14:39:26 UTC (rev 24757)
+++ projects/android/trunk/Orbot/src/org/torproject/android/service/TorService.java	2011-05-17 02:02:36 UTC (rev 24758)
@@ -1288,8 +1288,10 @@
 
         boolean enableHiddenServices = prefs.getBoolean("pref_hs_enable", false);
 
-        boolean enableStrictExitNodes = prefs.getBoolean("pref_strict_exit_nodes", false);
+        boolean enableStrictNodes = prefs.getBoolean("pref_strict_nodes", false);
+        String entranceNodes = prefs.getString("pref_entrance_nodes", "");
         String exitNodes = prefs.getString("pref_exit_nodes", "");
+        String excludeNodes = prefs.getString("pref_exclude_nodes", "");
         
         
 		//boolean enableTransparentProxy = prefs.getBoolean(TorConstants.PREF_TRANSPARENT, false);
@@ -1308,13 +1310,10 @@
 			}
         }
         
-        if (exitNodes.length() > 0)
-        {
-        	
-			mBinder.updateConfiguration("ExitNodes", exitNodes, false);
-			mBinder.updateConfiguration("StrictExitNodes", enableStrictExitNodes ? "1" : "0", false);
-			
-        }
+        mBinder.updateConfiguration("EntranceNodes", entranceNodes, false);
+        mBinder.updateConfiguration("ExitNodes", exitNodes, false);
+		mBinder.updateConfiguration("ExcludeNodes", excludeNodes, false);
+		mBinder.updateConfiguration("StrictExitNodes", enableStrictNodes ? "1" : "0", false);
 		
 		if (useBridges)
 		{



More information about the tor-commits mailing list