[tor-commits] [orbot/master] don't stop tor when service onStartCommand() is called again
n8fr8 at torproject.org
n8fr8 at torproject.org
Thu Jun 12 00:26:26 UTC 2014
commit 42e069800ad3cce3ba8789c57dec8c04dae4147b
Author: Nathan Freitas <nathan at freitas.net>
Date: Wed Jun 11 20:24:32 2014 -0400
don't stop tor when service onStartCommand() is called again
---
src/org/torproject/android/service/TorService.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index aac581b..e9029c3 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -553,8 +553,6 @@ public class TorService extends Service implements TorServiceConstants, TorConst
String version = prefs.getString(PREF_BINARY_TOR_VERSION_INSTALLED,null);
logNotice("checking binary version: " + version);
-
- stopTor();
TorResourceInstaller installer = new TorResourceInstaller(this, appBinHome);
@@ -676,14 +674,24 @@ public class TorService extends Service implements TorServiceConstants, TorConst
}
+
+
+ logMessage ("Transparent Proxying: updating Tor settings...");
+
+ mBinder.updateConfiguration("TransPort","9040",false);
+ mBinder.updateConfiguration("DNSPort","5400",false);
+ mBinder.updateConfiguration("VirtualAddrNetwork","10.192.0.0/10",false);
+ mBinder.updateConfiguration("AutomapHostsOnResolve","1",false);
+ mBinder.saveConfiguration();
- logMessage ("Transparent Proxying: enabling...");
//TODO: Find a nice place for the next (commented) line
//TorTransProxy.setDNSProxying();
int code = 0; // Default state is "okay"
+ logMessage ("Transparent Proxying: clearing existing rules...");
+
//clear rules first
mTransProxy.clearTransparentProxyingAll(this);
More information about the tor-commits
mailing list