diff options
author | cyBerta <cyberta@riseup.net> | 2024-01-25 02:32:55 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2024-01-25 02:32:55 +0100 |
commit | 23278cefe308043228c9da9b4937d27888146206 (patch) | |
tree | f851b9e9bad156a00b694ade42eb9c2a2be3b6c2 /app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java | |
parent | ed8a28962675b540389fc9280ab1122613230fa8 (diff) |
fix VpnConfigGenerator Test, move RSAHelper and ObfsVpnHelper out of ConfigHelper, use injection pattern for these helpers
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java | 7 |
1 files changed, 6 insertions, 1 deletions
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 b35a04cd..a04c3686 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 @@ -40,6 +40,7 @@ import static se.leap.bitmaskclient.base.models.Constants.USE_BRIDGES; import static se.leap.bitmaskclient.base.models.Constants.USE_IPv6_FIREWALL; import static se.leap.bitmaskclient.base.models.Constants.USE_OBFUSCATION_PINNING; import static se.leap.bitmaskclient.base.models.Constants.USE_SNOWFLAKE; +import static se.leap.bitmaskclient.base.models.Constants.USE_SYSTEM_PROXY; import android.content.Context; import android.content.SharedPreferences; @@ -460,12 +461,16 @@ public class PreferenceHelper { return getBoolean(ALLOW_EXPERIMENTAL_TRANSPORTS, false); } + public static boolean useSystemProxy() { + return getBoolean(USE_SYSTEM_PROXY, true); + } + public static void setUseObfuscationPinning(Boolean pinning) { putBoolean(USE_OBFUSCATION_PINNING, pinning); } public static boolean useObfuscationPinning() { - return ConfigHelper.ObfsVpnHelper.useObfsVpn() && + return ObfsVpnHelper.useObfsVpn() && getUseBridges() && getBoolean(USE_OBFUSCATION_PINNING, false) && !TextUtils.isEmpty(getObfuscationPinningIP()) && |