Removed DNSSEC option

Needs to be per host
pull/214/head
M66B 12 months ago
parent c92d8a91bf
commit cd0ccba175

@ -90,7 +90,7 @@ public class DnsHelper {
String domain = UriHelper.getEmailDomain(email);
if (domain == null)
continue;
DnsRecord[] records = _lookup(context, domain, "mx", CHECK_TIMEOUT);
DnsRecord[] records = _lookup(context, domain, "mx", CHECK_TIMEOUT, false);
if (records.length == 0)
throw new UnknownHostException(domain);
}
@ -98,14 +98,13 @@ public class DnsHelper {
@NonNull
static DnsRecord[] lookup(Context context, String name, String type) {
return _lookup(context, name, type, LOOKUP_TIMEOUT);
return _lookup(context, name, type, LOOKUP_TIMEOUT, false);
}
@NonNull
private static DnsRecord[] _lookup(Context context, String name, String type, int timeout) {
private static DnsRecord[] _lookup(Context context, String name, String type, int timeout, boolean dns_secure) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean dns_custom = prefs.getBoolean("dns_custom", false);
boolean dns_secure = prefs.getBoolean("dns_secure", false);
String filter = null;
int colon = type.indexOf(':');

@ -98,7 +98,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
private SwitchCompat swStandaloneVpn;
private SwitchCompat swDnsCustom;
private EditText etDnsExtra;
private SwitchCompat swDnsSecure;
private SwitchCompat swTcpKeepAlive;
private SwitchCompat swSslUpdate;
private SwitchCompat swSslHarden;
@ -131,7 +130,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
"download_headers", "download_eml", "download_plain",
"require_validated", "require_validated_captive", "vpn_only",
"timeout", "prefer_ip4", "bind_socket", "standalone_vpn",
"dns_extra", "dns_custom", "dns_secure",
"dns_extra", "dns_custom",
"tcp_keep_alive",
"ssl_update", "ssl_harden", "ssl_harden_strict", "cert_strict", "cert_transparency", "check_names",
"open_safe", "http_redirect",
@ -166,7 +165,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
swStandaloneVpn = view.findViewById(R.id.swStandaloneVpn);
swDnsCustom = view.findViewById(R.id.swDnsCustom);
etDnsExtra = view.findViewById(R.id.etDnsExtra);
swDnsSecure = view.findViewById(R.id.swDnsSecure);
swTcpKeepAlive = view.findViewById(R.id.swTcpKeepAlive);
swSslUpdate = view.findViewById(R.id.swSslUpdate);
swSslHarden = view.findViewById(R.id.swSslHarden);
@ -351,7 +349,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
DnsHelper.clear(buttonView.getContext());
prefs.edit().putBoolean("dns_custom", checked).apply();
etDnsExtra.setEnabled(checked || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
swDnsSecure.setEnabled(checked);
}
});
@ -372,15 +369,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
}
});
swDnsSecure.setVisibility(debug || BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
swDnsSecure.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
DnsHelper.clear(buttonView.getContext());
prefs.edit().putBoolean("dns_secure", checked).apply();
}
});
swTcpKeepAlive.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@ -768,8 +756,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
swDnsCustom.setChecked(prefs.getBoolean("dns_custom", false));
etDnsExtra.setText(prefs.getString("dns_extra", null));
etDnsExtra.setEnabled(swDnsCustom.isChecked() || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
swDnsSecure.setChecked(prefs.getBoolean("dns_secure", false));
swDnsSecure.setEnabled(swDnsCustom.isChecked());
swTcpKeepAlive.setChecked(prefs.getBoolean("tcp_keep_alive", false));
swSslUpdate.setChecked(prefs.getBoolean("ssl_update", true));
swSslHarden.setChecked(prefs.getBoolean("ssl_harden", false));

@ -172,7 +172,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
"sync_shared_folders",
"download_headers", "download_eml",
"prefer_ip4", "bind_socket", "standalone_vpn", // force reconnect
"dns_extra", "dns_custom", "dns_secure", // force reconnect
"dns_extra", "dns_custom", // force reconnect
"tcp_keep_alive", // force reconnect
"ssl_harden", "ssl_harden_strict", "cert_strict", "cert_transparency", "check_names", "bouncy_castle", "bc_fips", // force reconnect
"experiments", "debug", "protocol", // force reconnect

@ -461,18 +461,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDns" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swDnsSecure"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_dns_secure"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etDnsExtra"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swTcpKeepAlive"
android:layout_width="0dp"
@ -482,7 +470,7 @@
android:text="@string/title_advanced_tcp_keep_alive"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swDnsSecure"
app:layout_constraintTop_toBottomOf="@id/etDnsExtra"
app:switchPadding="12dp" />
<TextView

Loading…
Cancel
Save