last modification for StrictNodes, exit node support
svn:r24758
This commit is contained in:
		
							parent
							
								
									81fbc85a07
								
							
						
					
					
						commit
						4c6df2ad36
					
				|  | @ -42,17 +42,26 @@ android:enabled="true"/> | ||||||
| 
 | 
 | ||||||
| </PreferenceCategory> | </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" | <EditTextPreference android:key="pref_exit_nodes" | ||||||
| android:title="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" | 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"  | <CheckBoxPreference android:defaultValue="false"  | ||||||
| android:title="Strict Exit Nodes" android:key="pref_strict_exit_nodes"  | android:title="Strict Nodes" android:key="pref_strict_nodes"  | ||||||
| android:summary="Use only these specific exit nodes"/> | android:summary="Use *only* these specified nodes"/> | ||||||
| 
 | 
 | ||||||
| </PreferenceCategory>  | </PreferenceCategory>  | ||||||
| <PreferenceCategory android:title="Bridges"> | <PreferenceCategory android:title="Bridges"> | ||||||
|  |  | ||||||
|  | @ -1288,8 +1288,10 @@ public class TorService extends Service implements TorServiceConstants, Runnable | ||||||
| 
 | 
 | ||||||
|         boolean enableHiddenServices = prefs.getBoolean("pref_hs_enable", false); |         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 exitNodes = prefs.getString("pref_exit_nodes", ""); | ||||||
|  |         String excludeNodes = prefs.getString("pref_exclude_nodes", ""); | ||||||
|          |          | ||||||
|          |          | ||||||
| 		//boolean enableTransparentProxy = prefs.getBoolean(TorConstants.PREF_TRANSPARENT, false); | 		//boolean enableTransparentProxy = prefs.getBoolean(TorConstants.PREF_TRANSPARENT, false); | ||||||
|  | @ -1308,13 +1310,10 @@ public class TorService extends Service implements TorServiceConstants, Runnable | ||||||
| 			} | 			} | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         if (exitNodes.length() > 0) |         mBinder.updateConfiguration("EntranceNodes", entranceNodes, false); | ||||||
|         { |  | ||||||
|         	 |  | ||||||
|         mBinder.updateConfiguration("ExitNodes", exitNodes, false); |         mBinder.updateConfiguration("ExitNodes", exitNodes, false); | ||||||
| 			mBinder.updateConfiguration("StrictExitNodes", enableStrictExitNodes ? "1" : "0", false); | 		mBinder.updateConfiguration("ExcludeNodes", excludeNodes, false); | ||||||
| 			 | 		mBinder.updateConfiguration("StrictExitNodes", enableStrictNodes ? "1" : "0", false); | ||||||
|         } |  | ||||||
| 		 | 		 | ||||||
| 		if (useBridges) | 		if (useBridges) | ||||||
| 		{ | 		{ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue