Independent DoH servers and a server list synced from the repository

This commit is contained in:
2026-10-14 10:55:04 +00:00
parent 59194a7914
commit 6bd72d3583
4 changed files with 161 additions and 8 deletions
@@ -5,6 +5,10 @@ import android.content.Context
class Prefs(context: Context) {
private val sp = context.applicationContext.getSharedPreferences("doh", Context.MODE_PRIVATE)
init {
ServerList.ensureLoaded(context.applicationContext)
}
var providerId: String
get() = sp.getString(KEY_PROVIDER, null) ?: Providers.default.id
set(value) = sp.edit().putString(KEY_PROVIDER, value).apply()