diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 3c03e99b..9a53ad5d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -47,6 +47,4 @@
-
-
diff --git a/CHANGELOG b/CHANGELOG
index 2c499b13..eb70de7c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,12 @@
NOTE: Specific #s below correspond to Trac tickets logged and maintained at https://trac.torproject.org/projects/tor/
+1.0.0 - 2010-08-10
+- Added "Proxy Settings" help screen
+- Handle potential null pointers on process settings where service not yet active
+
0.0.9x - 2010-08-03
- Revised Orbot install wizard
-- Integrated Tor 0.2.2.14 binary
+- Integrated Tor 0.2.2.14 and iptables 4.x binary
- Fixed "got root" detection method
- Fixed Per App Torification handling so it updates on exit from Settings screen
diff --git a/default.properties b/default.properties
index d8796c79..06c219ae 100644
--- a/default.properties
+++ b/default.properties
@@ -10,5 +10,5 @@
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
-target=Google Inc.:Google APIs:3
+target=android-3
apk-configurations=
diff --git a/res/layout/layout_wizard_tips.xml b/res/layout/layout_wizard_tips.xml
index 00b5323f..8e4275b5 100644
--- a/res/layout/layout_wizard_tips.xml
+++ b/res/layout/layout_wizard_tips.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a9284867..799f7bc0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -96,7 +96,15 @@ and all DNS requests. This includes the built-in Browser, Gmail, YouTube and Map
We encourage you to download & use apps that know how to connect directly to Orbot. Click on the buttons below to install.
OTRCHAT - Secure instant messaging client for Android
ORWEB (Android 1.x Only) - Browser designed for privacy & for Orbot
- Proxy Help - Learn how to configure apps to work with Orbot
+ Proxy Settings - Learn how to configure apps to work with Orbot
+
+ Proxy Settings
+ If the Android app you are using can support the use of an HTTP or SOCKS proxy, then you can configure it to connect to Orbot and use Tor.\n\n
+ The host settings is 127.0.0.1 or "localhost". For HTTP, the port setting is 8118. For SOCKS, the proxy is 9050. You should use SOCKS4A or SOCKS5 if possible.
+ \n\n
+ You can learn more about proxying on Android via the FAQ at: http://tinyurl.com/proxyandroid
+
+
Orbot is ready!
Hundreds of thousands of people around the world use Tor for a wide variety of reasons: journalists and bloggers, human rights workers, law enforcement officers, soldiers, corporations, citizens of repressive regimes, and just ordinary citizens... and now you are ready to, as well!
diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index bfd356b8..017054a9 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -32,6 +32,7 @@ import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
@@ -398,100 +399,114 @@ public class Orbot extends Activity implements OnClickListener, TorConstants
private void processSettings () throws RemoteException
{
+ try
+ {
+ if (mService == null)
+ return; //nothing to do if the service isn't connected yet
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+
+ boolean useBridges = prefs.getBoolean(PREF_BRIDGES_ENABLED, false);
+
+ //boolean autoUpdateBridges = prefs.getBoolean(PREF_BRIDGES_UPDATED, false);
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
-
- boolean useBridges = prefs.getBoolean(PREF_BRIDGES_ENABLED, false);
-
- boolean autoUpdateBridges = prefs.getBoolean(PREF_BRIDGES_UPDATED, false);
-
- boolean becomeRelay = prefs.getBoolean(PREF_OR, false);
-
- boolean ReachableAddresses = prefs.getBoolean(PREF_REACHABLE_ADDRESSES,false);
-
- boolean enableTransparentProxy = prefs.getBoolean(PREF_TRANSPARENT, false);
-
- mService.updateTransProxy();
-
- String bridgeList = prefs.getString(PREF_BRIDGES_LIST,"");
-
- if (useBridges)
- {
- if (bridgeList == null || bridgeList.length() == 0)
- {
+ boolean becomeRelay = prefs.getBoolean(PREF_OR, false);
+
+ boolean ReachableAddresses = prefs.getBoolean(PREF_REACHABLE_ADDRESSES,false);
+
+ boolean enableTransparentProxy = prefs.getBoolean(PREF_TRANSPARENT, false);
- showAlert("Bridge Error","In order to use the bridge feature, you must enter at least one bridge IP address." +
- "Send an email to bridges@torproject.org with the line \"get bridges\" by itself in the body of the mail from a gmail account.");
+ mService.updateTransProxy();
+
+ String bridgeList = prefs.getString(PREF_BRIDGES_LIST,"");
+
+ if (useBridges)
+ {
+ if (bridgeList == null || bridgeList.length() == 0)
+ {
-
- return;
- }
-
-
- mService.updateConfiguration("UseBridges", "1", false);
+ showAlert("Bridge Error","In order to use the bridge feature, you must enter at least one bridge IP address." +
+ "Send an email to bridges@torproject.org with the line \"get bridges\" by itself in the body of the mail from a gmail account.");
+
+
+ return;
+ }
+
+
+ mService.updateConfiguration("UseBridges", "1", false);
+
+ String bridgeDelim = "\n";
+
+ if (bridgeList.indexOf(",") != -1)
+ {
+ bridgeDelim = ",";
+ }
+
+ StringTokenizer st = new StringTokenizer(bridgeList,bridgeDelim);
+ while (st.hasMoreTokens())
+ {
+
+ mService.updateConfiguration("bridge", st.nextToken(), false);
+
+ }
+
+ mService.updateConfiguration("UpdateBridgesFromAuthority", "0", false);
- String bridgeDelim = "\n";
-
- if (bridgeList.indexOf(",") != -1)
- {
- bridgeDelim = ",";
}
-
- StringTokenizer st = new StringTokenizer(bridgeList,bridgeDelim);
- while (st.hasMoreTokens())
+ else
{
-
- mService.updateConfiguration("bridge", st.nextToken(), false);
-
+ mService.updateConfiguration("UseBridges", "0", false);
+
}
-
- mService.updateConfiguration("UpdateBridgesFromAuthority", "0", false);
-
- }
- else
- {
- mService.updateConfiguration("UseBridges", "0", false);
-
- }
-
- try
- {
- if (ReachableAddresses)
- {
- String ReachableAddressesPorts =
- prefs.getString(PREF_REACHABLE_ADDRESSES_PORTS, "*:80,*:443");
-
- mService.updateConfiguration("ReachableAddresses", ReachableAddressesPorts, false);
-
- }
- }
+
+ try
+ {
+ if (ReachableAddresses)
+ {
+ String ReachableAddressesPorts =
+ prefs.getString(PREF_REACHABLE_ADDRESSES_PORTS, "*:80,*:443");
+
+ mService.updateConfiguration("ReachableAddresses", ReachableAddressesPorts, false);
+
+ }
+ }
+ catch (Exception e)
+ {
+ showAlert("Config Error","Your ReachableAddresses settings caused an exception!");
+ }
+
+ try
+ {
+ if (becomeRelay && (!useBridges) && (!ReachableAddresses))
+ {
+ int ORPort = Integer.parseInt(prefs.getString(PREF_OR_PORT, "9001"));
+ String nickname = prefs.getString(PREF_OR_NICKNAME, "Orbot");
+
+ mService.updateConfiguration("ORPort", ORPort + "", false);
+ mService.updateConfiguration("Nickname", nickname, false);
+ mService.updateConfiguration("ExitPolicy", "reject *:*", false);
+
+ }
+ }
+ catch (Exception e)
+ {
+ showAlert("Uh-oh!","Your relay settings caused an exception!");
+
+ return;
+ }
+
+ if (mService != null)
+ mService.saveConfiguration();
+ }
catch (Exception e)
{
- showAlert("Config Error","Your ReachableAddresses settings caused an exception!");
- }
-
- try
- {
- if (becomeRelay && (!useBridges) && (!ReachableAddresses))
- {
- int ORPort = Integer.parseInt(prefs.getString(PREF_OR_PORT, "9001"));
- String nickname = prefs.getString(PREF_OR_NICKNAME, "Orbot");
-
- mService.updateConfiguration("ORPort", ORPort + "", false);
- mService.updateConfiguration("Nickname", nickname, false);
- mService.updateConfiguration("ExitPolicy", "reject *:*", false);
-
- }
- }
- catch (Exception e)
- {
- showAlert("Uh-oh!","Your relay settings caused an exception!");
+ showAlert("Uh-oh!","There was an error updating your settings");
+ Log.w(TAG, "processSettings()", e);
+
return;
}
- mService.saveConfiguration();
-
}
@@ -623,15 +638,47 @@ public class Orbot extends Activity implements OnClickListener, TorConstants
}
- /*
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ try
+ {
+
+ if (mService == null)
+ {
+
+ }
+ else if (mService.getStatus() == STATUS_READY)
+ {
+
+ startTor();
+
+ }
+ else
+ {
+
+ stopTor();
+
+ }
+
+ }
+ catch (Exception e)
+ {
+ Log.i(TAG,"error onclick",e);
+ }
+
+ return super.onTouchEvent(event);
+ }
+
+ /*
* (non-Javadoc)
* @see android.view.View.OnClickListener#onClick(android.view.View)
*/
public void onClick(View view) {
// the start button
- if (view.getId()==R.id.imgStatus || view.getId()==R.id.lblStatus)
- {
+ // if (view.getId()==R.id.imgStatus || view.getId()==R.id.lblStatus)
+ // {
try
{
@@ -658,7 +705,7 @@ public class Orbot extends Activity implements OnClickListener, TorConstants
Log.i(TAG,"error onclick",e);
}
- }
+ // }
}
diff --git a/src/org/torproject/android/WizardHelper.java b/src/org/torproject/android/WizardHelper.java
index 36ecef89..e8810abc 100644
--- a/src/org/torproject/android/WizardHelper.java
+++ b/src/org/torproject/android/WizardHelper.java
@@ -207,6 +207,18 @@ public class WizardHelper implements TorConstants {
}
});
+ Button btn3 = (Button)view.findViewById(R.id.WizardRootButtonProxyHelp);
+
+ btn3.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+ showProxyHelp();
+
+ }
+ });
+
showCustomDialog(title, view,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
@@ -380,5 +392,17 @@ public class WizardHelper implements TorConstants {
.show();
}
+ private void showProxyHelp ()
+ {
+
+ LayoutInflater li = LayoutInflater.from(context);
+ View view = li.inflate(R.layout.layout_wizard_proxy_help, null);
+
+ new AlertDialog.Builder(context)
+ .setTitle(context.getString(R.string.wizard_proxy_help_info))
+ .setView(view)
+ .show();
+ }
+
}