From a995b8a674ef8e89e0c86b0f113016f8fa07c716 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 5 Nov 2021 23:28:48 +0100 Subject: reset tor proxy port used by okhttp on bridges settings disabled --- .../main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java b/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java index 28242388..663e339e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java @@ -14,6 +14,7 @@ import java.util.Set; import de.blinkt.openvpn.VpnProfile; import se.leap.bitmaskclient.base.models.Provider; +import se.leap.bitmaskclient.tor.TorStatusObservable; import static android.content.Context.MODE_PRIVATE; import static se.leap.bitmaskclient.base.models.Constants.ALLOW_TETHERING_BLUETOOTH; @@ -151,6 +152,9 @@ public class PreferenceHelper { public static void useBridges(Context context, boolean isEnabled) { putBoolean(context, USE_BRIDGES, isEnabled); + if (!isEnabled) { + TorStatusObservable.setProxyPort(-1); + } } public static void saveBattery(Context context, boolean isEnabled) { -- cgit v1.2.3