Merge branch 'fixwizard'

This commit is contained in:
Nathan Freitas 2011-11-14 03:25:27 -05:00
commit 64ed05eb5a
9 changed files with 103 additions and 9 deletions

View File

@ -27,7 +27,7 @@ provided guidance in the entire effort.
Adam Langley made the original valiant effort to port Tor to Android.
Sathyanarayanan <me@gsathya.in> created a patch for the wizard
Sathyanarayanan <gsathya@torproject.org> created a patch for the wizard
which updated the icon and link for the secure chat app info to point
to Gibberbot, and hopefully will continue to contribute useful patches.

45
GSoC.txt Normal file
View File

@ -0,0 +1,45 @@
GSoC Plan
=========
A tl;dr version
---------------
I will be improving the Orbot UI/UX, and adding several features such as data statistics and also
implementing the TorCheck API. I plan on extending the ORLib library and also creating an ORLib enabled
app as a sort of primer for other third party apps to follow
The full version
----------------
Orbot UI/UX
===========
At the moment, the Orbot UI/UX is clustered and not very intuitive. I plan on improving the existing
elements of the UI and also add a variety of new features such as
* A new Set up Wizard ( which checks for iptables )
* Changes to the preferences ( should be made to follow the Android guidelines)
Orbot Core app work
===================
At the moment, Orbot displays a successful connection without actually checking the connection. This is a
pressing issue, because the user is not notified if the set-up has failed, unless he/she manually checks
the torcheck web service. This should be made automatic by making using of the TorCheck API. Also, Orbot
should be configured to show more information about the data being transmitted such as -
* Amount of data transferred
* Quality of the connection
* Number of circuits connected
ORLib
=====
Currently, ORLib is very minimal at the moment, both in term of features and support/documentation. ORLib
is very critical to the use of Orbot as it provides transparent proxying on non-rooted devices ( A major
chunk of android phones are un-rooted). I intend to -
* Improve the existing library by adding additional features
* Check for existing of Orbot
* Check status of connection to Tor
* Provide option to start Orbot via intent
* Request hidden service by port, and get return hidden service .onion address
* Create an ORLib enabled “Twitter, Status.net or other micro blogging Client” A sort of primer for
third-party apps
* Improve the documentation

View File

@ -228,7 +228,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
private void doExit ()
{
try {
//one of the confusing things about all of this code is the multiple
//places where things like "stopTor" are called, both in the Activity and the Service
//not something to tackle in your first iteration, but i thin we can talk about fixing
@ -247,6 +247,8 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
Log.w(TAG, e);
}
//Kill all the wizard activities
setResult(RESULT_CLOSE_ALL);
finish();
}

View File

@ -41,7 +41,7 @@ public interface TorConstants {
public final static String PREF_TRANSPARENT_ALL = "pref_transparent_all";
public final static String PREF_HAS_ROOT = "has_root";
public final static int RESULT_CLOSE_ALL = 0;
}

View File

@ -43,7 +43,7 @@ import android.util.Log;
public class TorService extends Service implements TorServiceConstants, TorConstants, Runnable, EventHandler
{
public static boolean ENABLE_DEBUG_LOG = false;
public static boolean ENABLE_DEBUG_LOG = true;
private static int currentStatus = STATUS_OFF;
@ -1063,7 +1063,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
*/
private final ITorService.Stub mBinder = new ITorService.Stub() {
public void registerCallback(ITorServiceCallback cb) {
if (cb != null) mCallbacks.register(cb);
}
@ -1293,7 +1293,8 @@ public class TorService extends Service implements TorServiceConstants, TorConst
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
ENABLE_DEBUG_LOG = prefs.getBoolean("pref_enable_logging",false);
//ENABLE_DEBUG_LOG = prefs.getBoolean("pref_enable_logging",false);
ENABLE_DEBUG_LOG = true;
Log.i(TAG,"debug logging:" + ENABLE_DEBUG_LOG);
boolean useBridges = prefs.getBoolean(TorConstants.PREF_BRIDGES_ENABLED, false);

View File

@ -61,6 +61,18 @@ public class ConfigureTransProxy extends Activity implements TorConstants {
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch(resultCode)
{
case RESULT_CLOSE_ALL:
setResult(RESULT_CLOSE_ALL);
finish();
}
super.onActivityResult(requestCode, resultCode, data);
}
private void setupUI ()
{
@ -202,7 +214,7 @@ public class ConfigureTransProxy extends Activity implements TorConstants {
@Override
public void onClick(DialogInterface dialog, int which) {
context.startActivity(new Intent(context, Orbot.class));
startActivityForResult(new Intent(getBaseContext(), Orbot.class), 1);
}
};

View File

@ -55,7 +55,18 @@ public class LotsaText extends Activity implements TorConstants{
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch(resultCode)
{
case RESULT_CLOSE_ALL:
setResult(RESULT_CLOSE_ALL);
finish();
}
super.onActivityResult(requestCode, resultCode, data);
}
private void stepOne() {
@ -135,6 +146,6 @@ public class LotsaText extends Activity implements TorConstants{
});
}
}

View File

@ -55,6 +55,18 @@ public class Permissions extends Activity implements TorConstants {
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch(resultCode)
{
case RESULT_CLOSE_ALL:
setResult(RESULT_CLOSE_ALL);
finish();
}
super.onActivityResult(requestCode, resultCode, data);
}
private void stepThree(){
boolean isRootPossible = TorServiceUtils.isRootPossible();

View File

@ -49,6 +49,17 @@ public class TipsAndTricks extends Activity implements TorConstants {
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch(resultCode)
{
case RESULT_CLOSE_ALL:
setResult(RESULT_CLOSE_ALL);
finish();
}
super.onActivityResult(requestCode, resultCode, data);
}
void stepFive(){
String title = getString(R.string.wizard_tips_title);
@ -141,7 +152,7 @@ public class TipsAndTricks extends Activity implements TorConstants {
@Override
public void onClick(View v) {
startActivity(new Intent(getBaseContext(), Orbot.class));
startActivityForResult(new Intent(getBaseContext(), Orbot.class), 1);
}
});