mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-26 07:06:03 +03:00
Add "Njalla" dns provider (#7908)
* Add "Njalla" dns provider Details ~~Tho there is none~~: https://dns.njal.la/ * Lint
This commit is contained in:
parent
90c08303fa
commit
d85af2fec6
3 changed files with 20 additions and 0 deletions
|
@ -19,6 +19,7 @@ const val PREF_DOH_360 = 7
|
|||
const val PREF_DOH_QUAD101 = 8
|
||||
const val PREF_DOH_MULLVAD = 9
|
||||
const val PREF_DOH_CONTROLD = 10
|
||||
const val PREF_DOH_NJALLA = 11
|
||||
|
||||
fun OkHttpClient.Builder.dohCloudflare() = dns(
|
||||
DnsOverHttps.Builder().client(build())
|
||||
|
@ -156,3 +157,18 @@ fun OkHttpClient.Builder.dohControlD() = dns(
|
|||
)
|
||||
.build(),
|
||||
)
|
||||
|
||||
/*
|
||||
* Njalla
|
||||
*
|
||||
* Non logging and uncensored
|
||||
*/
|
||||
fun OkHttpClient.Builder.dohNajalla() = dns(
|
||||
DnsOverHttps.Builder().client(build())
|
||||
.url("https://dns.njal.la/dns-query".toHttpUrl())
|
||||
.bootstrapDnsHosts(
|
||||
InetAddress.getByName("95.215.19.53"),
|
||||
InetAddress.getByName("2001:67c:2354:2::53"),
|
||||
)
|
||||
.build(),
|
||||
)
|
||||
|
|
|
@ -49,6 +49,7 @@ class NetworkHelper(context: Context) {
|
|||
PREF_DOH_QUAD101 -> builder.dohQuad101()
|
||||
PREF_DOH_MULLVAD -> builder.dohMullvad()
|
||||
PREF_DOH_CONTROLD -> builder.dohControlD()
|
||||
PREF_DOH_NJALLA -> builder.dohNajalla()
|
||||
}
|
||||
|
||||
return builder
|
||||
|
|
|
@ -25,6 +25,7 @@ import eu.kanade.tachiyomi.network.PREF_DOH_CONTROLD
|
|||
import eu.kanade.tachiyomi.network.PREF_DOH_DNSPOD
|
||||
import eu.kanade.tachiyomi.network.PREF_DOH_GOOGLE
|
||||
import eu.kanade.tachiyomi.network.PREF_DOH_MULLVAD
|
||||
import eu.kanade.tachiyomi.network.PREF_DOH_NJALLA
|
||||
import eu.kanade.tachiyomi.network.PREF_DOH_QUAD101
|
||||
import eu.kanade.tachiyomi.network.PREF_DOH_QUAD9
|
||||
import eu.kanade.tachiyomi.ui.base.controller.openInBrowser
|
||||
|
@ -200,6 +201,7 @@ class SettingsAdvancedController(
|
|||
"Quad 101",
|
||||
"Mullvad",
|
||||
"Control D",
|
||||
"Njalla",
|
||||
)
|
||||
entryValues = arrayOf(
|
||||
"-1",
|
||||
|
@ -213,6 +215,7 @@ class SettingsAdvancedController(
|
|||
PREF_DOH_QUAD101.toString(),
|
||||
PREF_DOH_MULLVAD.toString(),
|
||||
PREF_DOH_CONTROLD.toString(),
|
||||
PREF_DOH_NJALLA.toString(),
|
||||
)
|
||||
defaultValue = "-1"
|
||||
summary = "%s"
|
||||
|
|
Loading…
Reference in a new issue