|
@@ -17,6 +17,8 @@ const val PREF_DOH_ALIDNS = 5
|
|
|
const val PREF_DOH_DNSPOD = 6
|
|
|
const val PREF_DOH_360 = 7
|
|
|
const val PREF_DOH_QUAD101 = 8
|
|
|
+const val PREF_DOH_MULLVAD = 9
|
|
|
+const val PREF_DOH_CONTROLD = 10
|
|
|
|
|
|
fun OkHttpClient.Builder.dohCloudflare() = dns(
|
|
|
DnsOverHttps.Builder().client(build())
|
|
@@ -120,3 +122,37 @@ fun OkHttpClient.Builder.dohQuad101() = dns(
|
|
|
)
|
|
|
.build(),
|
|
|
)
|
|
|
+
|
|
|
+/*
|
|
|
+ * Mullvad DoH
|
|
|
+ * without ad blocking option
|
|
|
+ * Source : https://mullvad.net/en/help/dns-over-https-and-dns-over-tls/
|
|
|
+ */
|
|
|
+fun OkHttpClient.Builder.dohMullvad() = dns(
|
|
|
+ DnsOverHttps.Builder().client(build())
|
|
|
+ .url("https://doh.mullvad.net/dns-query".toHttpUrl())
|
|
|
+ .bootstrapDnsHosts(
|
|
|
+ InetAddress.getByName("194.242.2.2"),
|
|
|
+ InetAddress.getByName("193.19.108.2"),
|
|
|
+ InetAddress.getByName("2a07:e340::2"),
|
|
|
+ )
|
|
|
+ .build(),
|
|
|
+)
|
|
|
+
|
|
|
+/*
|
|
|
+ * Control D
|
|
|
+ * unfiltered option
|
|
|
+ * Source : https://controld.com/free-dns/?
|
|
|
+ */
|
|
|
+
|
|
|
+fun OkHttpClient.Builder.dohControlD() = dns(
|
|
|
+ DnsOverHttps.Builder().client(build())
|
|
|
+ .url("https://freedns.controld.com/p0".toHttpUrl())
|
|
|
+ .bootstrapDnsHosts(
|
|
|
+ InetAddress.getByName("76.76.2.0"),
|
|
|
+ InetAddress.getByName("76.76.10.0"),
|
|
|
+ InetAddress.getByName("2606:1a40::"),
|
|
|
+ InetAddress.getByName("2606:1a40:1::"),
|
|
|
+ )
|
|
|
+ .build(),
|
|
|
+)
|