17 Commits
Author SHA1 Message Date
kalarina 9604d07cea Changelog for 1.0.9 in all languages, mention donation links 2026-10-16 17:06:56 +00:00
kalarina b13adc5340 Add donation links to servers next to the privacy policy 2026-10-16 17:02:29 +00:00
kalarina 5f2dbccebf Point Obtainium links to Gitea 2026-10-16 11:59:23 +00:00
kalarina bab6c754dc Redesign README: store badges, release badge, install options 2026-10-16 11:51:04 +00:00
kalarina ddc219d01f Upload files to "assets" 2026-10-16 11:43:09 +00:00
kalarina 275eb3ab0b Upload files to "assets" 2026-10-16 11:40:39 +00:00
kalarina 62c941a07b Release 1.0.9 2026-10-15 13:43:22 +00:00
kalarina e039ab0d46 Remove HTTP/3 badge from the server list 2026-10-14 13:35:32 +00:00
kalarina 032a49f1f8 New privacy policy icon on servers, shorter About description 2026-10-14 12:12:17 +00:00
kalarina 9ca55a4d40 Simpler server list format, document adding servers in CONTRIBUTING 2026-10-14 11:03:35 +00:00
kalarina 00e30cb858 Mention new servers in the 1.0.7 changelog 2026-10-14 10:56:09 +00:00
kalarina 41a8f94f65 Update server list button and privacy policy links on Home 2026-10-14 10:55:35 +00:00
kalarina 6bd72d3583 Independent DoH servers and a server list synced from the repository 2026-10-14 10:55:04 +00:00
kalarina 59194a7914 Remove VirusTotal workflow 2026-10-14 10:42:10 +00:00
kalarina 0f8bb8dc9d Read VirusTotal key from secret 2026-10-14 10:20:55 +00:00
kalarina 8bccbe597c Update .gitea/workflows/virustotal.yml 2026-10-14 10:11:07 +00:00
kalarina 73959b16b2 Scan release APKs with VirusTotal 2026-10-14 09:23:23 +00:00
32 changed files with 422 additions and 62 deletions
@@ -9,6 +9,7 @@ title: "[Preset] "
- URL:
- Homepage or documentation:
- Privacy policy (DoH servers) or license (blocklists):
- Donation page (DoH servers, optional):
- [ ] DoH server: public and supports RFC 8484
- [ ] Blocklist: public and actively maintained
+38 -5
View File
@@ -9,7 +9,8 @@ Issues and pull requests go to the repository on [Gitea](https://git.skysparkle.
## Ways to help
- **Report a bug** — use the *Bug report* template.
- **Suggest a DoH server or blocklist** — use the *DoH server or blocklist* template.
- **Add a DoH server** — add one line to [`servers/servers.txt`](servers/servers.txt), see [Adding a DoH server](#adding-a-doh-server).
- **Suggest a blocklist** — use the *DoH server or blocklist* template.
- **Suggest a feature** — use the *Feature request* template; check [Out of scope](#out-of-scope) first.
- **Fix a translation** — use the *Translation fix* template or send a pull request.
- **Write code** — see [Pull requests](#pull-requests).
@@ -35,12 +36,44 @@ These will not be accepted:
- Logging, uploading or sharing users' DNS queries.
- Features that require Google Play Services or a proprietary SDK.
## DoH servers and blocklists
## Adding a DoH server
- **DoH servers** must be public, support RFC 8484 and publish a privacy policy.
- **Blocklists** must be public, actively maintained and licensed for this kind of use.
The server list lives in [`servers/servers.txt`](servers/servers.txt). The app downloads it when the user taps **Update server list**, so a new server reaches users without a new release.
Include links to the server's documentation or the list's homepage in the request.
To add a server, open the file on Gitea, click **Edit**, add one line at the end and send it as a pull request:
```
Name | DoH URL | Privacy policy | h3 | Donation page
```
- **Name** — how the server appears in the app, up to 40 characters.
- **DoH URL** — the full `https://` address of the DoH endpoint.
- **Privacy policy** — an `https://` link to the operator's privacy policy. Lines without one are ignored.
- **h3** — optional. Add it only if the server supports HTTP/3.
- **Donation page** — optional. An `https://` link to the operator's own page for donations or support. The app shows it as a coin button next to the privacy policy. Only link to a page the operator runs or names on its website — no affiliate or third-party fundraising links.
Leave out any optional column you don't need; the app recognises them by their content. Examples:
```
Example DNS | https://dns.example.org/dns-query | https://example.org/privacy | h3 | https://example.org/donate
Example DNS | https://dns.example.org/dns-query | https://example.org/privacy | https://example.org/donate
Example DNS | https://dns.example.org/dns-query | https://example.org/privacy
```
The server must:
- be public and free, without an account;
- support RFC 8484;
- publish what it logs, and not sell or share query data;
- be run by a non-profit, a community or an individual rather than a large company.
Before sending, check that it works: in the app choose **Custom server**, enter the URL and tap **Test server**.
Please don't change the lines of the servers that ship with the app (SkySparkle, Quad9, Digitale Gesellschaft, UncensoredDNS, Freifunk München): the app always keeps their built-in addresses and links. To fix one of their links, open an issue instead. If you are unsure whether a server fits, open an issue with the *DoH server or blocklist* template instead.
## Blocklists
Blocklist presets must be public, actively maintained and licensed for this kind of use. Use the *DoH server or blocklist* template and include a link to the list's homepage.
## Translations
+28 -31
View File
@@ -1,23 +1,34 @@
<p align="center">
<img src="assets/icon-rounded.png" width="128" alt="SparkleDNS icon">
<img src="assets/icon-rounded.png" width="112" alt="SparkleDNS icon">
</p>
<h1 align="center">SparkleDNS</h1>
<p align="center"><b>A lightweight DNS-over-HTTPS client for Android.</b></p>
<p align="center">
<a href="https://git.skysparkle.cc/kalarina/Sparkledns/releases"><img src="assets/get-it-on-gitea.png" height="60" alt="Get it on Gitea"></a>
<b>A lightweight DNS-over-HTTPS client for Android.</b><br>
A local VPN that captures only DNS traffic and sends every query to the DoH server you choose (RFC 8484). Everything else goes through your normal connection.
</p>
<p align="center">
<img src="https://img.shields.io/badge/Android-8.0%2B-2e7d32?logo=android&logoColor=white&labelColor=1b1b1b" alt="Android 8.0+">
<img src="https://img.shields.io/badge/License-GPL--3.0--or--later-2e7d32?labelColor=1b1b1b" alt="GPL-3.0-or-later">
<a href="https://github.com/kalarina-bit/Sparkledns/releases/latest"><img src="https://img.shields.io/github/v/release/kalarina-bit/Sparkledns?style=for-the-badge&label=release&labelColor=1b1b1b&color=2e7d32" alt="Latest release"></a>
</p>
SparkleDNS starts a local VPN that captures only DNS traffic and sends every query to the DoH server you choose (RFC 8484). Everything else goes through your normal connection.
<p align="center">
<a href="https://f-droid.org/packages/cc.skysparkle.sparkledns/"><img src="assets/get-it-on%20(1).png" height="56" alt="Get it on F-Droid"></a>
<a href="https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://git.skysparkle.cc/kalarina/Sparkledns"><img src="assets/badge_obtainium.png" height="56" alt="Get it on Obtainium"></a>
<a href="https://github.com/kalarina-bit/Sparkledns/releases/latest"><img src="assets/get-it-on-github.png" height="56" alt="Get it on GitHub"></a>
<a href="https://git.skysparkle.cc/kalarina/Sparkledns/releases"><img src="assets/get-it-on-gitea.png" height="56" alt="Get it on Gitea"></a>
</p>
## Features
<p align="center">
<img src="assets/screenshots/1-your-dns-your-choice.png" width="160" alt="Your DNS, your choice">
<img src="assets/screenshots/2-protected.png" width="160" alt="Protected via SkySparkle">
<img src="assets/screenshots/3-stay-informed.png" width="160" alt="Stay informed">
<img src="assets/screenshots/4-block-your-way.png" width="160" alt="Block your way">
<img src="assets/screenshots/5-choose-your-own-route.png" width="160" alt="Choose your own route">
</p>
## ✨ Features
- 🔌 **One-tap connect/disconnect**, with a Quick Settings tile
- 🔄 **Switch servers on the fly** — the tunnel restarts automatically
@@ -27,27 +38,13 @@ SparkleDNS starts a local VPN that captures only DNS traffic and sends every que
- 🚫 **Custom blocklists** — your own domains plus hosts/domain/AdBlock lists by URL (HaGeZi Pro++ and TIF presets)
- 🔓 **No analytics, no Google Play Services**
## Screenshots
## <img src="assets/icon-install.png" width="32" alt=""> Installation
<p align="center">
<img src="assets/screenshots/1-your-dns-your-choice.png" width="200" alt="Your DNS, your choice">
<img src="assets/screenshots/2-protected.png" width="200" alt="Protected via SkySparkle">
<img src="assets/screenshots/3-stay-informed.png" width="200" alt="Stay informed">
<img src="assets/screenshots/4-block-your-way.png" width="200" alt="Block your way">
<img src="assets/screenshots/5-choose-your-own-route.png" width="200" alt="Choose your own route">
</p>
- **[F-Droid](https://f-droid.org/packages/cc.skysparkle.sparkledns/)** — install and update through the F-Droid client.
- **[Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://git.skysparkle.cc/kalarina/Sparkledns)** — installs the APK straight from Gitea releases and keeps it up to date.
- **Manually** — download the latest APK from [GitHub](https://github.com/kalarina-bit/Sparkledns/releases/latest) or [Gitea](https://git.skysparkle.cc/kalarina/Sparkledns/releases), allow installs from unknown sources for the app you open it with (Settings → Apps → Special access → Install unknown apps), then open the `.apk` and confirm.
## Installation
<img src="assets/icon-install.png" width="36" align="left">
1. Download the latest APK from the [Releases page](https://git.skysparkle.cc/kalarina/Sparkledns/releases).
2. Allow installs from unknown sources for the app you open it with (Settings → Apps → Special access → Install unknown apps).
3. Open the `.apk` file and confirm the install.
## Verifying a download
<img src="assets/icon-verify.png" width="36" align="left">
## <img src="assets/icon-verify.png" width="32" alt=""> Verifying a download
Every official APK is signed with the same key. Check it before installing:
@@ -63,7 +60,7 @@ The SHA-256 fingerprint of the signing certificate must be:
`apksigner` prints the same value in lowercase without colons. On Android you can check it with [AppVerifier](https://github.com/soupslurpr/AppVerifier) (app ID `cc.skysparkle.sparkledns`).
## Building from source
## <img src="assets/icon-structure.png" width="32" alt=""> Building from source
Requires JDK 17+ and Android SDK 36.
@@ -75,12 +72,12 @@ Requires JDK 17+ and Android SDK 36.
1. Bump `versionName` and `versionCode` in `app/build.gradle.kts` (`versionCode = major * 10000 + minor * 100 + patch`).
2. Add `fastlane/metadata/android/<locale>/changelogs/<versionCode>.txt`.
3. Tag the commit as `v<versionName>` (for example `v1.0.6`) — F-Droid detects new releases from these tags.
3. Tag the commit as `v<versionName>` (for example `v1.0.9`) — F-Droid detects new releases from these tags, so upload the signed APK to the release right away.
## Contributing
## 🤝 Contributing
Bug reports, DoH server and blocklist suggestions, translation fixes and pull requests are welcome in the [issue tracker](https://git.skysparkle.cc/kalarina/Sparkledns/issues). Please read [CONTRIBUTING.md](CONTRIBUTING.md) first — it explains what fits the project and how to send changes. To open an issue or a pull request, [create an account](https://git.skysparkle.cc/user/sign_up) on this Gitea.
## License
## 📄 License
[GNU General Public License v3.0 or later](LICENSE).
+2 -2
View File
@@ -13,8 +13,8 @@ android {
targetSdk = 36
// Single source of truth: the About screen reads these through BuildConfig.
// Kept as plain literals so F-Droid can detect new versions. Code = major * 10000 + minor * 100 + patch.
versionCode = 10007
versionName = "1.0.7"
versionCode = 10009
versionName = "1.0.9"
}
buildTypes {
@@ -263,7 +263,7 @@ private fun InfoRow(label: String, value: String) {
}
}
private fun openUrl(context: Context, url: String) {
internal fun openUrl(context: Context, url: String) {
runCatching {
context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
}
@@ -53,7 +53,9 @@ import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.OutlinedTextField
@@ -63,6 +65,7 @@ import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -121,6 +124,10 @@ fun HomeScreen(modifier: Modifier = Modifier) {
val stats = rememberLiveStats()
var selected by remember { mutableStateOf(prefs.providerId) }
val servers by ServerList.servers.collectAsState()
var syncing by remember { mutableStateOf(false) }
var syncResult by remember { mutableStateOf<TestResult?>(null) }
var shownSync by remember { mutableStateOf<TestResult?>(null) }
var customUrl by remember { mutableStateOf(prefs.customUrl) }
var customBootstrap by remember { mutableStateOf(prefs.customBootstrap) }
var customHttp3 by remember { mutableStateOf(prefs.customHttp3) }
@@ -140,7 +147,7 @@ fun HomeScreen(modifier: Modifier = Modifier) {
val isCustom = selected == Providers.CUSTOM_ID
val customValid = customUrl.trim().toHttpUrlOrNull()?.isHttps == true
val canConnect = !isCustom || customValid
val selectedProvider = remember(selected, customUrl, customBootstrap, customHttp3) { prefs.resolve() }
val selectedProvider = remember(selected, customUrl, customBootstrap, customHttp3, servers) { prefs.resolve() }
val customName = stringResource(R.string.custom)
fun nameOf(p: DohProvider) = if (p.id == Providers.CUSTOM_ID) customName else p.name
val shownProvider = active ?: selectedProvider
@@ -181,6 +188,30 @@ fun HomeScreen(modifier: Modifier = Modifier) {
testResult = null
}
// A server removed from the list falls back to the default one
LaunchedEffect(servers) {
if (selected != Providers.CUSTOM_ID && servers.none { it.id == selected }) select(Providers.default.id)
}
val syncOk = stringResource(R.string.servers_updated)
val syncFail = stringResource(R.string.servers_update_failed)
fun syncServers() {
syncing = true
syncResult = null
scope.launch {
val result = withContext(Dispatchers.IO) {
runCatching { ServerList.sync(context) }
.fold(
onSuccess = { TestResult(true, syncOk) },
onFailure = { TestResult(false, syncFail.format(it.message ?: it.javaClass.simpleName)) },
)
}
shownSync = result
syncResult = result
syncing = false
}
}
fun runTest() {
val provider = prefs.resolve()
testing = true
@@ -223,19 +254,49 @@ fun HomeScreen(modifier: Modifier = Modifier) {
onSwitch = { sendAction(context, DohVpnService.ACTION_START) },
)
SectionHeader(stringResource(R.string.servers))
SectionHeader(stringResource(R.string.servers)) {
if (syncing) {
Box(Modifier.size(48.dp), contentAlignment = Alignment.Center) {
CircularProgressIndicator(Modifier.size(20.dp), strokeWidth = 2.dp)
}
} else {
IconButton(onClick = ::syncServers) {
Icon(
painterResource(R.drawable.ic_refresh),
contentDescription = stringResource(R.string.servers_update),
modifier = Modifier.size(20.dp),
)
}
}
}
AnimatedVisibility(visible = syncResult != null, enter = Motion.expandIn, exit = Motion.collapseOut) {
shownSync?.let { result ->
HintCard(
text = result.text,
icon = if (result.ok) R.drawable.ic_check else R.drawable.ic_alert,
tint = if (result.ok) CachedColor else MaterialTheme.colorScheme.error,
onDismiss = { syncResult = null },
)
}
}
Card(Modifier.fillMaxWidth()) {
Column(Modifier.padding(vertical = 6.dp)) {
Providers.list.forEachIndexed { index, p ->
servers.forEachIndexed { index, p ->
if (index > 0) RowDivider()
ProviderRow(p.name, hostOf(p.url), p.http3, selected == p.id) { select(p.id) }
ProviderRow(
title = p.name,
subtitle = hostOf(p.url),
selected = selected == p.id,
onPolicy = p.policy?.let { url -> { openUrl(context, url) } },
onDonate = p.donate?.let { url -> { openUrl(context, url) } },
) { select(p.id) }
}
RowDivider()
ProviderRow(
title = stringResource(R.string.custom),
subtitle = hostOf(customUrl),
http3 = customHttp3,
selected = isCustom,
) { select(Providers.CUSTOM_ID) }
}
@@ -506,7 +567,14 @@ private fun CrashCard(report: String, onCopy: () -> Unit, onDismiss: () -> Unit)
}
@Composable
private fun ProviderRow(title: String, subtitle: String, http3: Boolean, selected: Boolean, onClick: () -> Unit) {
private fun ProviderRow(
title: String,
subtitle: String,
selected: Boolean,
onPolicy: (() -> Unit)? = null,
onDonate: (() -> Unit)? = null,
onClick: () -> Unit,
) {
val highlight by animateColorAsState(
if (selected) MaterialTheme.colorScheme.primary.copy(alpha = 0.08f) else Color.Transparent,
animationSpec = Motion.color,
@@ -532,9 +600,25 @@ private fun ProviderRow(title: String, subtitle: String, http3: Boolean, selecte
overflow = TextOverflow.Ellipsis,
)
}
if (http3) {
Spacer(Modifier.width(8.dp))
Pill("HTTP/3", MaterialTheme.colorScheme.primary)
if (onDonate != null) {
IconButton(onClick = onDonate, modifier = Modifier.size(40.dp)) {
Icon(
painterResource(R.drawable.ic_donate),
contentDescription = stringResource(R.string.donate),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.size(18.dp),
)
}
}
if (onPolicy != null) {
IconButton(onClick = onPolicy, modifier = Modifier.size(40.dp)) {
Icon(
painterResource(R.drawable.ic_policy),
contentDescription = stringResource(R.string.about_privacy_policy),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.size(18.dp),
)
}
}
}
}
@@ -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()
@@ -1,6 +1,14 @@
package cc.skysparkle.sparkledns
import android.content.Context
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import okhttp3.OkHttpClient
import okhttp3.Request
import java.io.File
import java.io.IOException
import java.util.concurrent.TimeUnit
data class DohProvider(
val id: String,
@@ -8,25 +16,149 @@ data class DohProvider(
val url: String,
val bootstrap: List<String> = emptyList(),
val http3: Boolean = false,
val policy: String? = null,
val donate: String? = null,
)
object Providers {
const val CUSTOM_ID = "custom"
const val DEFAULT_ID = "skysparkle"
val list = listOf(
DohProvider("skysparkle", "SkySparkle", "https://blog.skysparkle.cc/dns-query", http3 = true),
DohProvider("cloudflare", "Cloudflare", "https://cloudflare-dns.com/dns-query", listOf("1.1.1.1", "1.0.0.1")),
DohProvider("google", "Google", "https://dns.google/dns-query", listOf("8.8.8.8", "8.8.4.4")),
DohProvider("quad9", "Quad9", "https://dns.quad9.net/dns-query", listOf("9.9.9.9", "149.112.112.112")),
DohProvider("adguard", "AdGuard", "https://dns.adguard-dns.com/dns-query", listOf("94.140.14.14", "94.140.15.15")),
DohProvider("mullvad", "Mullvad", "https://dns.mullvad.net/dns-query", listOf("194.242.2.2")),
// Shipped with the app and used until the list from the repository is downloaded
val builtIn = listOf(
DohProvider(
"skysparkle", "SkySparkle", "https://blog.skysparkle.cc/dns-query",
http3 = true, policy = "https://skysparkle.cc/privacy?lang=en",
),
DohProvider(
"quad9", "Quad9", "https://dns.quad9.net/dns-query", listOf("9.9.9.9", "149.112.112.112"),
policy = "https://quad9.net/service/privacy/",
donate = "https://quad9.net/donate/",
),
DohProvider(
"digitale-gesellschaft", "Digitale Gesellschaft", "https://dns.digitale-gesellschaft.ch/dns-query",
listOf("185.95.218.42", "185.95.218.43"), http3 = true,
policy = "https://www.digitale-gesellschaft.ch/dns/",
donate = "https://www.digitale-gesellschaft.ch/uber-uns/unterstuetzer-werden/",
),
DohProvider(
"uncensoreddns", "UncensoredDNS", "https://anycast.uncensoreddns.org/dns-query", listOf("91.239.100.100"),
policy = "https://blog.uncensoreddns.org/faq/",
),
DohProvider(
"ffmuc", "Freifunk München", "https://doh.ffmuc.net/dns-query",
listOf("5.1.66.255", "185.150.99.255"), http3 = true,
policy = "https://ffmuc.net/dns-privacy/",
donate = "https://spende.ffmuc.net/",
),
)
val default: DohProvider get() = list.first()
val list: List<DohProvider> get() = ServerList.servers.value
// The project's own server stays the default whatever order the list uses
val default: DohProvider get() = list.firstOrNull { it.id == DEFAULT_ID } ?: list.first()
fun byId(id: String): DohProvider = list.firstOrNull { it.id == id } ?: default
}
// The server list kept in the project repository, so servers can change without an app update
object ServerList {
const val SOURCE = "https://git.skysparkle.cc/kalarina/Sparkledns/raw/branch/main/servers/servers.txt"
private const val FILE = "servers.txt"
private const val MAX_BYTES = 64 * 1024
private const val MAX_SERVERS = 50
private val _servers = MutableStateFlow(Providers.builtIn)
val servers: StateFlow<List<DohProvider>> = _servers
@Volatile private var loaded = false
private val client by lazy {
OkHttpClient.Builder()
.connectTimeout(15, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.build()
}
fun ensureLoaded(context: Context) {
if (loaded) return
synchronized(this) {
if (loaded) return
val cached = runCatching { File(context.filesDir, FILE).readText() }.getOrNull()
cached?.let(::parse)?.takeIf { it.isNotEmpty() }?.let { _servers.value = it }
loaded = true
}
}
// Blocking: call off the main thread. Returns the number of servers in the new list.
fun sync(context: Context): Int {
val request = Request.Builder().url(SOURCE).build()
val text = client.newCall(request).execute().use { response ->
if (!response.isSuccessful) throw IOException("HTTP ${response.code}")
val body = response.body ?: throw IOException("Empty response")
if (body.contentLength() > MAX_BYTES) throw IOException("List too large")
val bytes = body.byteStream().readNBytesCompat(MAX_BYTES + 1)
if (bytes.size > MAX_BYTES) throw IOException("List too large")
String(bytes, Charsets.UTF_8)
}
val parsed = parse(text)
if (parsed.isEmpty()) throw IOException("No servers found")
val file = File(context.filesDir, FILE)
val tmp = File(context.filesDir, "$FILE.tmp")
tmp.writeText(text)
if (!tmp.renameTo(file)) {
tmp.delete()
throw IOException("Cannot save list")
}
_servers.value = parsed
loaded = true
return parsed.size
}
// Format per line: Name | DoH URL | privacy policy URL | h3 (optional) | donation URL (optional).
// The optional columns are recognised by content, so either can be left out. See CONTRIBUTING.md.
fun parse(text: String): List<DohProvider> {
val builtInByHost = Providers.builtIn.associateBy { it.url.toHttpUrlOrNull()?.host }
val seen = HashSet<String>()
val result = ArrayList<DohProvider>()
for (raw in text.lineSequence()) {
val line = raw.trim()
if (line.isEmpty() || line.startsWith("#")) continue
val cols = line.split('|').map { it.trim() }
if (cols.size < 3) continue
val name = cols[0].take(40)
val url = cols[1].toHttpUrlOrNull()
val policy = cols[2].takeIf { it.toHttpUrlOrNull()?.isHttps == true }
if (name.isEmpty() || url == null || !url.isHttps) continue
val extras = cols.drop(3)
val http3 = extras.any { it.equals("h3", ignoreCase = true) }
val donate = extras.firstOrNull { it.toHttpUrlOrNull()?.isHttps == true }
// Shipped servers keep their address, id and links, so an edited list cannot redirect them
val pinned = builtInByHost[url.host]
val server = pinned
?: if (policy == null) continue
else DohProvider(url.host, name, cols[1], http3 = http3, policy = policy, donate = donate)
if (!seen.add(server.id)) continue
result += server
if (result.size >= MAX_SERVERS) break
}
return result
}
}
private fun java.io.InputStream.readNBytesCompat(limit: Int): ByteArray {
val out = java.io.ByteArrayOutputStream()
val buffer = ByteArray(8192)
var total = 0
while (total < limit) {
val read = read(buffer, 0, minOf(buffer.size, limit - total))
if (read < 0) break
out.write(buffer, 0, read)
total += read
}
return out.toByteArray()
}
fun parseIps(raw: String): List<String> =
raw.split(',', ';', ' ').map { it.trim() }.filter { it.isNotEmpty() }
+21
View File
@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M128,38 A90,90 0 1,1 128,218 A90,90 0 1,1 128,38 Z"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="11" />
<path
android:pathData="M156,99 C151,88 141,82 128,82 C112,82 100,91 100,105 C100,120 113,125 128,128 C144,131 158,137 158,153 C158,167 145,175 128,175 C113,175 101,168 97,156"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="11"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:pathData="M128,64 L128,82 M128,175 L128,193"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="11"
android:strokeLineCap="round" />
</vector>
+14
View File
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M128,38 L58,67 L58,120 C58,165 90,200 128,217 C166,200 198,165 198,120 L198,67 Z"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="11"
android:strokeLineJoin="round" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="M127.5,86.0 L135.8,111.6 L162.7,111.6 L140.9,127.4 L149.2,152.9 L127.5,137.1 L105.8,152.9 L114.1,127.4 L92.3,111.6 L119.2,111.6 Z" />
</vector>
+5 -1
View File
@@ -67,7 +67,7 @@
<string name="bl_list_info">%1$s Domains · %2$s</string>
<string name="bl_presets">Beliebte Listen</string>
<string name="bl_download_failed">Download fehlgeschlagen: %1$s</string>
<string name="about_desc">Verschlüsseltes DNS über HTTPS und HTTP/3 für das ganze Gerät. Nur DNS läuft über das lokale VPN, der übrige Verkehr bleibt unberührt.</string>
<string name="about_desc">DNS-Anfragen verschlüsseln, ohne den gesamten Verkehr über ein VPN zu leiten.</string>
<string name="about_version">Version</string>
<string name="about_protocol">Protokoll</string>
<string name="about_http3_yes">Auf diesem Gerät unterstützt</string>
@@ -84,6 +84,7 @@
<string name="group_system">System</string>
<string name="group_count">%1$d von %2$d über DNS</string>
<string name="about_privacy_policy">Datenschutzerklärung</string>
<string name="donate">Spenden</string>
<string name="licenses_title">Open-Source-Lizenzen</string>
<string name="licenses_hint">SparkleDNS basiert auf diesen Open-Source-Projekten. Tippe auf ein Projekt, um seine Seite zu öffnen.</string>
<string name="licenses_data">Sperrlisten-Daten (bei Bedarf geladen, nicht enthalten)</string>
@@ -94,4 +95,7 @@
<string name="open_settings">Einstellungen</string>
<string name="mon_no_match">Nichts passt zum Filter</string>
<string name="bl_title">Blockierung</string>
<string name="servers_update">Serverliste aktualisieren</string>
<string name="servers_updated">Serverliste aktualisiert</string>
<string name="servers_update_failed">Serverliste konnte nicht aktualisiert werden: %1$s</string>
</resources>
+5 -1
View File
@@ -67,7 +67,7 @@
<string name="bl_list_info">%1$s ドメイン · %2$s</string>
<string name="bl_presets">人気のリスト</string>
<string name="bl_download_failed">ダウンロードに失敗しました: %1$s</string>
<string name="about_desc">端末全体で DNS over HTTPS と HTTP/3 による暗号化 DNS を利用できます。ローカル VPN を通るのは DNS だけで、その他の通信はそのままです。</string>
<string name="about_desc">すべての通信をVPNに通さずに、DNSリクエストを暗号化します。</string>
<string name="about_version">バージョン</string>
<string name="about_protocol">プロトコル</string>
<string name="about_http3_yes">この端末で対応しています</string>
@@ -84,6 +84,7 @@
<string name="group_system">システム</string>
<string name="group_count">%2$d 件中 %1$d 件が DNS 経由</string>
<string name="about_privacy_policy">プライバシーポリシー</string>
<string name="donate">寄付する</string>
<string name="licenses_title">オープンソースライセンス</string>
<string name="licenses_hint">SparkleDNS は以下のオープンソースプロジェクトで作られています。タップするとプロジェクトのページを開きます。</string>
<string name="licenses_data">ブロックリストのデータ(必要なときにダウンロード、同梱なし)</string>
@@ -94,4 +95,7 @@
<string name="open_settings">設定</string>
<string name="mon_no_match">フィルターに一致するものはありません</string>
<string name="bl_title">ブロック</string>
<string name="servers_update">サーバーリストを更新</string>
<string name="servers_updated">サーバーリストを更新しました</string>
<string name="servers_update_failed">サーバーリストを更新できませんでした: %1$s</string>
</resources>
+5 -1
View File
@@ -67,7 +67,7 @@
<string name="bl_list_info">%1$s domenų · %2$s</string>
<string name="bl_presets">Populiarūs sąrašai</string>
<string name="bl_download_failed">Atsisiųsti nepavyko: %1$s</string>
<string name="about_desc">Šifruotas DNS per HTTPS ir HTTP/3 visam įrenginiui. Per vietinį VPN eina tik DNS, kitas srautas lieka nepaliestas.</string>
<string name="about_desc">Šifruokite DNS užklausas, nenukreipdami viso srauto per VPN.</string>
<string name="about_version">Versija</string>
<string name="about_protocol">Protokolas</string>
<string name="about_http3_yes">Palaikoma šiame įrenginyje</string>
@@ -84,6 +84,7 @@
<string name="group_system">Sistema</string>
<string name="group_count">%1$d iš %2$d per DNS</string>
<string name="about_privacy_policy">Privatumo politika</string>
<string name="donate">Paaukoti</string>
<string name="licenses_title">Atvirojo kodo licencijos</string>
<string name="licenses_hint">SparkleDNS sukurta naudojant šiuos atvirojo kodo projektus. Palieskite projektą, kad atidarytumėte jo puslapį.</string>
<string name="licenses_data">Blokavimo sąrašų duomenys (atsisiunčiami pagal poreikį, neįtraukti)</string>
@@ -94,4 +95,7 @@
<string name="open_settings">Nustatymai</string>
<string name="mon_no_match">Filtro neatitinka niekas</string>
<string name="bl_title">Blokavimas</string>
<string name="servers_update">Atnaujinti serverių sąrašą</string>
<string name="servers_updated">Serverių sąrašas atnaujintas</string>
<string name="servers_update_failed">Nepavyko atnaujinti serverių sąrašo: %1$s</string>
</resources>
+5 -1
View File
@@ -67,7 +67,7 @@
<string name="bl_list_info">%1$s доменов · %2$s</string>
<string name="bl_presets">Популярные списки</string>
<string name="bl_download_failed">Ошибка загрузки: %1$s</string>
<string name="about_desc">Шифрованный DNS через HTTPS и HTTP/3 для всего устройства. Через локальный VPN идёт только DNS, остальной трафик не затрагивается.</string>
<string name="about_desc">Шифруйте DNS-запросы, не пропуская весь трафик через VPN.</string>
<string name="about_version">Версия</string>
<string name="about_protocol">Протокол</string>
<string name="about_http3_yes">Поддерживается на этом устройстве</string>
@@ -84,6 +84,7 @@
<string name="group_system">Системные</string>
<string name="group_count">%1$d из %2$d через DNS</string>
<string name="about_privacy_policy">Политика конфиденциальности</string>
<string name="donate">Пожертвовать</string>
<string name="licenses_title">Лицензии открытого ПО</string>
<string name="licenses_hint">SparkleDNS построен на этих проектах с открытым кодом. Нажмите на проект, чтобы открыть его страницу.</string>
<string name="licenses_data">Данные блоклистов (загружаются по запросу, не входят в приложение)</string>
@@ -94,4 +95,7 @@
<string name="open_settings">Настройки</string>
<string name="mon_no_match">Ничего не найдено</string>
<string name="bl_title">Блокировка</string>
<string name="servers_update">Обновить список серверов</string>
<string name="servers_updated">Список серверов обновлён</string>
<string name="servers_update_failed">Не удалось обновить список серверов: %1$s</string>
</resources>
+5 -1
View File
@@ -67,7 +67,7 @@
<string name="bl_list_info">%1$s 个域名 · %2$s</string>
<string name="bl_presets">热门列表</string>
<string name="bl_download_failed">下载失败:%1$s</string>
<string name="about_desc">为整台设备提供通过 HTTPS 和 HTTP/3 加密的 DNS。只有 DNS 经过本地 VPN,其他流量保持不变。</string>
<string name="about_desc">加密 DNS 请求,无需让全部流量经过 VPN。</string>
<string name="about_version">版本</string>
<string name="about_protocol">协议</string>
<string name="about_http3_yes">此设备支持</string>
@@ -84,6 +84,7 @@
<string name="group_system">系统</string>
<string name="group_count">%2$d 个中有 %1$d 个经过 DNS</string>
<string name="about_privacy_policy">隐私政策</string>
<string name="donate">捐赠</string>
<string name="licenses_title">开源许可</string>
<string name="licenses_hint">SparkleDNS 使用了以下开源项目。点按项目可打开其页面。</string>
<string name="licenses_data">屏蔽列表数据(按需下载,未内置)</string>
@@ -94,4 +95,7 @@
<string name="open_settings">设置</string>
<string name="mon_no_match">没有符合筛选条件的内容</string>
<string name="bl_title">屏蔽</string>
<string name="servers_update">更新服务器列表</string>
<string name="servers_updated">服务器列表已更新</string>
<string name="servers_update_failed">无法更新服务器列表:%1$s</string>
</resources>
+5 -1
View File
@@ -68,7 +68,7 @@
<string name="bl_list_info">%1$s domains · %2$s</string>
<string name="bl_presets">Popular lists</string>
<string name="bl_download_failed">Download failed: %1$s</string>
<string name="about_desc">Encrypted DNS over HTTPS and HTTP/3 for the whole device. Only DNS goes through the local VPN, all other traffic is untouched.</string>
<string name="about_desc">Encrypt DNS requests without routing all your traffic through a VPN.</string>
<string name="about_version">Version</string>
<string name="about_protocol">Protocol</string>
<string name="about_http3_yes">Supported on this device</string>
@@ -85,6 +85,7 @@
<string name="group_system">System</string>
<string name="group_count">%1$d of %2$d via DNS</string>
<string name="about_privacy_policy">Privacy policy</string>
<string name="donate">Donate</string>
<string name="licenses_title">Open-source licenses</string>
<string name="licenses_hint">SparkleDNS is built with these open-source projects. Tap a project to open its page.</string>
<string name="licenses_data">Blocklist data (downloaded on demand, not bundled)</string>
@@ -95,4 +96,7 @@
<string name="open_settings">Settings</string>
<string name="mon_no_match">Nothing matches the filter</string>
<string name="bl_title">Blocking</string>
<string name="servers_update">Update server list</string>
<string name="servers_updated">Server list updated</string>
<string name="servers_update_failed">Couldn\'t update the server list: %1$s</string>
</resources>
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

@@ -1,3 +1,5 @@
• Jetzt auch auf Deutsch, Japanisch, Litauisch und Chinesisch
• Unabhängige Server: Digitale Gesellschaft, UncensoredDNS, Freifunk München. Cloudflare, Google, AdGuard und Mullvad entfernt
• Serverliste lässt sich aus dem Projekt-Repository aktualisieren, jeder Server verlinkt seine Datenschutzerklärung
• Hinweise und Warnungen lassen sich mit ✕ schließen
• Aufgeräumter Info-Bildschirm
@@ -0,0 +1,5 @@
• Spendenlinks neben der Datenschutzerklärung bei Servern, die Spenden annehmen
• Einfachere Serverliste
• Neues Symbol für die Datenschutzerklärung bei den Servern
• HTTP/3-Kennzeichnung aus der Serverliste entfernt
• Kürzere Beschreibung unter „Info“
@@ -1,3 +1,5 @@
• Now in German, Japanese, Lithuanian and Chinese
• Independent servers: Digitale Gesellschaft, UncensoredDNS, Freifunk München. Cloudflare, Google, AdGuard and Mullvad removed
• Update the server list from the project repository; each server links to its privacy policy
• Hints and warnings can be closed with ✕
• Cleaner About screen
@@ -0,0 +1,5 @@
• Donation links next to the privacy policy for servers that accept donations
• Simpler server list
• New privacy policy icon on servers
• HTTP/3 badge removed from the server list
• Shorter About description
@@ -1,3 +1,5 @@
• ドイツ語・日本語・リトアニア語・中国語に対応
• 独立系サーバー:Digitale Gesellschaft、UncensoredDNS、Freifunk München。Cloudflare、Google、AdGuard、Mullvad を削除
• サーバーリストをプロジェクトのリポジトリから更新できるように。各サーバーにプライバシーポリシーのリンク
• ヒントと警告を ✕ で閉じられるように
• 「情報」画面を整理
@@ -0,0 +1,5 @@
• 寄付を受け付けているサーバーには、プライバシーポリシーの横に寄付リンクを表示
• サーバーリストをシンプルに
• サーバーのプライバシーポリシーアイコンを新しく
• サーバーリストから HTTP/3 の表示を削除
• 「情報」の説明を短く
@@ -1,3 +1,5 @@
• Dabar ir vokiečių, japonų, lietuvių bei kinų kalbomis
• Nepriklausomi serveriai: Digitale Gesellschaft, UncensoredDNS, Freifunk München. Cloudflare, Google, AdGuard ir Mullvad pašalinti
• Serverių sąrašą galima atnaujinti iš projekto saugyklos, prie kiekvieno serverio – nuoroda į privatumo politiką
• Patarimus ir įspėjimus galima uždaryti ✕
• Tvarkingesnis ekranas „Apie“
@@ -0,0 +1,5 @@
• Prie serverių, kurie priima aukas, šalia privatumo politikos – nuoroda aukoti
• Paprastesnis serverių sąrašas
• Nauja privatumo politikos piktograma prie serverių
• HTTP/3 žymė pašalinta iš serverių sąrašo
• Trumpesnis aprašymas skiltyje „Apie“
@@ -1,3 +1,5 @@
• Теперь на немецком, японском, литовском и китайском
• Независимые серверы: Digitale Gesellschaft, UncensoredDNS, Freifunk München. Cloudflare, Google, AdGuard и Mullvad убраны
• Список серверов обновляется из репозитория проекта, у каждого сервера есть ссылка на политику конфиденциальности
• Подсказки и предупреждения закрываются крестиком
• Обновлён экран «О приложении»
@@ -0,0 +1,5 @@
• У серверов, которые принимают пожертвования, рядом с политикой конфиденциальности появилась ссылка на пожертвование
• Упрощённый список серверов
• Новый значок политики конфиденциальности у серверов
• Значок HTTP/3 убран из списка серверов
• Короче описание в «О программе»
@@ -1,3 +1,5 @@
• 新增德语、日语、立陶宛语和中文
• 独立服务器:Digitale Gesellschaft、UncensoredDNS、Freifunk München;移除 Cloudflare、Google、AdGuard 和 Mullvad
• 可从项目仓库更新服务器列表,每个服务器都附有隐私政策链接
• 提示和警告可点 ✕ 关闭
• “关于”页面更简洁
@@ -0,0 +1,5 @@
• 接受捐赠的服务器在隐私政策旁显示捐赠链接
• 服务器列表更简洁
• 服务器的隐私政策图标焕新
• 服务器列表中移除 HTTP/3 标识
• “关于”中的介绍更简短
+8
View File
@@ -0,0 +1,8 @@
# SparkleDNS server list. How to add a server: see CONTRIBUTING.md
# Name | DoH URL | Privacy policy | h3 (optional) | Donation page (optional)
SkySparkle | https://blog.skysparkle.cc/dns-query | https://skysparkle.cc/privacy?lang=en | h3
Quad9 | https://dns.quad9.net/dns-query | https://quad9.net/service/privacy/ | https://quad9.net/donate/
Digitale Gesellschaft | https://dns.digitale-gesellschaft.ch/dns-query | https://www.digitale-gesellschaft.ch/dns/ | h3 | https://www.digitale-gesellschaft.ch/uber-uns/unterstuetzer-werden/
UncensoredDNS | https://anycast.uncensoreddns.org/dns-query | https://blog.uncensoreddns.org/faq/
Freifunk München | https://doh.ffmuc.net/dns-query | https://ffmuc.net/dns-privacy/ | h3 | https://spende.ffmuc.net/