mirror of
https://github.com/kalarina-bit/Sparkledns.git
synced 2026-11-22 07:36:09 +00:00
Add donation links to servers next to the privacy policy
This commit is contained in:
@@ -9,6 +9,7 @@ title: "[Preset] "
|
|||||||
- URL:
|
- URL:
|
||||||
- Homepage or documentation:
|
- Homepage or documentation:
|
||||||
- Privacy policy (DoH servers) or license (blocklists):
|
- Privacy policy (DoH servers) or license (blocklists):
|
||||||
|
- Donation page (DoH servers, optional):
|
||||||
|
|
||||||
- [ ] DoH server: public and supports RFC 8484
|
- [ ] DoH server: public and supports RFC 8484
|
||||||
- [ ] Blocklist: public and actively maintained
|
- [ ] Blocklist: public and actively maintained
|
||||||
|
|||||||
+7
-4
@@ -43,18 +43,21 @@ The server list lives in [`servers/servers.txt`](servers/servers.txt). The app d
|
|||||||
To add a server, open the file on Gitea, click **Edit**, add one line at the end and send it as a pull 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
|
Name | DoH URL | Privacy policy | h3 | Donation page
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Name** — how the server appears in the app, up to 40 characters.
|
- **Name** — how the server appears in the app, up to 40 characters.
|
||||||
- **DoH URL** — the full `https://` address of the DoH endpoint.
|
- **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.
|
- **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.
|
- **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.
|
||||||
|
|
||||||
Example:
|
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
|
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:
|
The server must:
|
||||||
@@ -66,7 +69,7 @@ The server must:
|
|||||||
|
|
||||||
Before sending, check that it works: in the app choose **Custom server**, enter the URL and tap **Test server**.
|
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. If you are unsure whether a server fits, open an issue with the *DoH server or blocklist* template instead.
|
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
|
## Blocklists
|
||||||
|
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ fun HomeScreen(modifier: Modifier = Modifier) {
|
|||||||
subtitle = hostOf(p.url),
|
subtitle = hostOf(p.url),
|
||||||
selected = selected == p.id,
|
selected = selected == p.id,
|
||||||
onPolicy = p.policy?.let { url -> { openUrl(context, url) } },
|
onPolicy = p.policy?.let { url -> { openUrl(context, url) } },
|
||||||
|
onDonate = p.donate?.let { url -> { openUrl(context, url) } },
|
||||||
) { select(p.id) }
|
) { select(p.id) }
|
||||||
}
|
}
|
||||||
RowDivider()
|
RowDivider()
|
||||||
@@ -571,6 +572,7 @@ private fun ProviderRow(
|
|||||||
subtitle: String,
|
subtitle: String,
|
||||||
selected: Boolean,
|
selected: Boolean,
|
||||||
onPolicy: (() -> Unit)? = null,
|
onPolicy: (() -> Unit)? = null,
|
||||||
|
onDonate: (() -> Unit)? = null,
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val highlight by animateColorAsState(
|
val highlight by animateColorAsState(
|
||||||
@@ -598,6 +600,16 @@ private fun ProviderRow(
|
|||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
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) {
|
if (onPolicy != null) {
|
||||||
IconButton(onClick = onPolicy, modifier = Modifier.size(40.dp)) {
|
IconButton(onClick = onPolicy, modifier = Modifier.size(40.dp)) {
|
||||||
Icon(
|
Icon(
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ data class DohProvider(
|
|||||||
val bootstrap: List<String> = emptyList(),
|
val bootstrap: List<String> = emptyList(),
|
||||||
val http3: Boolean = false,
|
val http3: Boolean = false,
|
||||||
val policy: String? = null,
|
val policy: String? = null,
|
||||||
|
val donate: String? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
object Providers {
|
object Providers {
|
||||||
@@ -32,11 +33,13 @@ object Providers {
|
|||||||
DohProvider(
|
DohProvider(
|
||||||
"quad9", "Quad9", "https://dns.quad9.net/dns-query", listOf("9.9.9.9", "149.112.112.112"),
|
"quad9", "Quad9", "https://dns.quad9.net/dns-query", listOf("9.9.9.9", "149.112.112.112"),
|
||||||
policy = "https://quad9.net/service/privacy/",
|
policy = "https://quad9.net/service/privacy/",
|
||||||
|
donate = "https://quad9.net/donate/",
|
||||||
),
|
),
|
||||||
DohProvider(
|
DohProvider(
|
||||||
"digitale-gesellschaft", "Digitale Gesellschaft", "https://dns.digitale-gesellschaft.ch/dns-query",
|
"digitale-gesellschaft", "Digitale Gesellschaft", "https://dns.digitale-gesellschaft.ch/dns-query",
|
||||||
listOf("185.95.218.42", "185.95.218.43"), http3 = true,
|
listOf("185.95.218.42", "185.95.218.43"), http3 = true,
|
||||||
policy = "https://www.digitale-gesellschaft.ch/dns/",
|
policy = "https://www.digitale-gesellschaft.ch/dns/",
|
||||||
|
donate = "https://www.digitale-gesellschaft.ch/uber-uns/unterstuetzer-werden/",
|
||||||
),
|
),
|
||||||
DohProvider(
|
DohProvider(
|
||||||
"uncensoreddns", "UncensoredDNS", "https://anycast.uncensoreddns.org/dns-query", listOf("91.239.100.100"),
|
"uncensoreddns", "UncensoredDNS", "https://anycast.uncensoreddns.org/dns-query", listOf("91.239.100.100"),
|
||||||
@@ -46,6 +49,7 @@ object Providers {
|
|||||||
"ffmuc", "Freifunk München", "https://doh.ffmuc.net/dns-query",
|
"ffmuc", "Freifunk München", "https://doh.ffmuc.net/dns-query",
|
||||||
listOf("5.1.66.255", "185.150.99.255"), http3 = true,
|
listOf("5.1.66.255", "185.150.99.255"), http3 = true,
|
||||||
policy = "https://ffmuc.net/dns-privacy/",
|
policy = "https://ffmuc.net/dns-privacy/",
|
||||||
|
donate = "https://spende.ffmuc.net/",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -111,7 +115,8 @@ object ServerList {
|
|||||||
return parsed.size
|
return parsed.size
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format per line: Name | DoH URL | privacy policy URL | h3 (optional). See CONTRIBUTING.md.
|
// 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> {
|
fun parse(text: String): List<DohProvider> {
|
||||||
val builtInByHost = Providers.builtIn.associateBy { it.url.toHttpUrlOrNull()?.host }
|
val builtInByHost = Providers.builtIn.associateBy { it.url.toHttpUrlOrNull()?.host }
|
||||||
val seen = HashSet<String>()
|
val seen = HashSet<String>()
|
||||||
@@ -125,11 +130,14 @@ object ServerList {
|
|||||||
val url = cols[1].toHttpUrlOrNull()
|
val url = cols[1].toHttpUrlOrNull()
|
||||||
val policy = cols[2].takeIf { it.toHttpUrlOrNull()?.isHttps == true }
|
val policy = cols[2].takeIf { it.toHttpUrlOrNull()?.isHttps == true }
|
||||||
if (name.isEmpty() || url == null || !url.isHttps) continue
|
if (name.isEmpty() || url == null || !url.isHttps) continue
|
||||||
// Shipped servers keep their address and id, so an edited list cannot redirect them
|
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 pinned = builtInByHost[url.host]
|
||||||
val server = pinned
|
val server = pinned
|
||||||
?: if (policy == null) continue
|
?: if (policy == null) continue
|
||||||
else DohProvider(url.host, name, cols[1], http3 = cols.getOrElse(3) { "" }.equals("h3", ignoreCase = true), policy = policy)
|
else DohProvider(url.host, name, cols[1], http3 = http3, policy = policy, donate = donate)
|
||||||
if (!seen.add(server.id)) continue
|
if (!seen.add(server.id)) continue
|
||||||
result += server
|
result += server
|
||||||
if (result.size >= MAX_SERVERS) break
|
if (result.size >= MAX_SERVERS) break
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -84,6 +84,7 @@
|
|||||||
<string name="group_system">System</string>
|
<string name="group_system">System</string>
|
||||||
<string name="group_count">%1$d von %2$d über DNS</string>
|
<string name="group_count">%1$d von %2$d über DNS</string>
|
||||||
<string name="about_privacy_policy">Datenschutzerklärung</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_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_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>
|
<string name="licenses_data">Sperrlisten-Daten (bei Bedarf geladen, nicht enthalten)</string>
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
<string name="group_system">システム</string>
|
<string name="group_system">システム</string>
|
||||||
<string name="group_count">%2$d 件中 %1$d 件が DNS 経由</string>
|
<string name="group_count">%2$d 件中 %1$d 件が DNS 経由</string>
|
||||||
<string name="about_privacy_policy">プライバシーポリシー</string>
|
<string name="about_privacy_policy">プライバシーポリシー</string>
|
||||||
|
<string name="donate">寄付する</string>
|
||||||
<string name="licenses_title">オープンソースライセンス</string>
|
<string name="licenses_title">オープンソースライセンス</string>
|
||||||
<string name="licenses_hint">SparkleDNS は以下のオープンソースプロジェクトで作られています。タップするとプロジェクトのページを開きます。</string>
|
<string name="licenses_hint">SparkleDNS は以下のオープンソースプロジェクトで作られています。タップするとプロジェクトのページを開きます。</string>
|
||||||
<string name="licenses_data">ブロックリストのデータ(必要なときにダウンロード、同梱なし)</string>
|
<string name="licenses_data">ブロックリストのデータ(必要なときにダウンロード、同梱なし)</string>
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
<string name="group_system">Sistema</string>
|
<string name="group_system">Sistema</string>
|
||||||
<string name="group_count">%1$d iš %2$d per DNS</string>
|
<string name="group_count">%1$d iš %2$d per DNS</string>
|
||||||
<string name="about_privacy_policy">Privatumo politika</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_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_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>
|
<string name="licenses_data">Blokavimo sąrašų duomenys (atsisiunčiami pagal poreikį, neįtraukti)</string>
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
<string name="group_system">Системные</string>
|
<string name="group_system">Системные</string>
|
||||||
<string name="group_count">%1$d из %2$d через DNS</string>
|
<string name="group_count">%1$d из %2$d через DNS</string>
|
||||||
<string name="about_privacy_policy">Политика конфиденциальности</string>
|
<string name="about_privacy_policy">Политика конфиденциальности</string>
|
||||||
|
<string name="donate">Пожертвовать</string>
|
||||||
<string name="licenses_title">Лицензии открытого ПО</string>
|
<string name="licenses_title">Лицензии открытого ПО</string>
|
||||||
<string name="licenses_hint">SparkleDNS построен на этих проектах с открытым кодом. Нажмите на проект, чтобы открыть его страницу.</string>
|
<string name="licenses_hint">SparkleDNS построен на этих проектах с открытым кодом. Нажмите на проект, чтобы открыть его страницу.</string>
|
||||||
<string name="licenses_data">Данные блоклистов (загружаются по запросу, не входят в приложение)</string>
|
<string name="licenses_data">Данные блоклистов (загружаются по запросу, не входят в приложение)</string>
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
<string name="group_system">系统</string>
|
<string name="group_system">系统</string>
|
||||||
<string name="group_count">%2$d 个中有 %1$d 个经过 DNS</string>
|
<string name="group_count">%2$d 个中有 %1$d 个经过 DNS</string>
|
||||||
<string name="about_privacy_policy">隐私政策</string>
|
<string name="about_privacy_policy">隐私政策</string>
|
||||||
|
<string name="donate">捐赠</string>
|
||||||
<string name="licenses_title">开源许可</string>
|
<string name="licenses_title">开源许可</string>
|
||||||
<string name="licenses_hint">SparkleDNS 使用了以下开源项目。点按项目可打开其页面。</string>
|
<string name="licenses_hint">SparkleDNS 使用了以下开源项目。点按项目可打开其页面。</string>
|
||||||
<string name="licenses_data">屏蔽列表数据(按需下载,未内置)</string>
|
<string name="licenses_data">屏蔽列表数据(按需下载,未内置)</string>
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
<string name="group_system">System</string>
|
<string name="group_system">System</string>
|
||||||
<string name="group_count">%1$d of %2$d via DNS</string>
|
<string name="group_count">%1$d of %2$d via DNS</string>
|
||||||
<string name="about_privacy_policy">Privacy policy</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_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_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>
|
<string name="licenses_data">Blocklist data (downloaded on demand, not bundled)</string>
|
||||||
|
|||||||
+4
-4
@@ -1,8 +1,8 @@
|
|||||||
# SparkleDNS server list. How to add a server: see CONTRIBUTING.md
|
# SparkleDNS server list. How to add a server: see CONTRIBUTING.md
|
||||||
# Name | DoH URL | Privacy policy | h3 (optional)
|
# Name | DoH URL | Privacy policy | h3 (optional) | Donation page (optional)
|
||||||
|
|
||||||
SkySparkle | https://blog.skysparkle.cc/dns-query | https://skysparkle.cc/privacy?lang=en | h3
|
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/
|
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
|
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/
|
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
|
Freifunk München | https://doh.ffmuc.net/dns-query | https://ffmuc.net/dns-privacy/ | h3 | https://spende.ffmuc.net/
|
||||||
|
|||||||
Reference in New Issue
Block a user