diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt index f9d1e03070..5469836d2c 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt @@ -48,6 +48,7 @@ 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.network.PREF_DOH_SHECAN import eu.kanade.tachiyomi.util.CrashLogUtil import eu.kanade.tachiyomi.util.lang.launchNonCancellable import eu.kanade.tachiyomi.util.lang.withUIContext @@ -257,6 +258,7 @@ class SettingsAdvancedScreen : SearchableSettings { PREF_DOH_MULLVAD to "Mullvad", PREF_DOH_CONTROLD to "Control D", PREF_DOH_NJALLA to "Njalla", + PREF_DOH_SHECAN to "Shecan", ), onValueChanged = { context.toast(R.string.requires_app_restart) diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt b/core/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt index 9c71919c51..95f448f135 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt @@ -20,6 +20,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 +const val PREF_DOH_SHECAN = 12 fun OkHttpClient.Builder.dohCloudflare() = dns( DnsOverHttps.Builder().client(build()) @@ -145,7 +146,6 @@ fun OkHttpClient.Builder.dohMullvad() = dns( * unfiltered option * Source : https://controld.com/free-dns/? */ - fun OkHttpClient.Builder.dohControlD() = dns( DnsOverHttps.Builder().client(build()) .url("https://freedns.controld.com/p0".toHttpUrl()) @@ -160,7 +160,6 @@ fun OkHttpClient.Builder.dohControlD() = dns( /* * Njalla - * * Non logging and uncensored */ fun OkHttpClient.Builder.dohNajalla() = dns( @@ -172,3 +171,16 @@ fun OkHttpClient.Builder.dohNajalla() = dns( ) .build(), ) + +/** + * Source: https://shecan.ir/ + */ +fun OkHttpClient.Builder.dohShecan() = dns( + DnsOverHttps.Builder().client(build()) + .url("https://free.shecan.ir/dns-query".toHttpUrl()) + .bootstrapDnsHosts( + InetAddress.getByName("178.22.122.100"), + InetAddress.getByName("185.51.200.2"), + ) + .build(), +) diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt b/core/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt index 7c63887732..adf77d07e3 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt @@ -54,6 +54,7 @@ class NetworkHelper(context: Context) { PREF_DOH_MULLVAD -> builder.dohMullvad() PREF_DOH_CONTROLD -> builder.dohControlD() PREF_DOH_NJALLA -> builder.dohNajalla() + PREF_DOH_SHECAN -> builder.dohShecan() } return builder