mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Fix Quad9 DoH setting
This commit is contained in:
parent
d8c8d7c588
commit
d698d03521
2 changed files with 4 additions and 3 deletions
|
@ -26,7 +26,7 @@ fun OkHttpClient.Builder.dohCloudflare() = dns(
|
||||||
InetAddress.getByName("2606:4700:4700::1111"),
|
InetAddress.getByName("2606:4700:4700::1111"),
|
||||||
InetAddress.getByName("2606:4700:4700::1001"),
|
InetAddress.getByName("2606:4700:4700::1001"),
|
||||||
InetAddress.getByName("2606:4700:4700::0064"),
|
InetAddress.getByName("2606:4700:4700::0064"),
|
||||||
InetAddress.getByName("2606:4700:4700::6400")
|
InetAddress.getByName("2606:4700:4700::6400"),
|
||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,8 @@ fun OkHttpClient.Builder.dohGoogle() = dns(
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
|
|
||||||
// AdGuard "Default" DNS works too but for the sake of making sure no site is blacklisted, i picked "Unfiltered"
|
// AdGuard "Default" DNS works too but for the sake of making sure no site is blacklisted,
|
||||||
|
// we use "Unfiltered"
|
||||||
fun OkHttpClient.Builder.dohAdGuard() = dns(
|
fun OkHttpClient.Builder.dohAdGuard() = dns(
|
||||||
DnsOverHttps.Builder().client(build())
|
DnsOverHttps.Builder().client(build())
|
||||||
.url("https://dns-unfiltered.adguard.com/dns-query".toHttpUrl())
|
.url("https://dns-unfiltered.adguard.com/dns-query".toHttpUrl())
|
||||||
|
|
|
@ -41,7 +41,7 @@ class NetworkHelper(context: Context) {
|
||||||
PREF_DOH_CLOUDFLARE -> builder.dohCloudflare()
|
PREF_DOH_CLOUDFLARE -> builder.dohCloudflare()
|
||||||
PREF_DOH_GOOGLE -> builder.dohGoogle()
|
PREF_DOH_GOOGLE -> builder.dohGoogle()
|
||||||
PREF_DOH_ADGUARD -> builder.dohAdGuard()
|
PREF_DOH_ADGUARD -> builder.dohAdGuard()
|
||||||
PREF_DOH_QUAD9 -> builder.dohAdGuard()
|
PREF_DOH_QUAD9 -> builder.dohQuad9()
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder
|
return builder
|
||||||
|
|
Loading…
Reference in a new issue