diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt b/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt index b73828d81..9c71919c5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt @@ -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(), +) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt index 6c1e2ebec..9dfd2f82b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt @@ -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 diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index a289ebbda..ed3e4b6a8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -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"