|
@@ -12,6 +12,7 @@ import java.net.InetAddress
|
|
|
const val PREF_DOH_CLOUDFLARE = 1
|
|
|
const val PREF_DOH_GOOGLE = 2
|
|
|
const val PREF_DOH_ADGUARD = 3
|
|
|
+const val PREF_DOH_QUAD9 = 4
|
|
|
|
|
|
fun OkHttpClient.Builder.dohCloudflare() = dns(
|
|
|
DnsOverHttps.Builder().client(build())
|
|
@@ -35,7 +36,9 @@ fun OkHttpClient.Builder.dohGoogle() = dns(
|
|
|
.url("https://dns.google/dns-query".toHttpUrl())
|
|
|
.bootstrapDnsHosts(
|
|
|
InetAddress.getByName("8.8.4.4"),
|
|
|
- InetAddress.getByName("8.8.8.8")
|
|
|
+ InetAddress.getByName("8.8.8.8"),
|
|
|
+ InetAddress.getByName("2001:4860:4860::8888"),
|
|
|
+ InetAddress.getByName("2001:4860:4860::8844"),
|
|
|
)
|
|
|
.build()
|
|
|
)
|
|
@@ -52,3 +55,15 @@ fun OkHttpClient.Builder.dohAdGuard() = dns(
|
|
|
)
|
|
|
.build()
|
|
|
)
|
|
|
+
|
|
|
+fun OkHttpClient.Builder.dohQuad9() = dns(
|
|
|
+ DnsOverHttps.Builder().client(build())
|
|
|
+ .url("https://dns.quad9.net/dns-query".toHttpUrl())
|
|
|
+ .bootstrapDnsHosts(
|
|
|
+ InetAddress.getByName("9.9.9.9"),
|
|
|
+ InetAddress.getByName("149.112.112.112"),
|
|
|
+ InetAddress.getByName("2620:fe::fe"),
|
|
|
+ InetAddress.getByName("2620:fe::9"),
|
|
|
+ )
|
|
|
+ .build()
|
|
|
+)
|