From 28571b951043e728fac993e32d9305d99e94ccbd Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Sat, 6 Mar 2010 04:11:36 +0000 Subject: [PATCH] tweaked the new settings for relays and firewalls; updated parsing script too svn:r21826 --- Orbot/AUTHORS | 8 ++++---- Orbot/AndroidManifest.xml | 6 ++++-- Orbot/assets/torrc | 6 ++---- Orbot/res/xml/preferences.xml | 15 ++++++++------- Orbot/src/org/torproject/android/Orbot.java | 8 +++++--- .../src/org/torproject/android/TorConstants.java | 4 ++-- 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/Orbot/AUTHORS b/Orbot/AUTHORS index 85d042c5..2690a6f2 100644 --- a/Orbot/AUTHORS +++ b/Orbot/AUTHORS @@ -12,13 +12,13 @@ Main Authors: Nathan Freitas developed the primary Android application and managed the porting of Tor to Android. +Jake Appelbaum regular gave Nathan a +swift kick in the rear to get this done. He has also provided +extensive guidance and review. Most recently he has been +promoted to Chief Application Resource Editor. Contributors: ------------- -Jake Appelbaum regular gave Nathan a -swift kick in the rear to get this done. He has also provided -extensive guidance and review. - Nick Mathewson wrote some of the patch code to support the compiling of Tor and LibEvent on Android, and generaly provided guidance in the entire effort. diff --git a/Orbot/AndroidManifest.xml b/Orbot/AndroidManifest.xml index 87dad257..9b3629e0 100644 --- a/Orbot/AndroidManifest.xml +++ b/Orbot/AndroidManifest.xml @@ -4,8 +4,10 @@ android:versionName="011301.2" android:versionCode="2"> - - + + + + + + - + - + - + +android:enabled="true"> - + diff --git a/Orbot/src/org/torproject/android/Orbot.java b/Orbot/src/org/torproject/android/Orbot.java index 15d18a52..fd243875 100644 --- a/Orbot/src/org/torproject/android/Orbot.java +++ b/Orbot/src/org/torproject/android/Orbot.java @@ -477,6 +477,7 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On } } + String bridgeList = prefs.getString(PREF_BRIDGES_LIST,""); if (useBridges) @@ -512,6 +513,7 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On else { torrcText.append("UseBridges 0"); + torrcText.append('\n'); } try @@ -531,13 +533,13 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On } catch (Exception e) { - Toast.makeText(this, "Your FascistFirewall settings caused an exception!", + Toast.makeText(this,"Your FascistFirewall settings caused an exception!", Toast.LENGTH_LONG).show(); } try { - if (becomeRelay && !useBridges && !fascistFirewall) + if (becomeRelay && (!useBridges) && (!fascistFirewall)) { int ORPort = Integer.parseInt(prefs.getString(PREF_OR_PORT, "9001")); String nickname = prefs.getString(PREF_OR_NICKNAME, "Orbot"); @@ -556,7 +558,7 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On } catch (Exception e) { - Toast.makeText(this, "Your relay settings caused an exception!", Toast.LENGTH_LONG).show(); + Toast.makeText(this,"Your relay settings caused an exception!", Toast.LENGTH_LONG).show(); } Utils.saveTextFile(TorServiceConstants.TORRC_INSTALL_PATH, torrcText.toString()); diff --git a/Orbot/src/org/torproject/android/TorConstants.java b/Orbot/src/org/torproject/android/TorConstants.java index 55c50e87..f1a95a2d 100644 --- a/Orbot/src/org/torproject/android/TorConstants.java +++ b/Orbot/src/org/torproject/android/TorConstants.java @@ -34,8 +34,8 @@ public interface TorConstants { public final static String PREF_BRIDGES_ENABLED = "pref_bridges_enabled"; public final static String PREF_BRIDGES_UPDATED = "pref_bridges_enabled"; public final static String PREF_BRIDGES_LIST = "pref_bridges_list"; - public final static String PREF_OR = "pref_relay"; - public final static String PREF_OR_PORT = "pref_relay_port"; + public final static String PREF_OR = "pref_or"; + public final static String PREF_OR_PORT = "pref_or_port"; public final static String PREF_OR_NICKNAME = "pref_or_nickname"; public final static String PREF_FASCIST_FIREWALL = "pref_fascist_firewall"; public final static String PREF_FASCIST_FIREWALL_PORTS = "pref_fascist_firewall_ports";