8 Commits
Author SHA1 Message Date
kalarina a6f22ddfb2 Add donation card and move repository links to GitHub 2026-11-17 09:41:21 +02:00
kalarina 572e5e224b Release 1.1.6 2026-11-16 15:59:20 +02:00
kalarina 92dfd31faf Personal access key for the SkySparkle server and first-launch guide
The SkySparkle server no longer has a shared public address: each user
creates a key in their account at skysparkle.cc and the app connects to
https://skysparkle.cc/dns/<key>. The key is entered in Settings under the
server or in the new two-page guide shown on first launch. Without a key
the home screen shows a hint and the service explains why it did not start.
2026-11-16 10:54:48 +02:00
kalarina 3b4d9b049b Screenshot: drop ads from the HaGeZi Pro description 2026-11-14 22:11:27 +02:00
kalarina 618a9403c7 Screenshot: block trackers and malware instead of ads 2026-11-14 21:58:39 +02:00
kalarina 582511607c Revert "Remove block ads screenshot"
This reverts commit d6f77045e3.
2026-11-14 21:56:11 +02:00
kalarina d6f77045e3 Remove block ads screenshot 2026-11-14 21:55:08 +02:00
kalarina f3000b7706 README: point Obtainium link to GitHub 2026-11-14 19:23:20 +02:00
29 changed files with 521 additions and 24 deletions
+1
View File
@@ -0,0 +1 @@
ko_fi: skysparkle
+3 -3
View File
@@ -1,5 +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.
- name: Support the project on Ko-fi
url: https://ko-fi.com/skysparkle
about: Donations keep the apps and the Skysparkle server running.
+1 -1
View File
@@ -4,7 +4,7 @@ Thanks for wanting to help! This guide explains where to contribute, what fits t
## Where to contribute
Issues and pull requests go to the repository on [Gitea](https://git.skysparkle.cc/kalarina/Sparkledns).
Issues and pull requests go to the repository on [GitHub](https://github.com/kalarina-bit/Sparkledns).
## Ways to help
+16 -7
View File
@@ -9,8 +9,12 @@
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">
<a href="https://ko-fi.com/skysparkle"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support me on Ko-fi"></a>
</p>
> [!IMPORTANT]
> **SparkleDNS is coming to Google Play!** The app is now in closed testing there ahead of the public release. Ideas, wishes and suggestions for improvement are very welcome — send them wherever is easiest for you: an issue on [Gitea](https://git.skysparkle.cc/kalarina/Sparkledns/issues) or [GitHub](https://github.com/kalarina-bit/Sparkledns/issues), or an email to [cuken107@proton.me](mailto:cuken107@proton.me).
> **SparkleDNS is coming to Google Play!** The app is now in closed testing there ahead of the public release. Ideas, wishes and suggestions for improvement are very welcome — send them wherever is easiest for you: an [issue on GitHub](https://github.com/kalarina-bit/Sparkledns/issues), or an email to [cuken107@proton.me](mailto:cuken107@proton.me).
> [!NOTE]
> **Looking for designers!** SparkleDNS is looking for volunteer designers to help with icons, logos, animations, cover art (store graphics) and UI design. This is unpaid help for an open-source project. If you're interested, write to [cuken107@proton.me](mailto:cuken107@proton.me).
@@ -21,15 +25,14 @@
<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://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/kalarina-bit/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>
<p align="center">
<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-ads-and-trackers.png" width="160" alt="Block ads and trackers">
<img src="assets/screenshots/4-block-trackers-and-malware.png" width="160" alt="Block trackers and malware">
</p>
> [!TIP]
@@ -48,8 +51,8 @@
## <img src="assets/icon-install.png" width="32" alt=""> Installation
- **[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.
- **[Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/kalarina-bit/Sparkledns)** — installs the APK straight from GitHub releases and keeps it up to date.
- **Manually** — download the latest APK from [GitHub Releases](https://github.com/kalarina-bit/Sparkledns/releases/latest), 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.
## <img src="assets/icon-verify.png" width="32" alt=""> Verifying a download
@@ -83,7 +86,7 @@ Requires JDK 17+ and Android SDK 36.
## 🤝 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.
Bug reports, DoH server and blocklist suggestions, translation fixes and pull requests are welcome in the [issue tracker](https://github.com/kalarina-bit/Sparkledns/issues). Please read [CONTRIBUTING.md](CONTRIBUTING.md) first — it explains what fits the project and how to send changes.
## 💙 Sponsor
@@ -95,6 +98,12 @@ Bug reports, DoH server and blocklist suggestions, translation fixes and pull re
SparkleDNS is sponsored and supported by <a href="https://skysparkle.cc"><b>Skysparkle</b></a> — independent encrypted DNS from Lithuania and the app’s default DoH server.
</p>
## ☕ Support
SparkleDNS is free, open source and has no ads. If it is useful to you, you can support the project on [Ko-fi](https://ko-fi.com/skysparkle) — donations pay for the Skysparkle server and the time spent on the apps.
<a href="https://ko-fi.com/skysparkle"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support me on Ko-fi"></a>
## 📄 License
[GNU General Public License v3.0 only](LICENSE).
+2 -2
View File
@@ -14,8 +14,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 = 10105
versionName = "1.1.5"
versionCode = 10106
versionName = "1.1.6"
}
buildTypes {
@@ -30,6 +30,7 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@@ -53,7 +54,8 @@ import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.dp
private const val PRIVACY_POLICY = "https://skysparkle.cc/privacy?lang=en"
private const val SOURCE_CODE = "https://git.skysparkle.cc/kalarina/Sparkledns"
private const val SOURCE_CODE = "https://github.com/kalarina-bit/Sparkledns"
private const val DONATE = "https://ko-fi.com/skysparkle"
private const val APACHE_2 = "Apache License 2.0"
private const val APACHE_2_URL = "https://www.apache.org/licenses/LICENSE-2.0"
@@ -156,6 +158,8 @@ private fun AboutContent(modifier: Modifier, onOpenLicenses: () -> Unit) {
}
}
SupportCard(onDonate = { openUrl(context, DONATE) })
OutlinedButton(onClick = { openUrl(context, PRIVACY_POLICY) }, modifier = Modifier.fillMaxWidth()) {
Icon(painterResource(R.drawable.ic_policy), contentDescription = null, modifier = Modifier.size(18.dp))
Spacer(Modifier.width(8.dp))
@@ -192,6 +196,43 @@ private fun AboutContent(modifier: Modifier, onOpenLicenses: () -> Unit) {
}
}
// The server costs money every month; the card asks for help without getting in the way
@Composable
private fun SupportCard(onDonate: () -> Unit) {
val context = LocalContext.current
Card(Modifier.fillMaxWidth()) {
Row(
modifier = Modifier.padding(start = 16.dp, top = 16.dp, end = 16.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Image(
remember { AppLogo.get(context) },
contentDescription = null,
modifier = Modifier.size(48.dp),
)
Spacer(Modifier.width(14.dp))
Column(Modifier.weight(1f)) {
Text(stringResource(R.string.support_title), style = MaterialTheme.typography.titleMedium)
Text(
stringResource(R.string.support_text),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
}
Button(
onClick = onDonate,
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
) {
Icon(painterResource(R.drawable.ic_donate), contentDescription = null, modifier = Modifier.size(18.dp))
Spacer(Modifier.width(8.dp))
Text(stringResource(R.string.support_button))
}
}
}
@Composable
private fun LicensesScreen(modifier: Modifier, onBack: () -> Unit) {
val context = LocalContext.current
@@ -106,7 +106,10 @@ class DohVpnService : VpnService() {
if (provider.url.toHttpUrlOrNull()?.isHttps != true) {
Log.e(TAG, "Server address is not a valid HTTPS URL, not starting")
stopSession()
showAlert(R.string.alert_bad_url_title, R.string.alert_bad_url_text)
showAlert(
R.string.alert_bad_url_title,
if (provider.id == Providers.DEFAULT_ID) R.string.alert_no_key_text else R.string.alert_bad_url_text,
)
stopSelf()
return
}
@@ -143,7 +143,8 @@ fun HomeScreen(
// The server is picked in Settings; this screen is composed anew each time it is shown
val selected = remember { prefs.resolve() }
val canConnect = selected.id != Providers.CUSTOM_ID || selected.url.toHttpUrlOrNull()?.isHttps == true
val canConnect = selected.url.toHttpUrlOrNull()?.isHttps == true
val needsKey = selected.id == Providers.DEFAULT_ID && !canConnect
val shown = active ?: selected
val usesHttp3 = shown.http3 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE
@@ -223,6 +224,14 @@ fun HomeScreen(
onToggle = ::toggle,
onOpenServers = onOpenServers,
)
if (needsKey && !running) {
HintCard(
text = stringResource(R.string.key_needed),
icon = R.drawable.ic_alert,
tint = Palette.Accent,
action = { TextButton(onClick = onOpenServers) { Text(stringResource(R.string.key_add)) } },
)
}
PrivateDnsWarning(privateDnsHost, prefs)
}
val stats: @Composable () -> Unit = {
@@ -33,9 +33,12 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.Saver
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
@@ -60,7 +63,9 @@ class MainActivity : ComponentActivity() {
// 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()
// First launch: the guide explains the access key before the app opens
var onboarded by rememberSaveable { mutableStateOf(Prefs(this@MainActivity).onboardingDone) }
if (onboarded) AppShell() else OnboardingScreen(onDone = { onboarded = true })
}
}
}
@@ -0,0 +1,200 @@
package cc.skysparkle.sparkledns
import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
// Shown once on first launch: what the app does, then how to get the personal access key
// for the Skysparkle server. Skipping leaves the key empty; other servers stay available.
@Composable
fun OnboardingScreen(onDone: () -> Unit) {
val context = LocalContext.current
val prefs = remember { Prefs(context) }
var page by rememberSaveable { mutableIntStateOf(0) }
var keyInput by rememberSaveable { mutableStateOf(prefs.skysparkleKey) }
val keyValid = SkysparkleKey.parse(keyInput) != null
fun finish(useKey: Boolean) {
if (useKey) {
prefs.skysparkleKey = SkysparkleKey.parse(keyInput) ?: ""
prefs.providerId = Providers.DEFAULT_ID
}
prefs.onboardingDone = true
onDone()
}
BackHandler(enabled = page > 0) { page-- }
Box(
Modifier
.fillMaxSize()
.background(Palette.Bg)
.statusBarsPadding()
.navigationBarsPadding()
.imePadding(),
contentAlignment = Alignment.TopCenter,
) {
Column(
Modifier
.widthIn(max = 520.dp)
.fillMaxSize()
.padding(horizontal = 24.dp, vertical = 20.dp),
) {
Dots(count = 2, current = page)
AnimatedContent(
targetState = page,
transitionSpec = {
val forward = targetState > initialState
(fadeIn(Motion.enterFade) + slideInHorizontally(Motion.slide) { if (forward) it / 4 else -it / 4 }) togetherWith
(fadeOut(Motion.exitFade) + slideOutHorizontally(Motion.slide) { if (forward) -it / 4 else it / 4 })
},
modifier = Modifier.weight(1f),
label = "onboarding",
) { current ->
Column(
Modifier
.fillMaxSize()
.verticalScroll(rememberScrollState())
.padding(top = 40.dp, bottom = 16.dp),
verticalArrangement = Arrangement.spacedBy(14.dp),
) {
if (current == 0) {
Image(
bitmap = AppLogo.get(context),
contentDescription = null,
modifier = Modifier
.size(72.dp)
.clip(RoundedCornerShape(20.dp)),
)
Spacer(Modifier.height(8.dp))
Title(stringResource(R.string.onb_welcome_title))
Body(stringResource(R.string.onb_welcome_text))
Spacer(Modifier.height(8.dp))
Step(1, stringResource(R.string.onb_point_encrypt))
Step(2, stringResource(R.string.onb_point_block))
Step(3, stringResource(R.string.onb_point_independent))
} else {
Title(stringResource(R.string.onb_key_title))
Body(stringResource(R.string.onb_key_text))
Spacer(Modifier.height(4.dp))
Step(1, stringResource(R.string.onb_key_step1))
Step(2, stringResource(R.string.onb_key_step2))
Step(3, stringResource(R.string.onb_key_step3))
Spacer(Modifier.height(4.dp))
Column(Modifier.fillMaxWidth().appCard().padding(top = 16.dp)) {
KeyField(
value = keyInput,
valid = keyValid,
onChange = { keyInput = it },
onGetKey = { openUrl(context, SkysparkleKey.SIGNUP_URL) },
)
}
}
}
}
if (page == 0) {
Button(
onClick = { page = 1 },
shape = RoundedCornerShape(16.dp),
modifier = Modifier.fillMaxWidth().height(52.dp),
) { Text(stringResource(R.string.onb_next), fontWeight = FontWeight.Bold) }
} else {
Button(
onClick = { finish(useKey = true) },
enabled = keyValid,
shape = RoundedCornerShape(16.dp),
modifier = Modifier.fillMaxWidth().height(52.dp),
) { Text(stringResource(R.string.onb_done), fontWeight = FontWeight.Bold) }
TextButton(onClick = { finish(useKey = false) }, modifier = Modifier.fillMaxWidth()) {
Text(stringResource(R.string.onb_skip), color = Palette.Fg3)
}
}
}
}
}
@Composable
private fun Title(text: String) {
Text(text, color = Palette.Fg, fontSize = 30.sp, lineHeight = 34.sp, fontWeight = FontWeight.ExtraBold, letterSpacing = (-0.5).sp)
}
@Composable
private fun Body(text: String) {
Text(text, color = Palette.Fg2, fontSize = 16.sp, lineHeight = 23.sp)
}
@Composable
private fun Step(number: Int, text: String) {
Row(verticalAlignment = Alignment.Top) {
Box(
Modifier
.size(26.dp)
.clip(CircleShape)
.background(Palette.AccentSoft),
contentAlignment = Alignment.Center,
) {
Text(number.toString(), color = Palette.Accent, fontSize = 13.sp, fontWeight = FontWeight.Bold)
}
Spacer(Modifier.width(12.dp))
Text(text, color = Palette.Fg, fontSize = 15.sp, lineHeight = 21.sp, modifier = Modifier.padding(top = 2.dp))
}
}
@Composable
private fun Dots(count: Int, current: Int) {
Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) {
repeat(count) { i ->
Box(
Modifier
.height(4.dp)
.width(if (i == current) 22.dp else 10.dp)
.clip(CircleShape)
.background(if (i == current) Palette.Accent else Palette.Track),
)
}
}
}
@@ -21,6 +21,16 @@ class Prefs(context: Context) {
get() = sp.getBoolean(KEY_HTTP3, false)
set(value) = sp.edit().putBoolean(KEY_HTTP3, value).apply()
// Access key for the Skysparkle server, created in the account at skysparkle.cc
var skysparkleKey: String
get() = sp.getString(KEY_SKYSPARKLE, null) ?: ""
set(value) = sp.edit().putString(KEY_SKYSPARKLE, value).apply()
// The first-launch guide was finished or skipped
var onboardingDone: Boolean
get() = sp.getBoolean(KEY_ONBOARDING, false)
set(value) = sp.edit().putBoolean(KEY_ONBOARDING, value).apply()
var excludedApps: Set<String>
get() = sp.getStringSet(KEY_EXCLUDED, null)?.toSet() ?: emptySet()
set(value) = sp.edit().putStringSet(KEY_EXCLUDED, value).apply()
@@ -48,11 +58,13 @@ class Prefs(context: Context) {
get() = sp.getString(KEY_PRIVATE_DNS, null) ?: ""
set(value) = sp.edit().putString(KEY_PRIVATE_DNS, value).apply()
fun resolve(): DohProvider =
if (providerId == Providers.CUSTOM_ID) {
// Without a key the Skysparkle entry has an empty address, so it cannot connect
fun resolve(): DohProvider = when (providerId) {
Providers.CUSTOM_ID ->
DohProvider(Providers.CUSTOM_ID, "Custom", customUrl.trim(), parseIps(customBootstrap), customHttp3)
} else {
Providers.byId(providerId)
else -> Providers.byId(providerId).let {
if (it.id == Providers.DEFAULT_ID) it.copy(url = SkysparkleKey.url(skysparkleKey)) else it
}
}
private companion object {
@@ -61,6 +73,8 @@ class Prefs(context: Context) {
const val KEY_BOOTSTRAP = "custom_bootstrap"
const val KEY_HTTP3 = "custom_http3"
const val KEY_EXCLUDED = "excluded_apps"
const val KEY_SKYSPARKLE = "skysparkle_key"
const val KEY_ONBOARDING = "onboarding_done"
const val KEY_HINTS = "dismissed_hints"
const val KEY_PRIVATE_DNS = "dismissed_private_dns"
const val KEY_UPDATE_INTERVAL = "update_interval"
@@ -18,8 +18,9 @@ object Providers {
// Servers ship with the app; new ones arrive with app updates
val builtIn = listOf(
// The address is personal: Prefs.resolve() adds the access key from skysparkle.cc
DohProvider(
"skysparkle", "SkySparkle", "https://skysparkle.cc/dns-query",
"skysparkle", "SkySparkle", SkysparkleKey.BASE_URL,
http3 = true, policy = "https://skysparkle.cc/privacy?lang=en",
),
DohProvider(
@@ -58,6 +59,24 @@ object Providers {
fun byId(id: String): DohProvider = builtIn.firstOrNull { it.id == id } ?: default
}
// Personal access keys for the Skysparkle server. Each account at skysparkle.cc creates its own
// keys; the server answers only /dns/<key>, there is no shared public address.
object SkysparkleKey {
const val BASE_URL = "https://skysparkle.cc/dns/"
const val SIGNUP_URL = "https://skysparkle.cc/login#register"
private val KEY = Regex("^[A-Za-z0-9_-]{24}$")
private val IN_URL = Regex("/dns/([A-Za-z0-9_-]{24})(?:[/?#].*)?$")
// Accepts the key itself or the whole address copied from the account page
fun parse(input: String): String? {
val text = input.trim()
if (KEY.matches(text)) return text
return IN_URL.find(text)?.groupValues?.get(1)
}
fun url(key: String): String = parse(key)?.let { BASE_URL + it } ?: ""
}
fun parseIps(raw: String): List<String> =
raw.split(',', ';', ' ').map { it.trim() }.filter { it.isNotEmpty() }
@@ -71,6 +71,7 @@ fun SettingsScreen(
var customUrl by remember { mutableStateOf(prefs.customUrl) }
var customBootstrap by remember { mutableStateOf(prefs.customBootstrap) }
var customHttp3 by remember { mutableStateOf(prefs.customHttp3) }
var keyInput by remember { mutableStateOf(prefs.skysparkleKey) }
var testResult by rememberSaveable(stateSaver = TestResultSaver) { mutableStateOf<TestResult?>(null) }
var shownResult by rememberSaveable(stateSaver = TestResultSaver) { mutableStateOf<TestResult?>(null) } // kept while the card animates out
var testing by remember { mutableStateOf(false) }
@@ -78,8 +79,9 @@ fun SettingsScreen(
val isCustom = selected == Providers.CUSTOM_ID
val customValid = remember(customUrl) { customUrl.trim().toHttpUrlOrNull()?.isHttps == true }
val canConnect = !isCustom || customValid
val selectedProvider = remember(selected, customUrl, customBootstrap, customHttp3) { prefs.resolve() }
val keyValid = remember(keyInput) { SkysparkleKey.parse(keyInput) != null }
val selectedProvider = remember(selected, customUrl, customBootstrap, customHttp3, keyInput) { prefs.resolve() }
val canConnect = selectedProvider.url.toHttpUrlOrNull()?.isHttps == true
// Picking a server never touches a live connection; switching is an explicit action
val pendingSwitch = active?.let { it != selectedProvider && canConnect } == true
@@ -123,6 +125,21 @@ fun SettingsScreen(
onDonate = provider.donate?.let { url -> { openUrl(context, url) } },
onClick = { select(provider.id) },
)
if (provider.id == Providers.DEFAULT_ID) {
AnimatedVisibility(visible = selected == Providers.DEFAULT_ID, enter = Motion.expandIn, exit = Motion.collapseOut) {
KeyField(
value = keyInput,
valid = keyValid,
onChange = {
keyInput = it
// Saved as the bare key, also when the whole address was pasted
prefs.skysparkleKey = SkysparkleKey.parse(it) ?: it.trim()
testResult = null
},
onGetKey = { openUrl(context, SkysparkleKey.SIGNUP_URL) },
)
}
}
}
ListDivider()
ServerRow(
@@ -252,6 +269,35 @@ fun SettingsScreen(
}
}
// Access key for the Skysparkle server, with a link to the account page where keys are made
@Composable
internal fun KeyField(value: String, valid: Boolean, onChange: (String) -> Unit, onGetKey: () -> Unit, modifier: Modifier = Modifier) {
val showError = value.isNotBlank() && !valid
Column(
modifier.padding(start = 16.dp, end = 16.dp, bottom = 16.dp),
verticalArrangement = Arrangement.spacedBy(6.dp),
) {
OutlinedTextField(
value = value,
onValueChange = onChange,
label = { Text(stringResource(R.string.key_label)) },
singleLine = true,
isError = showError,
shape = RoundedCornerShape(14.dp),
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Uri, imeAction = ImeAction.Done),
modifier = Modifier.fillMaxWidth(),
)
Text(
stringResource(if (showError) R.string.key_invalid else R.string.key_hint),
color = if (showError) Palette.Blocked else Palette.Fg3,
fontSize = 12.sp,
)
OutlinedButton(onClick = onGetKey, shape = RoundedCornerShape(14.dp)) {
Text(stringResource(R.string.key_get))
}
}
}
@Composable
private fun ServerRow(
title: String,
+23
View File
@@ -138,4 +138,27 @@
<string name="alert_bad_url_text">Die Serveradresse ist keine gültige HTTPS-URL. Öffne SparkleDNS und prüfe den Server.</string>
<string name="alert_lockdown_title">DNS-Server nicht erreichbar</string>
<string name="alert_lockdown_text">„Verbindungen ohne VPN blockieren“ ist aktiv, daher erreicht SparkleDNS den DNS-Server nicht und Anfragen schlagen fehl. Schalte es in den VPN-Einstellungen von Android aus.</string>
<string name="key_label">Zugangsschlüssel</string>
<string name="key_hint">Füge den Schlüssel oder die ganze Adresse aus deinem Konto auf skysparkle.cc ein</string>
<string name="key_invalid">Das sieht nicht wie ein Schlüssel aus. Kopiere ihn erneut auf der Seite „Schlüssel“.</string>
<string name="key_get">Kostenlosen Schlüssel holen</string>
<string name="key_needed">Der SkySparkle-Server braucht einen persönlichen Zugangsschlüssel. Er ist kostenlos: Erstelle ein Konto auf skysparkle.cc und füge den Schlüssel hinzu.</string>
<string name="key_add">Schlüssel hinzufügen</string>
<string name="alert_no_key_text">Der SkySparkle-Server braucht einen Zugangsschlüssel. Öffne SparkleDNS und füge deinen Schlüssel unter Einstellungen hinzu.</string>
<string name="onb_welcome_title">Willkommen bei SparkleDNS</string>
<string name="onb_welcome_text">Privates DNS für dein ganzes Handy, ohne Server der großen Tech-Konzerne.</string>
<string name="onb_point_encrypt">Verschlüsselt jede DNS-Anfrage mit DNS-over-HTTPS</string>
<string name="onb_point_block">Blockiert Werbung und Tracker in allen Apps</string>
<string name="onb_point_independent">Nur unabhängige Server, nie Google oder Cloudflare</string>
<string name="onb_key_title">Hol dir deinen Zugangsschlüssel</string>
<string name="onb_key_text">Der SkySparkle-Server arbeitet mit einem persönlichen Schlüssel. Der kostenlose Tarif hat Grenzen, die bezahlten nicht.</string>
<string name="onb_key_step1">Erstelle ein kostenloses Konto auf skysparkle.cc</string>
<string name="onb_key_step2">Öffne „Schlüssel“ und erstelle einen Schlüssel für dieses Handy</string>
<string name="onb_key_step3">Kopiere den Schlüssel oder die Adresse und füge sie unten ein</string>
<string name="onb_next">Weiter</string>
<string name="onb_done">Starten</string>
<string name="onb_skip">Überspringen, ich wähle einen anderen Server</string>
<string name="support_title">SparkleDNS unterstützen</string>
<string name="support_text">SparkleDNS ist kostenlos, quelloffen und werbefrei. Spenden finanzieren den Skysparkle-Server und halten die App am Leben.</string>
<string name="support_button">Auf Ko-fi spenden</string>
</resources>
+23
View File
@@ -138,4 +138,27 @@
<string name="alert_bad_url_text">サーバーのアドレスが有効な HTTPS URL ではありません。SparkleDNS を開いてサーバーを確認してください。</string>
<string name="alert_lockdown_title">DNS サーバーに接続できません</string>
<string name="alert_lockdown_text">「VPN なしの接続をブロック」がオンのため、SparkleDNS は DNS サーバーに接続できず、名前解決に失敗します。Android の VPN 設定でオフにしてください。</string>
<string name="key_label">アクセスキー</string>
<string name="key_hint">skysparkle.cc のアカウントからキーまたはアドレス全体を貼り付けてください</string>
<string name="key_invalid">キーの形式ではありません。「キー」ページからもう一度コピーしてください。</string>
<string name="key_get">無料のキーを取得</string>
<string name="key_needed">SkySparkle サーバーには個人用のアクセスキーが必要です。無料です:skysparkle.cc でアカウントを作成してキーを追加してください。</string>
<string name="key_add">キーを追加</string>
<string name="alert_no_key_text">SkySparkle サーバーにはアクセスキーが必要です。SparkleDNS を開いて「設定」でキーを追加してください。</string>
<string name="onb_welcome_title">SparkleDNS へようこそ</string>
<string name="onb_welcome_text">大手 IT 企業のサーバーを使わない、スマホ全体のプライベート DNS。</string>
<string name="onb_point_encrypt">DNS-over-HTTPS ですべての DNS 問い合わせを暗号化</string>
<string name="onb_point_block">すべてのアプリで広告とトラッカーをブロック</string>
<string name="onb_point_independent">独立系サーバーのみ。Google や Cloudflare は使いません</string>
<string name="onb_key_title">アクセスキーを取得</string>
<string name="onb_key_text">SkySparkle サーバーは個人用キーで動作します。無料プランには制限があり、有料プランにはありません。</string>
<string name="onb_key_step1">skysparkle.cc で無料アカウントを作成</string>
<string name="onb_key_step2">「キー」を開き、このスマホ用のキーを作成</string>
<string name="onb_key_step3">キーまたはアドレスをコピーして下に貼り付け</string>
<string name="onb_next">次へ</string>
<string name="onb_done">開始</string>
<string name="onb_skip">スキップして別のサーバーを選ぶ</string>
<string name="support_title">SparkleDNS を応援する</string>
<string name="support_text">SparkleDNS は無料・オープンソースで、広告もありません。寄付は Skysparkle サーバーの運営とアプリの開発に使われます。</string>
<string name="support_button">Ko-fi で寄付する</string>
</resources>
+23
View File
@@ -138,4 +138,27 @@
<string name="alert_bad_url_text">Serverio adresas nėra tinkamas HTTPS adresas. Atidarykite SparkleDNS ir patikrinkite serverį.</string>
<string name="alert_lockdown_title">DNS serveris nepasiekiamas</string>
<string name="alert_lockdown_text">Įjungta „Blokuoti ryšius be VPN“, todėl SparkleDNS negali pasiekti DNS serverio ir užklausos nepavyksta. Išjunkite tai Android VPN nustatymuose.</string>
<string name="key_label">Prieigos raktas</string>
<string name="key_hint">Įklijuokite raktą arba visą adresą iš savo paskyros skysparkle.cc</string>
<string name="key_invalid">Tai nepanašu į raktą. Nukopijuokite jį dar kartą puslapyje „Raktai“.</string>
<string name="key_get">Gauti nemokamą raktą</string>
<string name="key_needed">SkySparkle serveriui reikia asmeninio prieigos rakto. Tai nemokama: susikurkite paskyrą skysparkle.cc ir pridėkite raktą.</string>
<string name="key_add">Pridėti raktą</string>
<string name="alert_no_key_text">SkySparkle serveriui reikia prieigos rakto. Atidarykite SparkleDNS ir pridėkite raktą skiltyje „Nustatymai“.</string>
<string name="onb_welcome_title">Sveiki atvykę į SparkleDNS</string>
<string name="onb_welcome_text">Privatus DNS visam telefonui, be didžiųjų technologijų įmonių serverių.</string>
<string name="onb_point_encrypt">Šifruoja kiekvieną DNS užklausą per DNS-over-HTTPS</string>
<string name="onb_point_block">Blokuoja reklamas ir sekiklius visose programėlėse</string>
<string name="onb_point_independent">Tik nepriklausomi serveriai, jokio Google ar Cloudflare</string>
<string name="onb_key_title">Gaukite prieigos raktą</string>
<string name="onb_key_text">SkySparkle serveris veikia su asmeniniu raktu. Nemokamas planas turi apribojimų, mokami – ne.</string>
<string name="onb_key_step1">Susikurkite nemokamą paskyrą skysparkle.cc</string>
<string name="onb_key_step2">Atidarykite „Raktai“ ir sukurkite raktą šiam telefonui</string>
<string name="onb_key_step3">Nukopijuokite raktą arba adresą ir įklijuokite žemiau</string>
<string name="onb_next">Toliau</string>
<string name="onb_done">Pradėti</string>
<string name="onb_skip">Praleisti, pasirinksiu kitą serverį</string>
<string name="support_title">Paremti SparkleDNS</string>
<string name="support_text">SparkleDNS nemokama, atvirojo kodo ir be reklamų. Aukos padengia Skysparkle serverio išlaidas ir padeda programėlei gyvuoti.</string>
<string name="support_button">Paaukoti per Ko-fi</string>
</resources>
+23
View File
@@ -138,4 +138,27 @@
<string name="alert_bad_url_text">Адрес сервера не является корректным HTTPS-адресом. Откройте SparkleDNS и проверьте сервер.</string>
<string name="alert_lockdown_title">DNS-сервер недоступен</string>
<string name="alert_lockdown_text">Включено «Блокировать соединения без VPN», поэтому SparkleDNS не может связаться с DNS-сервером и запросы не проходят. Отключите это в настройках VPN Android.</string>
<string name="key_label">Ключ доступа</string>
<string name="key_hint">Вставьте ключ или весь адрес из аккаунта на skysparkle.cc</string>
<string name="key_invalid">Это не похоже на ключ. Скопируйте его ещё раз на странице «Ключи».</string>
<string name="key_get">Получить бесплатный ключ</string>
<string name="key_needed">Серверу SkySparkle нужен личный ключ доступа. Это бесплатно: создайте аккаунт на skysparkle.cc и добавьте ключ.</string>
<string name="key_add">Добавить ключ</string>
<string name="alert_no_key_text">Серверу SkySparkle нужен ключ доступа. Откройте SparkleDNS и добавьте ключ в разделе «Настройки».</string>
<string name="onb_welcome_title">Добро пожаловать в SparkleDNS</string>
<string name="onb_welcome_text">Приватный DNS для всего телефона, без серверов крупных корпораций.</string>
<string name="onb_point_encrypt">Шифрует каждый DNS-запрос через DNS-over-HTTPS</string>
<string name="onb_point_block">Блокирует рекламу и трекеры во всех приложениях</string>
<string name="onb_point_independent">Только независимые серверы, без Google и Cloudflare</string>
<string name="onb_key_title">Получите ключ доступа</string>
<string name="onb_key_text">Сервер SkySparkle работает по личному ключу. У бесплатного тарифа есть ограничения, у платных — нет.</string>
<string name="onb_key_step1">Создайте бесплатный аккаунт на skysparkle.cc</string>
<string name="onb_key_step2">Откройте «Ключи» и создайте ключ для этого телефона</string>
<string name="onb_key_step3">Скопируйте ключ или адрес и вставьте ниже</string>
<string name="onb_next">Далее</string>
<string name="onb_done">Начать</string>
<string name="onb_skip">Пропустить, выберу другой сервер</string>
<string name="support_title">Поддержать SparkleDNS</string>
<string name="support_text">SparkleDNS бесплатное, с открытым кодом и без рекламы. Пожертвования оплачивают сервер Skysparkle и помогают приложению развиваться.</string>
<string name="support_button">Пожертвовать через Ko-fi</string>
</resources>
+23
View File
@@ -138,4 +138,27 @@
<string name="alert_bad_url_text">服务器地址不是有效的 HTTPS 网址。请打开 SparkleDNS 检查服务器。</string>
<string name="alert_lockdown_title">无法连接 DNS 服务器</string>
<string name="alert_lockdown_text">已开启“屏蔽未使用 VPN 的连接”,SparkleDNS 无法连接 DNS 服务器,解析会失败。请在 Android 的 VPN 设置中关闭该选项。</string>
<string name="key_label">访问密钥</string>
<string name="key_hint">粘贴 skysparkle.cc 账户中的密钥或完整地址</string>
<string name="key_invalid">这看起来不像密钥。请在“密钥”页面重新复制。</string>
<string name="key_get">获取免费密钥</string>
<string name="key_needed">SkySparkle 服务器需要个人访问密钥。完全免费:在 skysparkle.cc 创建账户并添加密钥。</string>
<string name="key_add">添加密钥</string>
<string name="alert_no_key_text">SkySparkle 服务器需要访问密钥。请打开 SparkleDNS,在“设置”中添加密钥。</string>
<string name="onb_welcome_title">欢迎使用 SparkleDNS</string>
<string name="onb_welcome_text">为整部手机提供私密 DNS,不使用大型科技公司的服务器。</string>
<string name="onb_point_encrypt">通过 DNS-over-HTTPS 加密每一次 DNS 查询</string>
<string name="onb_point_block">在所有应用中拦截广告和跟踪器</string>
<string name="onb_point_independent">只使用独立服务器,不用 Google 或 Cloudflare</string>
<string name="onb_key_title">获取访问密钥</string>
<string name="onb_key_text">SkySparkle 服务器使用个人密钥。免费套餐有限制,付费套餐没有。</string>
<string name="onb_key_step1">在 skysparkle.cc 创建免费账户</string>
<string name="onb_key_step2">打开“密钥”,为这部手机创建密钥</string>
<string name="onb_key_step3">复制密钥或地址,粘贴到下方</string>
<string name="onb_next">下一步</string>
<string name="onb_done">开始</string>
<string name="onb_skip">跳过,我选择其他服务器</string>
<string name="support_title">支持 SparkleDNS</string>
<string name="support_text">SparkleDNS 免费、开源且无广告。捐助用于支付 Skysparkle 服务器的费用,让应用持续发展。</string>
<string name="support_button">通过 Ko-fi 捐助</string>
</resources>
+23
View File
@@ -139,4 +139,27 @@
<string name="alert_bad_url_text">The server address is not a valid HTTPS URL. Open SparkleDNS and check the server.</string>
<string name="alert_lockdown_title">DNS server unreachable</string>
<string name="alert_lockdown_text">\"Block connections without VPN\" is on, so SparkleDNS cannot reach the DNS server and lookups fail. Turn it off in Android VPN settings.</string>
<string name="key_label">Access key</string>
<string name="key_hint">Paste the key or the whole address from your account at skysparkle.cc</string>
<string name="key_invalid">This doesn\'t look like a key. Copy it again from the Keys page.</string>
<string name="key_get">Get a free key</string>
<string name="key_needed">The SkySparkle server needs a personal access key. It is free: create an account at skysparkle.cc and add the key.</string>
<string name="key_add">Add key</string>
<string name="alert_no_key_text">The SkySparkle server needs an access key. Open SparkleDNS and add your key in Settings.</string>
<string name="onb_welcome_title">Welcome to SparkleDNS</string>
<string name="onb_welcome_text">Private DNS for your whole phone, without big-tech servers.</string>
<string name="onb_point_encrypt">Encrypts every DNS lookup with DNS-over-HTTPS</string>
<string name="onb_point_block">Blocks ads and trackers in all apps</string>
<string name="onb_point_independent">Uses only independent servers, never Google or Cloudflare</string>
<string name="onb_key_title">Get your access key</string>
<string name="onb_key_text">The SkySparkle server works with a personal key. The free plan has limits; paid plans have none.</string>
<string name="onb_key_step1">Create a free account at skysparkle.cc</string>
<string name="onb_key_step2">Open Keys and create a key for this phone</string>
<string name="onb_key_step3">Copy the key or the address and paste it below</string>
<string name="onb_next">Next</string>
<string name="onb_done">Start</string>
<string name="onb_skip">Skip, I\'ll choose another server</string>
<string name="support_title">Support SparkleDNS</string>
<string name="support_text">SparkleDNS is free, open source and has no ads. Donations pay for the Skysparkle server and keep the app going.</string>
<string name="support_button">Donate on Ko-fi</string>
</resources>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

@@ -0,0 +1,2 @@
• Der SkySparkle-Server funktioniert jetzt mit einem persönlichen Schlüssel: Erstelle einen kostenlosen Schlüssel auf skysparkle.cc und gib ihn in den Einstellungen ein
• Neue Einführung beim ersten Start erklärt, wie du einen Schlüssel bekommst
@@ -0,0 +1,2 @@
• The SkySparkle server now works with a personal key: create a free key at skysparkle.cc and enter it in Settings
• New first-launch guide that explains how to get a key
Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

After

Width:  |  Height:  |  Size: 391 KiB

@@ -0,0 +1,2 @@
• SkySparkle サーバーは個人キーで利用するようになりました。skysparkle.cc で無料のキーを作成し、設定に入力してください
• 初回起動時にキーの取得方法を説明するガイドを追加しました
@@ -0,0 +1,2 @@
• SkySparkle serveris dabar veikia su asmeniniu raktu: susikurkite nemokamą raktą skysparkle.cc ir įveskite jį nustatymuose
• Naujas pirmojo paleidimo gidas paaiškina, kaip gauti raktą
@@ -0,0 +1,2 @@
• Сервер SkySparkle теперь работает по личному ключу: создайте бесплатный ключ на skysparkle.cc и введите его в настройках
• Новый гайд при первом запуске объясняет, как получить ключ
@@ -0,0 +1,2 @@
• SkySparkle 服务器现在需要个人密钥:在 skysparkle.cc 免费创建密钥,然后在设置中输入
• 新增首次启动引导,说明如何获取密钥