10 Commits
Author SHA1 Message Date
kalarina 0ceeb84e98 Fix unreadable app names on the Apps screen (#6) 2026-11-06 17:16:51 +02:00
kalarina 5ddff1b257 Release 1.1.3 2026-11-06 16:15:02 +02:00
kalarina bc9d855997 Name other sites in Company dominance
The share outside the known companies is now split by site names taken from
the domains of recent queries (cdn.example.co.uk shows as Example). Domains
are read only from the in-memory log; the saved statistics still keep numbers
only.
2026-11-06 16:11:58 +02:00
kalarina 8f4355a624 Group recent activity by domain
Queries for the same domain (A, AAAA, HTTPS and other types) now share one
row that shows all requested types, the number of queries and the status
and time of the newest one. Refs #4
2026-11-05 19:08:33 +02:00
kalarina 359bd09b9e Add GitHub issue and pull request templates 2026-11-05 18:44:17 +02:00
kalarina d09a6bac6b Update README screenshots 2026-11-03 13:08:44 +02:00
kalarina 25dcb5cb7f Update store screenshots 2026-11-03 13:06:47 +02:00
kalarina 95c4a1b1ba Fit the German 1.0.10 changelog into 500 characters 2026-11-03 12:45:59 +02:00
kalarina 33eca31c65 Add the 1.1.2 changelog and shorten the German 1.0.10 one to F-Droid's limit 2026-11-03 12:45:52 +02:00
kalarina 54b600b1ca Release v1.1.2 2026-11-02 16:01:22 +02:00
42 changed files with 228 additions and 36 deletions
+28
View File
@@ -0,0 +1,28 @@
---
name: Bug report
about: Something doesn't work as expected
title: "[Bug] "
---
**What happened**
**Steps to reproduce**
1.
2.
3.
**What you expected**
**Environment**
- App version:
- Installed from: Gitea / GitHub / F-Droid / Google Play
- Device and Android version:
- DoH server in use:
- Network: Wi-Fi / mobile data
**Screenshots or logs** (optional — please remove domains you don't want to share)
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Main repository on git.skysparkle.cc
url: https://git.skysparkle.cc/kalarina/Sparkledns
about: This GitHub repository is a mirror. Issues are welcome here and on Gitea.
@@ -0,0 +1,15 @@
---
name: DoH server or blocklist
about: Suggest a DoH server or blocklist preset
title: "[Preset] "
---
- Type: DoH server / blocklist
- Name:
- 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
+18
View File
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea that fits the app
title: "[Feature] "
---
<!-- Please check the "Out of scope" list in CONTRIBUTING.md before opening this. -->
**What problem does this solve**
**Proposed solution**
**Alternatives you considered**
- [ ] I'd like to implement this myself
+12
View File
@@ -0,0 +1,12 @@
---
name: Translation fix
about: Report a wrong or awkward translation
title: "[Translation] "
---
<!-- Currently supported: English, Russian. For a new language, open a feature request first. -->
- Language:
- Screen or place in the app:
- Current text:
- Suggested text:
+17
View File
@@ -0,0 +1,17 @@
## What does this change
## Related issue
Closes #
## Checklist
- [ ] Discussed in an issue first (not needed for small fixes)
- [ ] `./gradlew assembleDebug` builds
- [ ] Tested on a device or emulator (Android version: )
- [ ] DNS queries only go to the selected DoH server
- [ ] No ads, analytics, trackers or Google Play Services / Firebase dependencies
- [ ] New strings added to `values/strings.xml` (missing translations noted below)
- [ ] Screenshots added for UI changes
- [ ] I agree that my contribution is licensed under GPL-3.0-or-later
+2 -3
View File
@@ -21,10 +21,9 @@
</p>
<p align="center">
<img src="assets/screenshots/1-private-dns-control.png" width="160" alt="Private DNS control">
<img src="assets/screenshots/2-protected.png" width="160" alt="You're protected">
<img src="assets/screenshots/1-private-dns-left.png" width="160" alt="Private DNS in one tap"><img src="assets/screenshots/2-private-dns-right.png" width="160" alt="You're protected">
<img src="assets/screenshots/3-see-every-request.png" width="160" alt="See every request">
<img src="assets/screenshots/4-block-more-noise.png" width="160" alt="Block more noise">
<img src="assets/screenshots/4-block-ads-and-trackers.png" width="160" alt="Block ads and trackers">
</p>
> [!TIP]
+3 -3
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 = 10101
versionName = "1.1.1"
versionCode = 10103
versionName = "1.1.3"
}
buildTypes {
@@ -84,4 +84,4 @@ dependencies {
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.14")
testImplementation("junit:junit:4.13.2")
}
}
@@ -81,6 +81,28 @@ private val OtherColor = Palette.Track
private class Slice(val label: String, val share: Float, val color: Color)
// One row of the log: every query for a domain, shown by its newest one. A data class, so a
// rebuilt list with the same groups counts as unchanged.
private data class DomainGroup(val latest: QueryEntry, val types: List<Int>, val count: Int)
// The log is newest first, so the first entry of a domain is its newest one and the groups come
// out in the order their domains were last asked for. Names differ only in letter case when a
// resolver randomizes it, so they are compared in lower case.
private fun groupByDomain(entries: List<QueryEntry>): List<DomainGroup> {
class Builder(val latest: QueryEntry) {
val types = LinkedHashSet<Int>()
var count = 0
}
val groups = LinkedHashMap<String, Builder>()
for (entry in entries) {
val group = groups.getOrPut(entry.domain.lowercase(Locale.ROOT)) { Builder(entry) }
group.types += entry.type
group.count++
}
// Types in numeric order: A, then AAAA, then HTTPS
return groups.values.map { DomainGroup(it.latest, it.types.sorted(), it.count) }
}
@Composable
fun ActivityScreen(bottomPadding: Dp, modifier: Modifier = Modifier) {
val context = LocalContext.current
@@ -101,12 +123,13 @@ fun ActivityScreen(bottomPadding: Dp, modifier: Modifier = Modifier) {
val statsVersion by StatsStore.version.collectAsStateWithLifecycle()
LaunchedEffect(period, statsVersion) { summary = StatsStore.summary(period.hours) }
// Filtered again only when the log, the filter or the search changes, and the list below is
// updated only when the result differs: new entries that the filter hides change nothing
// Filtered and grouped by domain again only when the log, the filter or the search changes,
// and the list below is updated only when the result differs: new entries that the filter
// hides change nothing
val visible by remember {
derivedStateOf(structuralEqualityPolicy()) {
val term = search.trim()
entries.filter { e ->
val matching = entries.filter { e ->
val matchesFilter = when (filter) {
ActivityFilter.ALL -> true
ActivityFilter.BLOCKED -> e.status == QueryStatus.BLOCKED
@@ -115,6 +138,7 @@ fun ActivityScreen(bottomPadding: Dp, modifier: Modifier = Modifier) {
}
matchesFilter && (term.isEmpty() || e.domain.contains(term, ignoreCase = true))
}
groupByDomain(matching)
}
}
val canClear by remember { derivedStateOf { entries.isNotEmpty() } }
@@ -178,11 +202,19 @@ fun ActivityScreen(bottomPadding: Dp, modifier: Modifier = Modifier) {
)
}
}
itemsIndexed(visible, key = { _, entry -> entry.id }, contentType = { _, _ -> "query" }) { index, entry ->
// Keyed by domain, so a new query for a domain moves its row to the top instead of adding one
itemsIndexed(
visible,
key = { _, group -> "domain:" + group.latest.domain.lowercase(Locale.ROOT) },
contentType = { _, _ -> "query" },
) { index, group ->
val entry = group.latest
val blockedByMe = entry.domain in customSet
QueryRow(
modifier = Modifier.animateItem(),
entry = entry,
types = group.types,
count = group.count,
first = index == 0,
blockedByMe = blockedByMe,
onBlock = { toggleBlock(entry.domain, unblock = false) },
@@ -206,7 +238,7 @@ fun ActivityScreen(bottomPadding: Dp, modifier: Modifier = Modifier) {
) {
ActivityHeader(period) { period = it }
ActivityStats(summary, Modifier.padding(top = 20.dp))
CompanyCard(summary, Modifier.padding(top = 20.dp))
CompanyCard(summary, entries, Modifier.padding(top = 20.dp))
}
LazyColumn(
modifier = Modifier
@@ -223,7 +255,7 @@ fun ActivityScreen(bottomPadding: Dp, modifier: Modifier = Modifier) {
) {
item(key = "header") { ActivityHeader(period) { period = it } }
item(key = "stats") { ActivityStats(summary, Modifier.padding(top = 20.dp)) }
item(key = "companies") { CompanyCard(summary, Modifier.padding(top = 20.dp)) }
item(key = "companies") { CompanyCard(summary, entries, Modifier.padding(top = 20.dp)) }
log()
}
}
@@ -334,9 +366,9 @@ private fun LogSearch(
private const val MIN_COMPANY_REQUESTS = 50L
@Composable
private fun CompanyCard(summary: StatsSummary, modifier: Modifier = Modifier) {
private fun CompanyCard(summary: StatsSummary, recent: List<QueryEntry>, modifier: Modifier = Modifier) {
val other = stringResource(R.string.companies_other)
val slices = remember(summary, other) { companySlices(summary, other) }
val slices = remember(summary, recent, other) { companySlices(summary, recent, other) }
Column(
modifier = modifier
.fillMaxWidth()
@@ -398,17 +430,32 @@ private fun percentLabel(share: Float): String {
return if (percent < 1f) "<1%" else "${Math.round(percent)}%"
}
// The four companies with most requests, then everything else; empty slices are left out
private fun companySlices(summary: StatsSummary, otherLabel: String): List<Slice> {
// Shares of the known companies over the period. The statistics keep no domains, so the share
// left over is split by the names of the recent queries to other domains, from the log in memory.
// Then the four largest slices and everything else; empty slices are left out.
private fun companySlices(summary: StatsSummary, recent: List<QueryEntry>, otherLabel: String): List<Slice> {
if (summary.total == 0L) return emptyList()
val top = Company.entries
.map { it to summary.companies[it.ordinal] }
.filter { it.second > 0 }
.sortedByDescending { it.second }
.take(SliceColors.size)
val slices = top.mapIndexed { index, (company, count) ->
Slice(company.label, count.toFloat() / summary.total, SliceColors[index])
val shares = HashMap<String, Float>()
for (company in Company.entries) {
val count = summary.companies[company.ordinal]
if (count > 0) shares[company.label] = count.toFloat() / summary.total
}
val unknownShare = (1f - shares.values.sum()).coerceAtLeast(0f)
val names = HashMap<String, Int>()
var unknownCount = 0
for (entry in recent) {
if (Companies.of(entry.domain) != null) continue
unknownCount++
Companies.nameOf(entry.domain)?.let { names.merge(it, 1, Int::plus) }
}
// Queries without a name (local names, reverse lookups) stay in the rest
if (unknownCount > 0) {
for ((name, count) in names) shares.merge(name, unknownShare * count / unknownCount, Float::plus)
}
val slices = shares.entries
.sortedByDescending { it.value }
.take(SliceColors.size)
.mapIndexed { index, (label, share) -> Slice(label, share, SliceColors[index]) }
val rest = (1f - slices.sumOf { it.share.toDouble() }.toFloat()).coerceAtLeast(0f)
return if (rest >= 0.005f) slices + Slice(otherLabel, rest, OtherColor) else slices
}
@@ -442,6 +489,8 @@ private fun Donut(slices: List<Slice>, modifier: Modifier = Modifier) {
private fun QueryRow(
modifier: Modifier,
entry: QueryEntry,
types: List<Int>,
count: Int,
first: Boolean,
blockedByMe: Boolean,
onBlock: () -> Unit,
@@ -461,6 +510,9 @@ private fun QueryRow(
QueryStatus.BLOCKED -> stringResource(if (blockedByMe) R.string.bl_my else R.string.tab_blocklist)
QueryStatus.FAILED -> stringResource(R.string.status_failed)
}
// "A, AAAA, HTTPS · ×3 · 256 ms"; the status and time are those of the newest query
val typeNames = types.joinToString(", ") { DnsMessage.typeName(it) }
val summary = if (count > 1) "$typeNames · ×$count · $detail" else "$typeNames · $detail"
Box(modifier.fillMaxWidth()) {
Column {
@@ -492,7 +544,7 @@ private fun QueryRow(
overflow = TextOverflow.Ellipsis,
)
Text(
"${DnsMessage.typeName(entry.type)} · $detail",
summary,
color = Palette.Fg3,
fontSize = 12.sp,
maxLines = 1,
@@ -1,5 +1,6 @@
package cc.skysparkle.sparkledns
import java.util.Locale
import java.util.TreeMap
// The position of each company is saved in StatsStore: add new ones at the end only
@@ -21,6 +22,12 @@ enum class Company(val label: String) {
object Companies {
private const val GOOGLE_PREFIX = "google."
// Second-level labels that belong to a country's suffix: example.co.uk, example.com.br
private val COUNTRY_SECOND_LEVELS = setOf("co", "com", "net", "org", "gov", "edu", "ac", "or", "ne", "go")
// Names that are not public sites: reverse lookups and local networks
private val PRIVATE_TLDS = setOf("arpa", "local", "lan", "home", "internal", "localhost")
// Hashes of the domains, sorted, with the company of each at the same index: this runs for
// every query, and parent domains are looked up by hash without copying the name
private val hashes: LongArray
@@ -93,4 +100,16 @@ object Companies {
}
return null
}
// A readable name for a domain of no known company, taken from its main label:
// "cdn.example.co.uk" gives "Example". Null for IP addresses, local names and bare labels.
fun nameOf(name: String): String? {
val labels = name.lowercase(Locale.ROOT).split('.').filter { it.isNotEmpty() }
if (labels.size < 2) return null
val tld = labels.last()
if (tld in PRIVATE_TLDS || tld.all { it.isDigit() }) return null
var index = labels.size - 2
if (tld.length == 2 && labels.size >= 3 && labels[index] in COUNTRY_SECOND_LEVELS) index--
return labels[index].replaceFirstChar { it.titlecase(Locale.ROOT) }
}
}
@@ -25,10 +25,12 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
@@ -54,7 +56,13 @@ class MainActivity : ComponentActivity() {
AppLogo.preload(this)
enableEdgeToEdge()
setContent {
MaterialTheme(colorScheme = AppColors) { AppShell() }
MaterialTheme(colorScheme = AppColors) {
// There is no Surface at the root, so text and icons without an explicit color
// would fall back to black and disappear on the dark background
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onSurface) {
AppShell()
}
}
}
}
}
@@ -24,6 +24,7 @@ object Providers {
),
DohProvider(
"quad9", "Quad9", "https://dns.quad9.net/dns-query", listOf("9.9.9.9", "149.112.112.112"),
http3 = true,
policy = "https://quad9.net/service/privacy/",
donate = "https://quad9.net/donate/",
),
+1 -1
View File
@@ -100,7 +100,7 @@
<string name="tab_activity">Aktivität</string>
<string name="tab_settings">Einstellungen</string>
<string name="companies_title">Anteil der Konzerne</string>
<string name="companies_desc">Welcher Anteil deiner Anfragen an die größten Konzerne geht.</string>
<string name="companies_desc">Welcher Anteil deiner Anfragen an die größten Konzerne und andere Websites geht.</string>
<string name="companies_other">Andere</string>
<string name="recent_title">Letzte Anfragen</string>
<string name="filter">Filter</string>
+1 -1
View File
@@ -100,7 +100,7 @@
<string name="tab_activity">アクティビティ</string>
<string name="tab_settings">設定</string>
<string name="companies_title">企業の占有率</string>
<string name="companies_desc">リクエストのうち大手企業に送られる割合です。</string>
<string name="companies_desc">リクエストのうち大手企業やその他のサイトに送られる割合です。</string>
<string name="companies_other">その他</string>
<string name="recent_title">最近のアクティビティ</string>
<string name="filter">フィルター</string>
+1 -1
View File
@@ -100,7 +100,7 @@
<string name="tab_activity">Veikla</string>
<string name="tab_settings">Nustatymai</string>
<string name="companies_title">Įmonių dalis</string>
<string name="companies_desc">Kokia jūsų užklausų dalis tenka didžiausioms įmonėms.</string>
<string name="companies_desc">Kokia jūsų užklausų dalis tenka didžiausioms įmonėms ir kitoms svetainėms.</string>
<string name="companies_other">Kitos</string>
<string name="recent_title">Naujausios užklausos</string>
<string name="filter">Filtras</string>
+1 -1
View File
@@ -100,7 +100,7 @@
<string name="tab_activity">Активность</string>
<string name="tab_settings">Настройки</string>
<string name="companies_title">Доля компаний</string>
<string name="companies_desc">Какая часть ваших запросов уходит крупнейшим компаниям.</string>
<string name="companies_desc">Какая часть ваших запросов уходит крупнейшим компаниям и другим сайтам.</string>
<string name="companies_other">Другие</string>
<string name="recent_title">Последние запросы</string>
<string name="filter">Фильтр</string>
+1 -1
View File
@@ -100,7 +100,7 @@
<string name="tab_activity">活动</string>
<string name="tab_settings">设置</string>
<string name="companies_title">公司占比</string>
<string name="companies_desc">你的请求中发往大公司的比例。</string>
<string name="companies_desc">你的请求中发往大公司和其他网站的比例。</string>
<string name="companies_other">其他</string>
<string name="recent_title">最近活动</string>
<string name="filter">筛选</string>
+1 -1
View File
@@ -101,7 +101,7 @@
<string name="tab_activity">Activity</string>
<string name="tab_settings">Settings</string>
<string name="companies_title">Company dominance</string>
<string name="companies_desc">Share of your requests that go to the biggest companies.</string>
<string name="companies_desc">Share of your requests that go to the biggest companies and other sites.</string>
<string name="companies_other">Other</string>
<string name="recent_title">Recent activity</string>
<string name="filter">Filter</string>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 KiB

@@ -1,6 +1,6 @@
• DNS funktioniert weiter, wenn ein unerwartetes Paket ankommt; fällt der Tunnel aus, schaltet sich das VPN ab, statt DNS still zu blockieren
• Anfragen erholen sich schneller nach einem Wechsel zwischen WLAN und Mobilfunk und in langsamen Netzen
• Weniger Arbeit im Hintergrund: ausgeblendete Bildschirme werden nicht mehr aktualisiert
• Blocklisten werden nur noch erneut geladen, wenn sie sich geändert haben
• DNS läuft bei unerwarteten Paketen weiter; fällt der Tunnel aus, schaltet sich das VPN ab, statt DNS still zu blockieren
• Anfragen erholen sich schneller nach einem WLAN-Mobilfunk-Wechsel und in langsamen Netzen
• Weniger Hintergrundarbeit: ausgeblendete Bildschirme werden nicht mehr aktualisiert
• Blocklisten werden nur bei Änderungen neu geladen
• Schärfere App-Symbole, kleinere App
• Ein Doppeltipp auf „Verbinden“ verbindet nicht mehr doppelt; voller Speicher lässt die App nicht mehr abstürzen
• Doppeltipp auf „Verbinden“ verbindet nicht doppelt; voller Speicher führt nicht mehr zum Absturz
@@ -0,0 +1 @@
• Quad9 verbindet sich unter Android 14 und neuer jetzt über HTTP/3 (QUIC)
@@ -0,0 +1,2 @@
• Die letzte Aktivität zeigt eine Zeile pro Domain mit allen abgefragten Typen (A, AAAA, HTTPS) und der Anzahl der Anfragen
• Der Anteil der Konzerne nennt jetzt auch andere Websites, statt alle unter Andere zusammenzufassen
@@ -0,0 +1 @@
• Quad9 now connects over HTTP/3 (QUIC) on Android 14 and newer
@@ -0,0 +1,2 @@
• Recent activity shows one row per domain with all requested types (A, AAAA, HTTPS) and the number of queries
• Company dominance names other sites instead of grouping them all as Other
Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

After

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 KiB

After

Width:  |  Height:  |  Size: 519 KiB

@@ -0,0 +1 @@
• Android 14 以降では Quad9 に HTTP/3(QUIC)で接続
@@ -0,0 +1,2 @@
• 最近のアクティビティはドメインごとに 1 行で表示し、要求されたすべての種類(A、AAAA、HTTPS)とクエリ数を表示
• 企業の占有率で、その他のサイトもまとめずに名前で表示
@@ -0,0 +1 @@
• Quad9 dabar jungiasi per HTTP/3 (QUIC) Android 14 ir naujesnėse versijose
@@ -0,0 +1,2 @@
• Naujausia veikla rodo vieną eilutę kiekvienam domenui su visais užklaustais tipais (A, AAAA, HTTPS) ir užklausų skaičiumi
• Įmonių dalyje kitos svetainės dabar rodomos pavadinimais, o ne sujungiamos į „Kitos“
@@ -0,0 +1 @@
• Quad9 теперь подключается по HTTP/3 (QUIC) на Android 14 и новее
@@ -0,0 +1,2 @@
• Последняя активность показывает одну строку на домен со всеми запрошенными типами (A, AAAA, HTTPS) и числом запросов
• В «Доле компаний» остальные сайты показываются по названиям, а не объединяются в «Другие»
@@ -0,0 +1 @@
• 在 Android 14 及更高版本上,Quad9 现通过 HTTP/3(QUIC)连接
@@ -0,0 +1,2 @@
• 最近活动按域名每行显示一条,包含所有请求类型(A、AAAA、HTTPS)及查询次数
• 公司占比中的其他网站现在按名称显示,不再全部归入“其他”