Add DoH back

JSDelivr is no longer China friendly
This commit is contained in:
topjohnwu
2022-01-13 03:50:29 -08:00
parent 9c93fe6003
commit a7af8b5722
36 changed files with 111 additions and 1 deletions
@@ -189,6 +189,15 @@ object UpdateChecker : BaseSettingsItem.Toggle() {
}
}
object DoHToggle : BaseSettingsItem.Toggle() {
override val title = R.string.settings_doh_title.asText()
override val description = R.string.settings_doh_description.asText()
override var value = Config.doh
set(value) = setV(value, field, { field = it }) {
Config.doh = it
}
}
// check whether is module already installed beforehand?
object SystemlessHosts : BaseSettingsItem.Blank() {
override val title = R.string.settings_hosts_title.asText()
@@ -52,7 +52,7 @@ class SettingsViewModel : BaseViewModel(), BaseSettingsItem.Callback {
// Manager
list.addAll(listOf(
AppSettings,
UpdateChannel, UpdateChannelUrl, UpdateChecker, DownloadPath
UpdateChannel, UpdateChannelUrl, DoHToggle, UpdateChecker, DownloadPath
))
if (Info.env.isActive) {
if (Const.USER_ID == 0) {