|
|
@ -99,6 +99,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|
|
|
private SwitchCompat swSslHardenStrict;
|
|
|
|
private SwitchCompat swSslHardenStrict;
|
|
|
|
private SwitchCompat swCertStrict;
|
|
|
|
private SwitchCompat swCertStrict;
|
|
|
|
private SwitchCompat swOpenSafe;
|
|
|
|
private SwitchCompat swOpenSafe;
|
|
|
|
|
|
|
|
private SwitchCompat swHttpRedirect;
|
|
|
|
private SwitchCompat swBouncyCastle;
|
|
|
|
private SwitchCompat swBouncyCastle;
|
|
|
|
private SwitchCompat swFipsMode;
|
|
|
|
private SwitchCompat swFipsMode;
|
|
|
|
private ImageButton ibBouncyCastle;
|
|
|
|
private ImageButton ibBouncyCastle;
|
|
|
@ -120,7 +121,8 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|
|
|
"download_headers", "download_eml", "download_plain",
|
|
|
|
"download_headers", "download_eml", "download_plain",
|
|
|
|
"require_validated", "require_validated_captive", "vpn_only",
|
|
|
|
"require_validated", "require_validated_captive", "vpn_only",
|
|
|
|
"timeout", "prefer_ip4", "bind_socket", "standalone_vpn", "tcp_keep_alive",
|
|
|
|
"timeout", "prefer_ip4", "bind_socket", "standalone_vpn", "tcp_keep_alive",
|
|
|
|
"ssl_harden", "ssl_harden_strict", "cert_strict", "open_safe", "bouncy_castle", "bc_fips"
|
|
|
|
"ssl_harden", "ssl_harden_strict", "cert_strict", "open_safe", "http_redirect",
|
|
|
|
|
|
|
|
"bouncy_castle", "bc_fips"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -154,6 +156,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|
|
|
swSslHardenStrict = view.findViewById(R.id.swSslHardenStrict);
|
|
|
|
swSslHardenStrict = view.findViewById(R.id.swSslHardenStrict);
|
|
|
|
swCertStrict = view.findViewById(R.id.swCertStrict);
|
|
|
|
swCertStrict = view.findViewById(R.id.swCertStrict);
|
|
|
|
swOpenSafe = view.findViewById(R.id.swOpenSafe);
|
|
|
|
swOpenSafe = view.findViewById(R.id.swOpenSafe);
|
|
|
|
|
|
|
|
swHttpRedirect = view.findViewById(R.id.swHttpRedirect);
|
|
|
|
swBouncyCastle = view.findViewById(R.id.swBouncyCastle);
|
|
|
|
swBouncyCastle = view.findViewById(R.id.swBouncyCastle);
|
|
|
|
swFipsMode = view.findViewById(R.id.swFipsMode);
|
|
|
|
swFipsMode = view.findViewById(R.id.swFipsMode);
|
|
|
|
ibBouncyCastle = view.findViewById(R.id.ibBouncyCastle);
|
|
|
|
ibBouncyCastle = view.findViewById(R.id.ibBouncyCastle);
|
|
|
@ -361,6 +364,13 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swHttpRedirect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("http_redirect", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
swBouncyCastle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
swBouncyCastle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
@ -660,6 +670,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|
|
|
swSslHardenStrict.setEnabled(swSslHarden.isChecked());
|
|
|
|
swSslHardenStrict.setEnabled(swSslHarden.isChecked());
|
|
|
|
swCertStrict.setChecked(prefs.getBoolean("cert_strict", true));
|
|
|
|
swCertStrict.setChecked(prefs.getBoolean("cert_strict", true));
|
|
|
|
swOpenSafe.setChecked(prefs.getBoolean("open_safe", false));
|
|
|
|
swOpenSafe.setChecked(prefs.getBoolean("open_safe", false));
|
|
|
|
|
|
|
|
swHttpRedirect.setChecked(prefs.getBoolean("http_redirect", true));
|
|
|
|
swBouncyCastle.setChecked(prefs.getBoolean("bouncy_castle", false));
|
|
|
|
swBouncyCastle.setChecked(prefs.getBoolean("bouncy_castle", false));
|
|
|
|
swFipsMode.setChecked(prefs.getBoolean("bc_fips", false));
|
|
|
|
swFipsMode.setChecked(prefs.getBoolean("bc_fips", false));
|
|
|
|
swFipsMode.setEnabled(swBouncyCastle.isChecked());
|
|
|
|
swFipsMode.setEnabled(swBouncyCastle.isChecked());
|
|
|
|