commit 8d7a79a52a9bf069f44d7e517983cbbf48ad590c Author: n8fr8 nathan@guardianproject.info Date: Wed Nov 11 20:53:52 2020 -0500
add use IPtProxy function --- .../org/torproject/android/service/OrbotService.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java index 27b58c20..1b930f46 100644 --- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java +++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java @@ -314,11 +314,9 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb sendCallbackStatus(STATUS_STOPPING); sendCallbackLogMessage(getString(R.string.status_shutting_down));
- String bridgeList = Prefs.getBridgesList(); - boolean useIPtProxy = bridgeList.contains("obfs3")|| bridgeList.contains("obfs4")||bridgeList.contains("meek"); - if (useIPtProxy) + if (useIPtProxy()) IPtProxy.stopObfs4Proxy(); - + killAllDaemons();
//stop the foreground priority and make sure to remove the persistant notification @@ -335,6 +333,12 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
}
+ private static boolean useIPtProxy () + { + String bridgeList = Prefs.getBridgesList(); + return bridgeList.contains("obfs3")|| bridgeList.contains("obfs4")||bridgeList.contains("meek"); + } + private void killAllDaemons() throws Exception {
if (conn != null) { @@ -1749,9 +1753,7 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb if (!TextUtils.isEmpty(action)) { if (action.equals(ACTION_START) || action.equals(ACTION_START_ON_BOOT)) {
- String bridgeList = Prefs.getBridgesList(); - boolean useIPtProxy = bridgeList.contains("obfs3")|| bridgeList.contains("obfs4")||bridgeList.contains("meek"); - if (useIPtProxy) + if (useIPtProxy()) IPtProxy.startObfs4Proxy("DEBUG", false, false);
startTor();
tor-commits@lists.torproject.org