Tor plugin for Android using native Tor binary, jtorctl and jsocks.

Only the ARM binary is included at present. Better control of the Tor
process is needed - it's possible for it to be left running when Briar
exits, and if the cookie file is deleted it's no longer possible to stop
the process.
This commit is contained in:
akwizgran
2013-04-25 05:09:25 +01:00
parent 1e5e78cc44
commit 3939ae6d60
12 changed files with 608 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ import net.sf.briar.api.plugins.simplex.SimplexPluginFactory;
import net.sf.briar.plugins.droidtooth.DroidtoothPluginFactory;
import net.sf.briar.plugins.tcp.LanTcpPluginFactory;
import net.sf.briar.plugins.tcp.WanTcpPluginFactory;
import net.sf.briar.plugins.tor.TorPluginFactory;
import android.content.Context;
import com.google.inject.AbstractModule;
@@ -60,11 +61,13 @@ public class AndroidModule extends AbstractModule {
DuplexPluginFactory droidtooth = new DroidtoothPluginFactory(
pluginExecutor, androidExecutor, appContext,
crypto.getSecureRandom());
DuplexPluginFactory tor = new TorPluginFactory(pluginExecutor,
appContext);
DuplexPluginFactory lan = new LanTcpPluginFactory(pluginExecutor);
DuplexPluginFactory wan = new WanTcpPluginFactory(pluginExecutor,
shutdownManager);
final Collection<DuplexPluginFactory> factories =
Arrays.asList(droidtooth, lan, wan);
Arrays.asList(droidtooth, tor, lan, wan);
return new DuplexPluginConfig() {
public Collection<DuplexPluginFactory> getFactories() {
return factories;