don't stop tor when service onStartCommand() is called again

This commit is contained in:
Nathan Freitas 2014-06-11 20:24:32 -04:00
parent fc6392932f
commit 42e069800a
1 changed files with 11 additions and 3 deletions

View File

@ -554,8 +554,6 @@ public class TorService extends Service implements TorServiceConstants, TorConst
logNotice("checking binary version: " + version);
stopTor();
TorResourceInstaller installer = new TorResourceInstaller(this, appBinHome);
String extraLines = prefs.getString("pref_custom_torrc", null);
@ -677,13 +675,23 @@ public class TorService extends Service implements TorServiceConstants, TorConst
}
logMessage ("Transparent Proxying: enabling...");
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();
//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);