From 6616957f3ce898488c9da38c19e7a290f4f2f104 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Mon, 18 Nov 2024 13:42:48 +0100 Subject: [PATCH 1/9] chore: start migration to ooni tests --- .../org/ooni/probe/data/models/Descriptor.kt | 16 +- .../models/InstalledTestDescriptorModel.kt | 33 +- .../domain/GetBootstrapTestDescriptors.kt | 0 .../ooni/probe/domain/OrganizationSettings.kt | 0 .../probe/ui/dashboard/DashboardViewModel.kt | 4 +- .../probe/ui/descriptor/DescriptorScreen.kt | 6 +- .../org/ooni/probe/ui/run/RunViewModel.kt | 4 +- .../probe/domain/GetDefaultTestDescriptors.kt | 7 - .../domain/GetBootstrapTestDescriptors.kt | 13 - .../probe/domain/GetDefaultTestDescriptors.kt | 6 +- .../InstalledDescriptorActionsView.kt | 18 +- .../resources/assets/descriptors.json | 605 +++++++++++++++++- 12 files changed, 672 insertions(+), 40 deletions(-) rename composeApp/src/{dwMain => commonMain}/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt (100%) rename composeApp/src/{dwMain => commonMain}/kotlin/org/ooni/probe/domain/OrganizationSettings.kt (100%) delete mode 100644 composeApp/src/dwMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt delete mode 100644 composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt index 442cbdd1..f0385ee1 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt @@ -36,7 +36,7 @@ data class Descriptor( val key: String get() = when (source) { is Source.Default -> name - is Source.Installed -> source.value.id.value.toString() + is Source.Installed -> source.value.key } val allTests get() = netTests + longRunningTests @@ -45,4 +45,18 @@ data class Descriptor( get() = allTests .sumOf { it.test.runtime(it.inputs).inWholeSeconds } .seconds + + fun isDefaultDescriptor(): Boolean { + return when (source) { + is Source.Default -> true + is Source.Installed -> source.value.isDefaultTestDescriptor + } + } + + fun isInstalledNonDefaultDescriptor(): Boolean { + return when (source) { + is Source.Installed -> !source.value.isDefaultTestDescriptor + else -> false + } + } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt index 9986f5ee..f6532c03 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt @@ -13,12 +13,17 @@ import kotlinx.datetime.format import kotlinx.datetime.format.MonthNames import kotlinx.datetime.format.char import ooniprobe.composeapp.generated.resources.Dashboard_Runv2_Overview_LastUpdatd +import ooniprobe.composeapp.generated.resources.TestResults_NotAvailable import ooniprobe.composeapp.generated.resources.months +import ooniprobe.composeapp.generated.resources.performance_datausage +import ooniprobe.composeapp.generated.resources.small_datausage import ooniprobe.composeapp.generated.resources.test_circumvention import ooniprobe.composeapp.generated.resources.test_experimental import ooniprobe.composeapp.generated.resources.test_instant_messaging import ooniprobe.composeapp.generated.resources.test_performance import ooniprobe.composeapp.generated.resources.test_websites +import ooniprobe.composeapp.generated.resources.websites_datausage +import org.jetbrains.compose.resources.StringResource import org.jetbrains.compose.resources.stringArrayResource import org.ooni.probe.data.TestDescriptor import org.ooni.probe.shared.InstalledDescriptorIcons @@ -53,6 +58,21 @@ data class InstalledTestDescriptorModel( val isExpired get() = expirationDate != null && expirationDate < LocalDateTime.now() + val isDefaultTestDescriptor get() = id.value in 10470..10474 // TODO(aanorbel): switch to OONI reserved namespace + + val key get() = if (isDefaultTestDescriptor) { + when(id.value) { + 10470L -> "websites" + 10471L -> "instant_messaging" + 10472L -> "circumvention" + 10473L -> "performance" + 10474L -> "experimental" + else -> id.value.toString() + } + } else { + id.value.toString() + } + fun shouldUpdate(other: InstalledTestDescriptorModel): Boolean { return dateUpdated != null && other.dateUpdated != null && other.dateUpdated > dateUpdated } @@ -80,13 +100,24 @@ fun InstalledTestDescriptorModel.toDescriptor(updateStatus: UpdateStatus = Updat icon = icon?.let(InstalledDescriptorIcons::getIconFromValue), color = color?.hexToColor(), animation = icon?.let { determineAnimation(it) } ?: animation?.let(Animation::fromFileName), - dataUsage = { null }, + dataUsage = { if (isDefaultTestDescriptor) stringResource(getDataUsage()) else null }, expirationDate = expirationDate, netTests = netTests.orEmpty(), source = Descriptor.Source.Installed(this), updateStatus = updateStatus, ) +fun InstalledTestDescriptorModel.getDataUsage(): StringResource { + return when(this.key) { + "websites" -> Res.string.websites_datausage + "instant_messaging" -> Res.string.small_datausage + "circumvention" -> Res.string.small_datausage + "performance" -> Res.string.performance_datausage + "experimental" -> Res.string.TestResults_NotAvailable + else -> Res.string.TestResults_NotAvailable + } +} + private val iconAnimationMap = mapOf( Res.drawable.test_websites to Animation.Websites, Res.drawable.test_instant_messaging to Animation.InstantMessaging, diff --git a/composeApp/src/dwMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt similarity index 100% rename from composeApp/src/dwMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt rename to composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt diff --git a/composeApp/src/dwMain/kotlin/org/ooni/probe/domain/OrganizationSettings.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/OrganizationSettings.kt similarity index 100% rename from composeApp/src/dwMain/kotlin/org/ooni/probe/domain/OrganizationSettings.kt rename to composeApp/src/commonMain/kotlin/org/ooni/probe/domain/OrganizationSettings.kt diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt index 3063ec47..d179642f 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt @@ -152,8 +152,8 @@ class DashboardViewModel( private fun List.groupByType() = mapOf( - DescriptorType.Default to filter { it.source is Descriptor.Source.Default }, - DescriptorType.Installed to filter { it.source is Descriptor.Source.Installed }, + DescriptorType.Default to filter { it.isDefaultDescriptor() }, + DescriptorType.Installed to filter { it.isInstalledNonDefaultDescriptor() }, ) data class State( diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt index 3c6e5c08..0b4790ee 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt @@ -127,8 +127,10 @@ fun DescriptorScreen( modifier = Modifier.padding(horizontal = 16.dp, vertical = 16.dp), ) - if (descriptor.source is Descriptor.Source.Installed) { - ConfigureUpdates(onEvent, descriptor.source.value.autoUpdate) + if (descriptor.isInstalledNonDefaultDescriptor()) { + (descriptor.source as Descriptor.Source.Installed?)?.let { + ConfigureUpdates(onEvent, it.value.autoUpdate) + } } Text( stringResource(Res.string.AddDescriptor_Settings), diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt index 86941bb1..8950e440 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt @@ -81,9 +81,9 @@ class RunViewModel( } mapOf( DescriptorType.Default to descriptorsWithTests - .filter { it.key.item.source is Descriptor.Source.Default }, + .filter { (key, _) -> key.item.isDefaultDescriptor() }, DescriptorType.Installed to descriptorsWithTests - .filter { it.key.item.source is Descriptor.Source.Installed }, + .filter { (key, _) -> key.item.isInstalledNonDefaultDescriptor() }, ) } } diff --git a/composeApp/src/dwMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt b/composeApp/src/dwMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt deleted file mode 100644 index 90e38c84..00000000 --- a/composeApp/src/dwMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.ooni.probe.domain - -import org.ooni.probe.data.models.DefaultTestDescriptor - -class GetDefaultTestDescriptors { - operator fun invoke(): List = emptyList() -} diff --git a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt b/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt deleted file mode 100644 index 961edb53..00000000 --- a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetBootstrapTestDescriptors.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.ooni.probe.domain - -import kotlinx.serialization.json.Json -import org.ooni.probe.data.models.InstalledTestDescriptorModel -import kotlin.coroutines.CoroutineContext - -class GetBootstrapTestDescriptors( - private val readAssetFile: (String) -> String, - private val json: Json, - private val backgroundContext: CoroutineContext, -) { - operator fun invoke(): List = emptyList() -} diff --git a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt b/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt index ca2160a6..5ea68194 100644 --- a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt +++ b/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt @@ -32,14 +32,14 @@ import org.ooni.probe.data.models.DefaultTestDescriptor import org.ooni.probe.data.models.NetTest class GetDefaultTestDescriptors { - operator fun invoke(): List = - listOf( + operator fun invoke(): List = emptyList() + /*listOf( WEBSITES, INSTANT_MESSAGING, CIRCUMVENTION, PERFORMANCE, EXPERIMENTAL, - ) + )*/ companion object { private val WEBSITES = diff --git a/composeApp/src/ooniMain/kotlin/org/ooni/probe/ui/descriptor/InstalledDescriptorActionsView.kt b/composeApp/src/ooniMain/kotlin/org/ooni/probe/ui/descriptor/InstalledDescriptorActionsView.kt index fbdc641c..3a5940f7 100644 --- a/composeApp/src/ooniMain/kotlin/org/ooni/probe/ui/descriptor/InstalledDescriptorActionsView.kt +++ b/composeApp/src/ooniMain/kotlin/org/ooni/probe/ui/descriptor/InstalledDescriptorActionsView.kt @@ -90,14 +90,16 @@ fun InstalledDescriptorActionsView( } } } - Button( - onClick = { showDialog = true }, - colors = ButtonDefaults.buttonColors( - containerColor = MaterialTheme.colorScheme.error, - contentColor = Color.White, - ), - ) { - Text(text = stringResource(Res.string.Dashboard_Runv2_Overview_UninstallLink)) + if (descriptor.isDefaultTestDescriptor.not()) { + Button( + onClick = { showDialog = true }, + colors = ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.error, + contentColor = Color.White, + ), + ) { + Text(text = stringResource(Res.string.Dashboard_Runv2_Overview_UninstallLink)) + } } } } diff --git a/composeApp/src/ooniMain/resources/assets/descriptors.json b/composeApp/src/ooniMain/resources/assets/descriptors.json index fe51488c..77e2db72 100644 --- a/composeApp/src/ooniMain/resources/assets/descriptors.json +++ b/composeApp/src/ooniMain/resources/assets/descriptors.json @@ -1 +1,604 @@ -[] +[ + { + "name": "Websites", + "short_description": "Test the blocking of websites", + "description": "Check whether websites are blocked using OONI's [Web Connectivity test](https://ooni.org/nettest/web-connectivity/).\n\nEvery time you tap Run, you test different websites from the Citizen Lab's [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) and [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists) test lists.\n\nTo test the sites of your choice, tap the Choose websites button or select categories of sites via the settings of this card. \n\nThis test measures whether websites are blocked by means of DNS tampering, TCP/IP blocking or by a transparent HTTP proxy.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "author": "norbel@ooni.org", + "nettests": [ + { + "test_name": "web_connectivity", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + } + ], + "name_intl": { + "ar": "المواقع", + "ca": "Llocs web", + "de": "Webseiten", + "el": "Ιστοσελίδες", + "es": "Sitios web", + "fa": "وب سایت (تار نما)", + "fr": "Sites Web", + "hi": "वेबसाइटें", + "id": "Situs Web", + "is": "Vefsvæði", + "it": "Siti web", + "nl": "Websites", + "pt_BR": "Websites", + "ro": "Site-uri", + "ru": "Сайты", + "sw": "Tovuti", + "sk": "Webové stránky", + "sq": "Uebsaite", + "th": "เว็บไซต์", + "tr": "Siteler", + "zh_CN": "网站", + "zh_TW": "網站", + "my": "ဝဘ်ဆိုဒ်များ", + "vi": "Trang web", + "km": "វែបសាយនានា" + }, + "short_description_intl": { + "ar": "اختبار حجب المواقع", + "ca": "Prova el blocatge de llocs web", + "de": "Teste die Blockierung von Webseiten", + "el": "Έλεγξε το μπλοκάρισμα ιστοσελιδών", + "es": "Probar el bloqueo de sitios web", + "fa": "تست مسدودیت وبسایت‌ها", + "fr": "Testez le blocage de sites Web", + "hi": "वेबसाइटों के अवरुद्ध परीक्षण का परीक्षण करें", + "id": "Tes situs-situs web yang diblokir", + "is": "Prófa hindranir fyrir vefsíður", + "it": "Verifica il blocco di siti web", + "nl": "Test het blokkeren van websites", + "pt_BR": "Teste o bloqueio de sites", + "ro": "Testarea blocării site-urilor web", + "ru": "Проверить блокировки сайтов", + "sw": "Pima uzuiaji wa tovuti.", + "sk": "Otestuj blokovanie webových stránok", + "sq": "Testo faqet e bllokuara", + "th": "ทดสอบการปิดกั้นเว็บไซต์", + "tr": "Site engellemelerini sınayın", + "zh_CN": "测试网站是否被屏蔽", + "zh_TW": "測試遭封鎖的網站", + "my": "ဝဘ်ဆိုဒ်များ ပိတ်ဆို့ခြင်းကို စမ်းသပ်ပါ\n", + "vi": "Kiểm tra việc chặn các trang web", + "km": "តេស្តវែបសាយដែលបានបិទ" + }, + "description_intl": { + "ar": "تأكّدوا عمّا إذا كانت المواقع محجوبة باستخدام [اختبار الاتصاليّة بالويب](https://ooni.io/nettest/web-connectivity) من OONI \n\nفي كل مرّة تنقرون فيها \"Run\" ستقومون بفحص المواقع الموجودة لدى قائمة اختبارات Citizen Lab [العالميّة](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) و تلك [الخاصّة ببلد معيّنة](https://github.com/citizenlab/test-lists/tree/master/lists)\n\nلاختبار مواقع معيّنة، انقروا زر \"Choose websites\" أو \"اختاروا من ضمن تصنيفات المواقع عبر إعدادات هذا الكرت. \n\nاختيار مواقع\" هذا الفحص يكشف عمّا إذا كانت المواقع محجوبة عن طريق التلاعب ب DNS، حجب TCP/IP أو عن طريق بروكسي HTTP غير مرئي.\n\nسيتم نشر نتائج فحصكم على كل من [مكتشف OONI](https://explorer.ooni.org) و [واجهة تطبيق OONI](https://api.ooni.io/)", + "ca": "Check whether websites are blocked using OONI's [Web Connectivity test](https://ooni.org/nettest/web-connectivity/).\n\nEvery time you tap Run, you test different websites from the Citizen Lab's [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) and [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists) test lists.\n\nTo test the sites of your choice, tap the Choose websites button or select categories of sites via the settings of this card. \n\nThis test measures whether websites are blocked by means of DNS tampering, TCP/IP blocking or by a transparent HTTP proxy.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "de": "Prüfe mit dem [Webverbindungstest](https://ooni.org/nettest/web-connectivity/) von OONI, ob Websites blockiert sind.\n\nJedes Mal, wenn du auf Ausführen tippst, testest du verschiedene Websites aus den [globalen](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) und [länderspezifischen](https://github.com/citizenlab/test-lists/tree/master/lists) Testlisten des Citizen Labs.\n\nUm die Websites deiner Wahl zu testen, tippst du auf die Schaltfläche Websites auswählen oder wählst Kategorien von Websites über die Einstellungen dieser Karte aus.\n\nDieser Test misst, ob Websites durch DNS-Manipulation, TCP/IP-Blockierung oder durch einen transparenten HTTP-Proxy blockiert werden.\n\nDeine Ergebnisse werden auf dem [OONI Explorer](https://explorer.ooni.org/world/) und [OONI API](https://api.ooni.io/) veröffentlicht.", + "el": "Δες αν έχουν μπλοκαριστεί ιστοσελίδες, χρησιμοποιώντας τη δοκιμή [Web Connectivity](https://ooni.org/nettest/web-connectivity/) του OONI.\n\nΚάθε φορά που πατάς Εκτέλεση, ελέγχεις διαφορετικές ιστοσελίδες από την [παγκόσμια](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) και τις [εθνικές](https://github.com/citizenlab/test-lists/tree/master/lists) λίστες του Citizen Lab.\n\nΓια να ελέγξεις όποιες ιστοσελίδες θες, πάτα το κουμπί \"Επέλεξε ιστοσελίδες\" ή διάλεξε κατηγορίες ιστοσελιδών μέσω των ρυθμίσεων αυτής της κάρτας.\n\nΑυτή η δοκιμή εξετάζει αν ιστοσελίδες έχουν μπλοκαριστεί μέσω τροποποίησης του DNS, μπλοκάρισμα σε επίπεδο TCP/IP ή μέσω διάφανου HTTP proxy.\n\nΤα αποτελέσματα των δοκιμών σου θα δημοσιευτούν στο [OONI Explorer](https://explorer.ooni.org/world/) και στο [OONI API](https://api.ooni.io/).", + "es": "Comprobar si los sitios web están bloqueados usando la [prueba conectividad de la Web] de OONI (https://ooni.org/nettest/web-connectivity/).\n\nCada vez que pulsas Ejecutar, pruebas diferentes sitios web incluidos en las listas de pruebas de Citizen Lab [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) y [específicas por país](https://github.com/citizenlab/test-lists/tree/master/lists).\n\nPara probar los sitios de tu elección, pulsa el botón Elegir sitios web o selecciona categorías de sitios vía los ajustes de ésta tarjeta.\n\nEsta prueba mide si los sitios web están bloqueados por medio de manipulación de DNS, bloqueo de TCP/IP o por un proxy transparente HTTP.\n\nTus resultados serán publicados en el [Explorador OONI](https://explorer.ooni.org/world/) y la [API OONI](https://api.ooni.io/).", + "fa": "با استفاده از[تست اتصال وب](https://ooni.org/nettest/web-connectivity/) OONI بررسی کنید که آیا وبسایت ها مسدود شده اند یا خیر.\n\n هر بار که بر روی اجرا می زنید، وبسایت‌های مختلفی از لیست‌های تست [جهانی](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) و [کشوری](https://github.com/citizenlab/test-lists/tree/master/lists) از Citizen Lab را تست می‌کنید.\n\nبرای تست سایت‌‌های انتخابی خودتان، بر روی گزینه‌ی انتخاب وبسایت‌ها بزنید و یا دسته‌بندی سایت‌های مورد تست را در تنظیمات این کارت، انتخاب کنید.\n\nاین تست اندازه گیری می کند که سایت‌ها با چه روشی از دستکاری DNS، مسدود شدن TCP/IP و یا به وسیله یک پراکسی شفاف HTTP مسدود شده اند.\n\nنتایج تست های شما بر روی [OONI Explorer](https://explorer.ooni.org/world/) و [OONI API](https://api.ooni.io/) منتشر خواهند شد.", + "fr": "Vérifiez le blocage des sites Web grâce au [Test de connectivité Web](https://ooni.org/nettest/web-connectivity/) de l’OONI (page en anglais).\n\nChaque fois que vous touchez Lancer, vous testez différents sites Web provenant des listes de tests [mondiale](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) et [propre à un pays](https://github.com/citizenlab/test-lists/tree/master/lists) du « Citizen Lab » (site en anglais).\n\nPour tester les sites de votre choix, touchez le bouton « Choisir des sites Web » ou sélectionnez des catégories de sites dans les paramètres de cette carte. \n\nCe test mesure si les sites Web sont bloqués par une manipulation DNS, par un blocage TCP/IP ou par un mandataire HTTP transparent.\n\nVos résultats seront publiés dans l’[Explorateur OONI](https://explorer.ooni.org/world/) et l’[API d’OONI](https://api.ooni.io/) (site en anglais).", + "hi": "OONI के [वेब कनेक्टिविटी परीक्षण](https://ooni.org/nettest/web-connectivity/) का उपयोग करके जांचें कि क्या वेबसाइटों को अवरुद्ध किया गया है।\n\nहर बार जब आप रन पर टैप करते हैं, तो आप सिटीजन लैब की [दुनिया भर](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) की और [देश-विशिष्ट](https://github.com/citizenlab/test-lists/tree/master/lists) परीक्षण सूचियों से विभिन्न वेबसाइटों का परीक्षण करते हैं।\n\nअपनी पसंद की वेबसाइटों का परीक्षण करने के लिए, इस कार्ड की सेटिंग के माध्यम से वेबसाइट चुनें बटन पर टैप करें या साइटों की श्रेणियों का चयन करें।\n\nयह परीक्षण मापता है अगर वेबसाइटों को DNS छेड़छाड़, टीसीपी/आईपी ब्लॉकिंग या पारदर्शी HTTP प्रॉक्सी द्वारा अवरुद्ध किया गया है या नहीं।\n\nआपके परिणाम [OONI एक्सप्लोरर](https://explorer.ooni.org/world/) और [OONI API](https://api.ooni.io/) पर प्रकाशित किए जाएंगे।", + "id": "Periksa apakah suatu situs web diblokir dengan [Tes Konektivitas Web](https://ooni.org/nettest/web-connectivity/) OONI.\n\nSetiap kali Anda mengetuk Jalankan, Anda mengetes situs web berbeda dari daftar tes [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) dan [khusus-negara](https://github.com/citizenlab/test-lists/tree/master/lists) Citizen Lab.\n\nUntuk mengetes situs pilihan Anda, ketuk tombol Pilih situs web atau pilih kategori situs melalui pengaturan kartu ini. \n\nTes ini mengukur apakah situs web diblokir melalui perusakan DNS, pemblokiran TCP/IP, atau proksi HTTP transparan.\n\nHasil Anda akan dipublikasikan di [OONI Explorer](https://explorer.ooni.org/world/) dan [OONI API](https://api.ooni.io/).", + "is": "Athugaðu hvort lokað sé á vefsvæði með því að nota [prófun veftenginga](https://ooni.org/nettest/web-connectivity/) hjá OONI.\n\nÍ hvert skipti sem þú ýtir á 'Keyra' muntu prófa þau vefsvæði sem innifalin eru í [almennu](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) og [lands-sértæku](https://github.com/citizenlab/test-lists/tree/master/lists) prófunarlistunum hjá Citizen Lab.\n\nTil að prófa vefsvæði að eigin vali, skaltu ýta á hnappinn til að velja vefsvæði eða velja flokka vefsvæða í gegnum stillingar þessa spjalds. \n\nÞetta prófar hvort lokað sé á vefi með því að fikta við DNS, lokun með TCP/IP eða með gegnsæum HTTP-milliþjónum (proxy).\n\nNiðurstöðurnar þínar verða birtar í [OONI Explorer](https://explorer.ooni.org/world/) og [OONI API](https://api.ooni.io/).", + "it": "Controlla se i siti web sono bloccati usando il [test di Connettività Web](https://ooni.org/nettest/web-connectivity/) di OONI\n\nOgni volta che fai tap su Run, misurerai diversi siti web dalla [lista globale](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) e [specifica per il paese](https://github.com/citizenlab/test-lists/tree/master/lists) del Citizen Lab.\n\nPer misurare un sito a tua scelta, fai tap sul bottone Scegli siti o configura le categorie da testare nelle impostazioni di questa card.\n\nQuesto test misura se i siti web sono bloccati per mezzo di censura su base DNS, blocco TCP/IP o tramite un proxy HTTP trasparente.\n\nI risultati saranno pubblicati su [OONI Explorer](https://explorer.ooni.org/world/) e [OONI API](https://api.ooni.io/).", + "nl": "Controleer of websites worden geblokkeerd met behulp van OONI's [Web Connectivity-test](https://ooni.org/nettest/web-connectivity/).\n\nElke keer dat je op Uitvoeren tikt, test je verschillende websites van Citizen Lab's [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) en [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists) testlijsten.\n\nOm de sites van uw keuze te testen, tikt u op de knop Websites kiezen of selecteert u categorieën van sites via de instellingen van deze kaart.\n\nDeze test meet of websites worden geblokkeerd door middel van DNS-manipulatie, TCP/IP-blokkering of door een transparante HTTP-proxy.\n\nUw resultaten worden gepubliceerd op [OONI Explorer](https://explorer.ooni.org/world/) en [OONI API](https://api.ooni.io/).", + "pt_BR": "Verifique se os websites estão bloqueados usando o [Teste de Conectividade Web](https://ooni.org/nettest/web-connectivity/) da OONI.\n\nToda vez que você clica em Executar, você testa diferentes websites das listas de testes [globais](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) e [específicas de cada país](https://github.com/citizenlab/test-lists/tree/master/lists) do Citizen Lab.\n\nPara testar os sites de sua escolha, toque no botão Escolher sites ou selecione categorias de sites através das configurações deste cartão.\n\nEste teste mede se os sites são bloqueados por meio de manipulação de DNS, bloqueio TCP/IP ou por um proxy HTTP transparente.\n\nSeus resultados serão publicados em [Explorador OONI](https://explorer.ooni.org/world/) e [API OONI](https://api.ooni.io/).", + "ro": "Check whether websites are blocked using OONI's [Web Connectivity test](https://ooni.org/nettest/web-connectivity/).\n\nEvery time you tap Run, you test different websites from the Citizen Lab's [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) and [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists) test lists.\n\nTo test the sites of your choice, tap the Choose websites button or select categories of sites via the settings of this card. \n\nThis test measures whether websites are blocked by means of DNS tampering, TCP/IP blocking or by a transparent HTTP proxy.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "ru": "Проверьте блокировки сайтов используя OONI [Web Connectivity тест](https://ooni.org/nettest/web-connectivity/).\n\nКаждый раз нажимая \"Старт\", вы проверяете набор сайтов из списков тестирования Citizen Lab [глобально](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) и [по конкретным странам](https://github.com/citizenlab/test-lists/tree/master/lists).\n\nЧтобы протестировать выбранные сайты, нажмите кнопку «Выбрать» или выберите нужные категории сайтов через настройки на этой карточке.\n\nЭтот тест проверяет заблокирован ли сайт через вмешательство в DNS, блокировки TCP/IP или через прозрачный HTTP-прокси.\n\nРезультаты будут опубликованы в [OONI Explorer](https://explorer.ooni.org/world/) и [OONI API](https://api.ooni.io/).", + "sw": "Angalia kama tovuti zimezuiwa kwa kutumia [Kipimo wa Kuunganishaa Wavuti](https://ooni.org/nettest/web-connectivity).\n\nKila unapoboyeza \"Anzisha\", unajaribu tovuti tofauti kutoka kwa Maabara ya Citizen [ya kimataifa](https://github.com/citizenlab/test-/blob/master/lists/global.csv) na [nchi maalum](https://github.com/citizenlab/test/tree/master/lists) orodha ya mtihani.\n\nIli kujaribu tovuti za chaguo lako, gusa kitufe cha Chagua tovuti au chagua makundi ya tovuti kupitia mipangilio ya kadi hii. \n\nMtihani huu unapima kama tovuti zimefungwa kwa njia ya DNS kutatiza, TCP/IP kuzuiwa au kwa mhimili wa HTTP wazi.\n\nMatokeo yako yatachapishwa kwenye [OONI Explorer](https://explorer.ooni.org/world/) na [OONI API](https://api.ooni.io/).\n", + "sk": "Check whether websites are blocked using OONI's [Web Connectivity test](https://ooni.org/nettest/web-connectivity/).\n\nEvery time you tap Run, you test different websites from the Citizen Lab's [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) and [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists) test lists.\n\nTo test the sites of your choice, tap the Choose websites button or select categories of sites via the settings of this card. \n\nThis test measures whether websites are blocked by means of DNS tampering, TCP/IP blocking or by a transparent HTTP proxy.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "sq": "Check whether websites are blocked using OONI's [Web Connectivity test](https://ooni.org/nettest/web-connectivity/).\n\nEvery time you tap Run, you test different websites from the Citizen Lab's [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) and [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists) test lists.\n\nTo test the sites of your choice, tap the Choose websites button or select categories of sites via the settings of this card. \n\nThis test measures whether websites are blocked by means of DNS tampering, TCP/IP blocking or by a transparent HTTP proxy.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "th": "ตรวจสอบว่าเว็บไซต์ถูกปิดกั้นหรือไม่ ด้วย[การทดสอบการเชื่อมต่อเว็บ](https://ooni.io/nettest/web-connectivity/) ของ OONI\n\nทุกครั้งที่คุณแตะปุ่ม ทดสอบ คุณจะทดสอบเว็บไซต์ที่ต่างกันไปจากรายการทดสอบ[ทั่วโลก](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv)และ[เจาะจงประเทศ](https://github.com/citizenlab/test-lists/tree/master/lists) ที่จัดทำโดย Citizen Lab\n\nหากต้องการทดสอบเว็บไซต์ที่คุณกำหนดเอง ให้แตะปุ่ม เลือกเว็บไซต์ หรือเลือกหมวดเว็บไซต์ จากการตั้งค่านี้\n\nการทดสอบนี้จะตรวจวัดว่าเว็บไซต์ถูกปิดกั้นหรือไม่ จากวิธีการปลอมแปลง DNS การปิดกั้น TCP/IP หรือการใช้พร็อกซี HTTP แบบล่องหน\n\nผลทดสอบของคุณจะถูกเผยแพร่บน [OONI Explorer](https://explorer.ooni.org/) และ [OONI API](https://api.ooni.io/)", + "tr": "OONI [site bağlantısı sınaması](https://ooni.org/nettest/web-connectivity/) özelliğini kullanarak sitelerin engellenip engellenmediğini denetleyebilirsiniz.\n\nÇalıştır üzerine her tıkladığınızda, Citizen Lab [küresel](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) ve [ülkeye özel](https://github.com/citizenlab/test-lists/tree/master/lists) sınama listelerindeki çeşitli siteler denetlenir.\n\nBelirli siteleri sınamak için siteleri seçin düğmesine tıklayın ya da bu kartın ayarlarından kategoriyi ya da siteleri seçin. \n\nBu sınama sitelerin DNS müdahalesi, TCP/IP engelleme ya da görünmez vekil sunucu ile engellenip engellenmediğini ortaya çıkarır.\n\nSonuçlarınız [OONI Explorer](https://explorer.ooni.org/world/) ve [OONI API](https://api.ooni.io/) üzerinde yayınlanır.", + "zh_CN": "使用 OONI 的[网页连通性测试](https://ooni.org/nettest/web-connectivity/)检查网站是否被屏蔽。\n\n每次您点击“运行”时,都会测试公民实验室的[全球](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv)和[特定国家](https://github.com/citizenlab/test-lists/tree/master/lists)列表中的一些网站。\n\n如要测试您自选的网站,点击“选择网站”按钮或通过本卡片的设置选择网站类别。\n\n此测试测量网站是否遭受 DNS 篡改、TCP/IP 封锁或透明 HTTP 代理的屏蔽。\n\n您的测试结果会被发布在 [OONI Explorer](https://explorer.ooni.org/world/) 和 [OONI API](https://api.ooni.io/)。", + "zh_TW": "檢查網站是否屏蔽 OONI 之使用 [Web Connectivity test](https://ooni.org/nettest/web-connectivity/).\n\n每當點擊執行時,將測試 Citizen Lab 提供的 [全球](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) 與 [特定國家](https://github.com/citizenlab/test-lists/tree/master/lists) 網站清單。\n\n欲測試所選的網站,請輕觸選取網站按鍵或是透由此卡的設置選取網站類別。\n\n測試會計量網站是否遭 DNS 纂改、 TCP/IP 封鎖或透明的 HTTP 代理等問題\n\n其結果會發佈於[OONI Explorer](https://explorer.ooni.org/world/) 與 [OONI API](https://api.ooni.io/)。", + "my": "OONI ၏ [ဝဘ်ချိတ်ဆက်မှု စမ်းသပ်ခြင်း](https://ooni.org/nettest/web-connectivity/) ကို အသုံးပြု၍ ဝဘ်ဆိုဒ်များအား ပိတ်ဆို့ထားခြင်းရှိ၊ မရှိ စစ်ဆေးပါ။\n\nစမ်းမည် ခလုတ်ကို နှိပ်တိုင်း Citizen Lab ၏ [ဂလိုဘယ်](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) နှင့် [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists) စမ်းသပ်မှု စာရင်းများမှ ကွဲပြားသော ဝဘ်ဆိုဒ်များကို သင် စမ်းသပ်ခြင်း ဖြစ်သည်။\n\nသင်ရွေးချယ်သည့် ဆိုဒ်များကို စမ်းသပ်ရန်၊ ဝဘ်ဆိုဒ်များ ရွေးချယ်မည် ခလုတ်ကို နှိပ်ပါ သို့မဟုတ် ဤကတ်၏ ဆက်တင်များမှ တစ်ဆင့် ဆိုဒ်များ၏ အမျိုးအစားများကို ရွေးချယ်ပါ။\n\nဤစမ်းသပ်မှုသည် ဝဘ်ဆိုက်များကို DNS ကစားခြင်း၊ TCP/IP ပိတ်ဆို့ခြင်း သို့မဟုတ် ပွင့်လင်းမြင်သာသော HTTP ပရောက်စီ ဖြင့် ပိတ်ဆို့ခြင်း ရှိ၊ မရှိ တိုင်းတာ စစ်ဆေးသည်။\nသင့် ရလဒ်များအား [OONI Explorer](https://explorer.ooni.org/world/) နှင့် [OONI API](https://api.ooni.io/) တွင် ထုတ်ပြန်ပေးပါမည်။ ", + "vi": "Kiểm tra xem các trang web có bị chặn không bằng cách sử dụng [Kiểm tra Kết nối Web] của OONI (https://ooni.org/nettest/web-connectivity/).\n\nMỗi khi nhấn Chạy, bạn sẽ kiểm tra các trang web khác nhau từ danh sách [toàn cầu] của Citizen Lab (https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) và danh sách [quốc gia cụ thể] (https://github.com/citizenlab/test-lists/tree/master/lists).\n\nĐể chọn trang bạn muốn kiểm tra, hãy nhấn vào nút Chọn trang web hoặc chọn các danh mục trang web ở phần cài đặt.\n\nKiểm tra này cho biết các trang web có bị chặn bởi các phương thức sửa DNS trái phép, chặn TCP/IP hay bởi một proxy HTTP minh bạch không.\n\nKết quả của bạn sẽ được công bố trên [OONI Explorer] (https://explorer.ooni.org/world/) và [OONI API] (https://api.ooni.io/).", + "km": "ពិនិត្យមើលថាតើវែបសាយត្រូវបិទខ្ទប់ដោយប្រើ OONI [Web Connectivity test](https://ooni.org/nettest/web-connectivity/).\n\nគ្រប់ពេលអ្នកចុច ដំណើរការ អ្នកនឹងតេស្តវែបសាយនានាពីបញ្ជីរបស់ Citizen Lab [global](https://github.com/citizenlab/test-lists/blob/master/lists/global.csv) and [country-specific](https://github.com/citizenlab/test-lists/tree/master/lists)។\n\nដើម្បីតេស្តវែបសាយតាមជម្រើសរបស់អ្នក សូមចុចប៊ូតុង ជ្រើសរើសវែបសាយ ឬជ្រើសរើសផ្នែកផ្សេងៗនៃវែបសាយតាមរយៈការកំណត់នៃកាតនេះ។\n\nតេស្តនេះនឹងវាស់វែងថាតើវែបសាយណាដែលត្រូវបិទខ្ទប់ដោយការជ្រៀតចូល DNS ឬការបិទខ្ទប់ TCP/IP ឬតាមរយៈ HTTP Proxy\n\nលទ្ធផលរបស់អ្នកនឹងផ្សព្វផ្សាយនៅ [OONI Explorer](https://explorer.ooni.org/world/) និង [OONI API](https://api.ooni.io/)." + }, + "icon": "OoniWebsites", + "color": "#4c6ef5", + "expiration_date": "4000-01-01T00:00:00.000000Z", + "oonirun_link_id": "10470", + "date_created": "2024-11-06T14:58:41.000000Z", + "date_updated": "2024-11-06T14:58:41.000000Z", + "revision": "1", + "is_mine": false, + "is_expired": false + }, + { + "name": "Instant Messaging", + "short_description": "Test the blocking of instant messaging apps", + "description": "Check whether [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), and [Signal](https://ooni.org/nettest/signal) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "author": "norbel@ooni.org", + "nettests": [ + { + "test_name": "whatsapp", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "telegram", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "facebook_messenger", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "signal", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + } + ], + "name_intl": { + "ar": "المراسلة الفورية", + "ca": "Missatgeria instantània", + "de": "Instant Messaging", + "el": "Εφαρμογές Συνομιλιών", + "es": "Mensajería instantánea", + "fa": "پيام رسانی سريع", + "fr": "Messagerie instantanée", + "hi": "तात्कालिक संदेशन", + "id": "Perpesanan Instan", + "is": "Snarskilaboð", + "it": "Messaggistica istantanea", + "nl": "Chatprogramma's", + "pt_BR": "Mensagem Instantânea", + "ro": "Mesagerie instant", + "ru": "Мессенджеры", + "sw": "Ujumbe wa Papo hapo", + "sk": "Výmena okamžitých správ", + "sq": "Mesazhe", + "th": "แอปแชต", + "tr": "Anlık ileti", + "zh_CN": "即时通讯", + "zh_TW": "即時通訊", + "my": "ချက်ခြင်း မက်ဆေ့ချ်", + "vi": "Tin Nhắn Nhanh", + "km": "សារភ្លាមៗ" + }, + "short_description_intl": { + "ar": "اختبار حجب برامج المراسلة الفورية", + "ca": "Prova el blocatge de les aplicacions de missatgeria instantània", + "de": "Teste das Blockieren von Instant Messaging-Apps", + "el": "Έλεγξε το μπλοκάρισμα εφαρμογών συνομιλιών", + "es": "Prueba el bloqueo de aplicaciones de mensajería instantánea.", + "fa": "تست مسدودیت پیام‌رسان‌ها", + "fr": "Testez le blocage des applis de messagerie instantanée", + "hi": "त्वरित संदेश एप्लिकेशन को अवरुद्ध करने का परीक्षण करें", + "id": "Tes pemblokiran aplikasi perpesanan instan", + "is": "Prófa hindranir fyrir skilaboðaforrit", + "it": "Verifica il blocco di app di messaggistica", + "nl": "Test het blokkeren van instant messaging-apps", + "pt_BR": "Teste o bloqueio de aplicativos de mensagens instantâneas", + "ro": "Testarea blocării aplicațiilor de mesagerie instantanee", + "ru": "Протестировать блокировку мессенджеров", + "sw": "Jaribu uzuiaji wa programu za ujumbe wa papo hapo", + "sk": "Otestuj blokovanie aplikácií na výmenu okamžitých správ", + "sq": "Testoni bllokimin e aplikacioneve të mesazheve", + "th": "ทดสอบการปิดกั้นแอปสนทนา", + "tr": "Anlık ileti uygulamalarının engellenip engellenmediğini anlayın", + "zh_CN": "测试即时消息应用的屏蔽情况", + "zh_TW": "測試遭封鎖的即時通訊應用", + "my": "လက်ငင်း စာတိုပေးပို့ခြင်း အက်ပ်များ ပိတ်ဆို့ခြင်းအား စမ်းသပ်မည်", + "vi": "Kiểm tra việc chặn các ứng dụng tin nhắn nhanh", + "km": "តេស្តលើការទប់ស្កាត់កម្មវិធីផ្ញើសារភ្លាមៗ" + }, + "description_intl": { + "ar": "تحقّقوا من حجب [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), and [Signal](https://ooni.org/nettest/signal) are blocked. \n\nستنشر نتائج اختبارك على [متصفح OONI](https://explorer.ooni.org/) و على [OONI API](https://api.ooni.io/).", + "ca": "Check whether [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), and [Signal](https://ooni.org/nettest/signal) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "de": "Prüfe, ob [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/) und [Signal](https://ooni.org/nettest/signal) blockiert sind.\n\nDeine Ergebnisse werden auf dem [OONI Explorer](https://explorer.ooni.org/world/) und [OONI API](https://api.ooni.io/) veröffentlicht.", + "el": "Δες αν το [WhatsApp](https://ooni.org/nettest/whatsapp/), το [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), το [Telegram](https://ooni.org/nettest/telegram/) και το [Signal](https://ooni.org/nettest/signal) έχουν μπλοκαριστεί.\n\nΤα αποτελέσματα των δοκιμών σου θα δημοσιευτούν στο [OONI Explorer](https://explorer.ooni.org/world/) και στο [OONI API](https://api.ooni.io/).", + "es": "Comprueba si [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/) y [Signal](https://ooni.org/nettest/signal) están bloqueados.\n\nTus resultados serán publicados en el [Explorador OONI](https://explorer.ooni.org/world/) y la [API OONI](https://api.ooni.io/).", + "fa": "بررسی کنید که آیا [واتس‌اپ](https://ooni.org/nettest/whatsapp/)، [پیام‌رسان فیسبوک](https://ooni.org/nettest/facebook-messenger/)، [تلگرام](https://ooni.org/nettest/telegram/) و [سیگنال](https://ooni.org/nettest/signal) مسدود هستند و یا خیر.\n\nنتایج تست های شما بر روی [OONI Explorer](https://explorer.ooni.org/world/) و [OONI API](https://api.ooni.io/) منتشر خواهند شد.", + "fr": "Vérifiez si [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/) ou [Signal](https://ooni.org/nettest/signal) sont bloqués (site en anglais)..\n\nVos résultats seront publiés dans l’[Explorateur OONI](https://explorer.ooni.org/world/) et [l’API d’OONI](https://api.ooni.io/) (site en anglais).", + "hi": "जांचें कि क्या [WhatsApp] (https://ooni.org/nettest/whatsapp/), [Facebook Messenger] (https://ooni.org/nettest/facebook-messenger/), [Telegram] (https://ooni.org/nettest/telegram/), और [Signal](https://ooni.org/nettest/signal) अवरुद्ध हैं।\n\nआपके परिणाम [OONI एक्सप्लोरर](https://explorer.ooni.org/world/) और [OONI API](https://api.ooni.io/) पर प्रकाशित किए जाएंगे।", + "id": "Periksa apakah [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), dan [Signal](https://ooni.org/nettest/signal) diblokir.\n\nHasil Anda akan dipublikasikan di [OONI Explorer](https://explorer.ooni.org/world/) dan [OONI API](https://api.ooni.io/).", + "is": "Athugaðu hvort [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), og [Signal](https://ooni.org/nettest/signal) verði fyrir hindrunum.\n\nNiðurstöðurnar þínar verða birtar í [OONI Explorer](https://explorer.ooni.org/world/) og [OONI API](https://api.ooni.io/).", + "it": "Controlla se [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/) o [Telegram](https://ooni.org/nettest/telegram/) sono bloccati.\n\nI risultati dei tuoi test saranno pubblicati su [OONI Explorer](https://explorer.ooni.org/world/) e [OONI API](https://api.ooni.io/).", + "nl": "Controleer of [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni .org/nettest/telegram/) en [Signal](https://ooni.org/nettest/signal) worden geblokkeerd.\n\nUw resultaten worden gepubliceerd op [OONI Explorer](https://explorer.ooni.org/world/) en [OONI API](https://api.ooni.io/).", + "pt_BR": "Verifique se [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), e [Signal](https://ooni.org/nettest/signal) estão bloqueados.\n\nSeus resultados serão publicados em [OONI Explorer](https://explorer.ooni.org/world/) e no [OONI API](https://api.ooni.io/).", + "ro": "Check whether [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), and [Signal](https://ooni.org/nettest/signal) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "ru": "Проверить заблокированы ли [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), и [Signal](https://ooni.org/nettest/signal).\n\nРезультаты будут опубликованы в [OONI Explorer](https://explorer.ooni.org/world/) и [OONI API](https://api.ooni.io/).", + "sw": "Angalia ikiwa [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), na [Signal](https://ooni.org/nettest/signal) zimezuiwa.\n\nMatokeo yako yatachapishwa kwenye [OONI Explorer](https://explorer.ooni.org/world/) na [OONI API](https://api.ooni.io/).", + "sk": "Check whether [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), and [Signal](https://ooni.org/nettest/signal) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "sq": "Check whether [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), and [Signal](https://ooni.org/nettest/signal) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).", + "th": "ตรวจสอบว่า [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/), และ [Signal](https://ooni.org/nettest/signal) ถูกปิดกั้นหรือไม่\n\nผลทดสอบของคุณจะถูกเผยแพร่บน [OONI Explorer](https://explorer.ooni.io/world/) และ [OONI API](https://api.ooni.io/)", + "tr": "[WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/) ve [Signal](https://ooni.org/nettest/signal) uygulamalarının engellenip engellenmediğini kontrol edebilirsiniz.\n\nSonuçlarınız [OONI Explorer](https://explorer.ooni.org/world/) ve [OONI API](https://api.ooni.io/) üzerinde yayınlanır.", + "zh_CN": "检测 [WhatsApp](https://ooni.org/nettest/whatsapp/)、[Facebook Messenger](https://ooni.org/nettest/facebook-messenger/)、[Telegram](https://ooni.org/nettest/telegram/)和 [Signal](https://ooni.org/nettest/signal) 是否被屏蔽。\n\n你的结果将公布在 [OONI Explorer](https://explorer.ooni.org/world/) 和[OONI API](https://api.ooni.io/)。", + "zh_TW": "檢查 [WhatsApp](https://ooni.org/nettest/whatsapp/), [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/), [Telegram](https://ooni.org/nettest/telegram/) 以及 [Signal](https://ooni.org/nettest/signal) 是否已被封鎖。\n\n其結果會發佈在 [OONI Explorer](https://explorer.ooni.org/world/) 與 [OONI API](https://api.ooni.io/).", + "my": "[WhatsApp](https://ooni.org/nettest/whatsapp/)၊ [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/)၊ [Telegram](https://ooni.org/nettest/telegram/) နှင့် [Signal](https://ooni.org/nettest/signal) တို့ကို ပိတ်ဆို့ထားခြင်း ရှိ/မရှိ စစ်ဆေးမည်။\n\nသင့် ရလဒ်များအား [OONI Explorer](https://explorer.ooni.org/world/) နှင့် [OONI API](https://api.ooni.io/) တွင် ထုတ်ဝေပါမည်။", + "vi": "Kiểm tra [WhatsApp] (https://ooni.org/nettest/whatsapp/), [Facebook Messenger] (https://ooni.org/nettest/facebook-messenger/), [Telegram] (https://ooni .org/nettest/telegram/) và [Signal] (https://ooni.org/nettest/signal) có bị chặn không.\n\nKết quả kiểm tra của bạn sẽ được công bố trên [OONI Explorer] (https://explorer.ooni.org/world/) và [OONI API] (https://api.ooni.io/).", + "km": "ពិនិត្យមើលថាតើ [WhatsApp](https://ooni.org/nettest/whatsapp/) [Facebook Messenger](https://ooni.org/nettest/facebook-messenger/)​[Telegram](https://ooni.org/nettest/telegram/) និង [Signal](https://ooni.org/nettest/signal) ត្រូវបានបិទឬទេ។\n\nលទ្ធផលរបស់អ្នកនឹងផ្សព្វផ្សាយលើ [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/)." + }, + "icon": "OoniInstantMessaging", + "color": "#15aabf", + "expiration_date": "4000-01-01T00:00:00.000000Z", + "oonirun_link_id": "10471", + "date_created": "2024-11-06T14:58:42.000000Z", + "date_updated": "2024-11-06T14:58:42.000000Z", + "revision": "1", + "is_mine": false, + "is_expired": false + }, + { + "name": "Circumvention", + "short_description": "Test the blocking of censorship circumvention tools", + "description": "Check whether [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) or [RiseupVPN](https://ooni.org/nettest/riseupvpn/) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "author": "norbel@ooni.org", + "nettests": [ + { + "test_name": "psiphon", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "tor", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + } + ], + "name_intl": { + "ar": "تجاوز الحجب", + "ca": "Elusió", + "de": "Umgehung", + "el": "Παράκαμψη", + "es": "Evasión", + "fa": "◾️ دور زدن سانسور", + "fr": "Contournement", + "hi": "तरक़ीब", + "id": "Penghindaran", + "is": "Hjáleiðir", + "it": "Elusione", + "nl": "Omzeiling", + "pt_BR": "Contornar a censura", + "ro": "Eludarea", + "ru": "Обход блокировки", + "sw": "Mazungumzo", + "sk": "Obchádzanie", + "sq": "Shmangie", + "th": "การหลบเลี่ยง", + "tr": "Sansürü aşma", + "zh_CN": "翻墙", + "zh_TW": "繞行", + "my": "ဆင်ဆာရှောင်တိမ်းခြင်း", + "vi": "Vượt thoát kiểm duyệt", + "km": "ការបញ្ចៀស" + }, + "short_description_intl": { + "ar": "اختبار حجب وسائل تجاوز الرقابة.", + "ca": "Prova el blocatge d'eines d'elusió de la censura", + "de": "Test auf Blockierung der Instrumente zur Zensurumgehung ", + "el": "Έλεγξε το μπλοκάρισμα εργαλείων παράκαμψης λογοκρισίας", + "es": "Probar el bloqueo de herramientas de elusión de censura", + "fa": "مسدود بودن ابزارهای دور زدن سانسور را بیازمایید", + "fr": "Testez le blocage des outils de contournement de la censure", + "hi": "सेंसरशिप परिधि उपकरणों के अवरोधन का परीक्षण करें", + "id": "Tes pemblokiran alat penghindaran sensor", + "is": "Prófa hindranir fyrir leiðir framhjá ritskoðun", + "it": "Testa il blocco degli strumenti d'elusione della censura", + "nl": "Test de blokkering van tools voor het omzeilen van censuur", + "pt_BR": "Testar o bloqueio de ferramentas de evasão à censura", + "ro": "Testarea blocării instrumentelor de eludare a cenzurii", + "ru": "Протестировать блокировку инструментов обхода цензуры", + "sw": "Jaribu kuzuia vifaa vya kuzuia uzuiaji", + "sk": "Otestovať blokovanie nástrojov obchádzania cenzúry", + "sq": "Test the blocking of censorship circumvention tools", + "th": "ทดสอบการปิดกั้นเครื่องมือหลบเลี่ยง", + "tr": "Sansürü aşma araçları engellemesini sınayın", + "zh_CN": "测试翻墙工具屏蔽状况", + "zh_TW": "测試翻墙工具屏蔽狀況", + "my": "ဆင်ဆာရှောင်တိမ်း ကိရိယာများကို ပိတ်ဆို့ စမ်းသပ်မည်", + "vi": "Kiểm tra việc chặn các công cụ vượt thoát kiểm duyệt", + "km": "តេស្តលើកាបិទឧបករណ៍បញ្ចៀសការ​រឹត​ត្បិត" + }, + "description_intl": { + "ar": "تحققوا من حجب [Psiphon](https://ooni.io/nettest/psiphon/) و [تور](https://ooni.io/nettest/tor/).\n\nستنشر نتائج اختبارك على [متصفح OONI](https://explorer.ooni.org/) و على [OONI API](https://api.ooni.io/).", + "ca": "Check whether [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) or [RiseupVPN](https://ooni.org/nettest/riseupvpn/) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "de": "Prüfe, ob [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) oder [RiseupVPN](https://ooni.org/nettest/riseupvpn/) blockiert sind.\n\nDeine Ergebnisse werden auf dem [OONI Explorer](https://explorer.ooni.org/) und [OONI API](https://api.ooni.io/) veröffentlicht.", + "el": "Δες αν το [Psiphon](https://ooni.org/nettest/psiphon/), το [Tor](https://ooni.org/nettest/tor/) ή το [RiseupVPN](https://ooni.org/nettest/riseupvpn/) έχουν μπλοκαριστεί.\n\nΤα αποτελέσματα θα δημοσιευτούν στο [OONI Explorer] (https://explorer.ooni.org/) και στο [OONI API] (https://api.ooni.io/).", + "es": "Comprueba si [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) o [RiseupVPN](https://ooni.org/nettest/riseupvpn/) están bloqueados.\n\nTus resultados serán publicados en [Explorador OONI] (https://explorer.ooni.org/) y [OONI API](https://api.ooni.io/).", + "fa": "بررسی کنید که آیا [Psiphon](https://ooni.org/nettest/psiphon/)، [Tor](https://ooni.org/nettest/tor/) و یا [RiseupVPN](https://ooni.org/nettest/riseupvpn/) مسدود هستند یا خیر.\n\nنتایج تست های شما در [OONI Explorer](https://explorer.ooni.org/) و [OONI API](https://api.ooni.io/) منتشر خواهند شد.", + "fr": "Vérifiez si [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) ou [RiseupVPN](https://ooni.org/nettest/riseupvpn/) sont bloqués (site en anglais).\n\nVos résultats seront publiés dans l’[Explorateur OONI](https://explorer.ooni.org/) et l’[API d’OONI](https://api.ooni.io/) (site en anglais).", + "hi": "जांचें कि क्या [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) या [RiseupVPN](https://ooni.org/nettest/riseupvpn/) अवरुद्ध हैं।\n\nआपके परिणाम [OONI एक्सप्लोरर](https://explorer.ooni.org/) और [OONI API](https://api.ooni.io/) पर प्रकाशित किए जाएंगे।", + "id": "Periksa apakah [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) atau [RiseupVPN](https://ooni.org/nettest/riseupvpn/) diblokir.\n\nHasil Anda akan dipublikasikan di [OONI Explorer](https://explorer.ooni.org/) dan [OONI API](https://api.ooni.io/).", + "is": "Athugaðu hvort [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) eða [RiseupVPN](https://ooni.org/nettest/riseupvpn/) verði fyrir hindrunum.\n\nNiðurstöðurnar þínar verða birtar í [OONI Explorer](https://explorer.ooni.org/) og [OONI API](https://api.ooni.io/).", + "it": "Controlla se [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) o [RiseupVPN](https://ooni.org/nettest/riseupvpn/) sono bloccati.\n\nI tuoi risultati saranno pubblicati in [OONI Explorer](https://explorer.ooni.org/) e [OONI API](https://api.ooni.io/).", + "nl": "Controleer of [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) of [RiseupVPN](https://ooni.org/nettest/riseupvpn/) zijn geblokkeerd.\n\nUw resultaten worden gepubliceerd op [OONI Explorer](https://explorer.ooni.org/) en [OONI API](https://api.ooni.io/).", + "pt_BR": "Verifique se [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) ou [RiseupVPN](https://ooni.org/nettest/riseupvpn/) estão bloqueados.\n\nSeus resultados serão publicados em [OONI Explorer](https://explorer.ooni.org/) e no [OONI API](https://api.ooni.io/).", + "ro": "Check whether [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) or [RiseupVPN](https://ooni.org/nettest/riseupvpn/) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "ru": "Проверьте заблокирован ли [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) или [RiseupVPN](https://ooni.org/nettest/riseupvpn/).\n\nРезультаты будут опубликованы в [OONI Explorer](https://explorer.ooni.org/) и [OONI API](https://api.ooni.io/).", + "sw": "Angalia ikiwa [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) au [RiseupVPN](https://ooni.org/nettest/riseupvpn/) zimezuiwa.\n\nMatokeo yako yatachapishwa kwenye [OONI Explorer](https://explorer.ooni.org/) na [OONI API](https://api.ooni.io/).", + "sk": "Check whether [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) or [RiseupVPN](https://ooni.org/nettest/riseupvpn/) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "sq": "Check whether [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/) or [RiseupVPN](https://ooni.org/nettest/riseupvpn/) are blocked.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "th": "ตรวจสอบว่า [Psiphon](https://ooni.io/nettest/psiphon/), [Tor](https://ooni.io/nettest/tor/) และ [RiseupVPN](https://ooni.io/nettest/riseupvpn/) ถูกปิดกั้นหรือไม่\n\nผลทดสอบของคุณจะถูกเผยเเพร่บน [OONI Explorer](https://explorer.ooni.org/) เเละ [OONI API](https://api.ooni.io/)", + "tr": "[Psiphon](https://ooni.org/nettest/psiphon/) ve [Tor](https://ooni.org/nettest/tor/) ya da [RiseupVPN](https://ooni.org/nettest/riseupvpn/) engelleniyor mu öğrenin.\n\nSonuçlarınız [OONI Explorer](https://explorer.ooni.org/) ve [OONI API](https://api.ooni.io/) sayfasında yayınlanır.", + "zh_CN": "检测 [Psiphon](https://ooni.org/nettest/psiphon/)、[Tor](https://ooni.org/nettest/tor/) 或 [RiseupVPN](https://ooni.org/nettest/riseupvpn/) 是否被封锁。\n\n你的结果将公布在 [OONI Explorer](https://explorer.ooni.org/) 和[OONI API](https://api.ooni.io/)。", + "zh_TW": "檢查 [Psiphon](https://ooni.org/nettest/psiphon/), [Tor](https://ooni.org/nettest/tor/)或[RiseupVPN](https://ooni.org/nettest/riseupvpn/) 是否已被封鎖。\n\n其結果會發佈於 [OONI Explorer](https://explorer.ooni.org/) 與 [OONI API](https://api.ooni.io/).", + "my": "[Psiphon](https://ooni.org/nettest/psiphon/)၊ [Tor](https://ooni.org/nettest/tor/) သို့မဟုတ် [RiseupVPN](https://ooni.org/nettest/riseupvpn/) တို့ကို ပိတ်ဆို့ထားခြင်း ရှိ/မရှိ စစ်ဆေးရန်\nသင့် ရလဒ်များအား [OONI Explorer](https://explorer.ooni.org/) နှင့် [OONI API](https://api.ooni.io/) တွင် ထုတ်ပြန်ပေးပါမည်။ ", + "vi": "Kiểm tra [Psiphon] (https://ooni.org/nettest/psiphon/), [Tor] (https://ooni.org/nettest/tor/) hay [RiseupVPN] (https://ooni.org/nettest/roseupvpn/) có bị chặn không.\n\nKết quả kiểm tra của bạn sẽ được công bố trên [OONI Explorer] (https://explorer.ooni.org/) và [OONI API] (https://api.ooni.io/).", + "km": "ពិនិត្យមើលថាតើ [Psiphon](https://ooni.org/nettest/psiphon/) [Tor](https://ooni.org/nettest/tor/) ឬ [RiseupVPN](https://ooni.org/nettest/riseupvpn/) ត្រូវបានបិទឬទេ។\n\nលទ្ធផលរបស់អ្នកនឹងផ្សព្វផ្សាយលើ [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/)។" + }, + "icon": "OoniCircumvention", + "color": "#e64980", + "expiration_date": "4000-01-01T00:00:00.000000Z", + "oonirun_link_id": "10472", + "date_created": "2024-11-06T14:58:43.000000Z", + "date_updated": "2024-11-06T14:58:43.000000Z", + "revision": "1", + "is_mine": false, + "is_expired": false + }, + { + "name": "Performance", + "short_description": "Test your network speed and performance", + "description": "Measure the speed and performance of your network using the [NDT](https://ooni.org/nettest/ndt/) test.\n\nMeasure video streaming performance using the [DASH](https://ooni.org/nettest/dash/) test.\n\nThese tests consume data depending on your network speed.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).\n\nDisclaimer: These tests rely on third party servers. We therefore cannot guarantee that your IP address will not be collected.", + "author": "norbel@ooni.org", + "nettests": [ + { + "test_name": "ndt", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "dash", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "http_header_field_manipulation", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "http_invalid_request_line", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + } + ], + "name_intl": { + "ar": "الأداء", + "ca": "Rendiment", + "de": "Performance", + "el": "Απόδοση δικτύου", + "es": "Rendimiento", + "fa": "کارایی", + "fr": "Performances", + "hi": "प्रदर्शन", + "id": "Kinerja", + "is": "Afköst", + "it": "Prestazioni", + "nl": "Prestaties", + "pt_BR": "Desempenho", + "ro": "Performanță", + "ru": "Производительность", + "sw": "Utendaji", + "sk": "Výkon", + "sq": "Performanca", + "th": "ประสิทธิภาพ", + "tr": "Başarım", + "zh_CN": "性能", + "zh_TW": "效能", + "my": "စွမ်းဆောင်ရည်", + "vi": "Hiệu suất", + "km": "ការសម្តែង" + }, + "short_description_intl": { + "ar": "اختبار سرعة و جودة شبكتك", + "ca": "Proveu la velocitat i el rendiment de la xarxa", + "de": "Teste die Geschwindigkeit und Performance deines Netzwerks", + "el": "Έλεγξε την ταχύτητα και την απόδοση του δικτύου σου", + "es": "Mide la velocidad y rendimiento de tu red", + "fa": "تست سرعت و کارایی شبکه شما", + "fr": "Testez la vitesse et les performances de votre réseau", + "hi": "अपने नेटवर्क की गति और प्रदर्शन का परीक्षण करें", + "id": "Tes kecepatan dan kinerja jaringan Anda.", + "is": "Prófa hraða og afköst netsins þíns", + "it": "Misura la velocità e le prestazioni della tua rete", + "nl": "Test uw netwerksnelheid en prestaties", + "pt_BR": "Teste a velocidade e o desempenho de sua rede", + "ro": "Testarea vitezei și performanței rețelei", + "ru": "Измерить скорость и производительность сети", + "sw": "Pima kasi ya mtandao wako na utendaji", + "sk": "Otestuj rýchlosť a výkon svojej siete", + "sq": "Testo shpejtësinë dhe performancën e rrjetit", + "th": "ทดสอบความเร็วเเละประสิทธิภาพเครือข่ายของคุณ", + "tr": "Ağınızın hızını ve başarımını ölçün", + "zh_CN": "测试您的网速和性能", + "zh_TW": "測試網路速度和效能", + "my": "သင့် ကွန်ရက်အမြန်နှုန်းနှင့် စွမ်းဆောင်ရည်ကို စမ်းသပ်ပါ", + "vi": "Kiểm tra tốc độ và hiệu suất mạng của bạn", + "km": "តេស្តល្បឿន និងគុណភាពនៃបណ្តាញរបស់អ្នក" + }, + "description_intl": { + "ar": "يمكن قياس سرعة و جودة شبكتك من خلال اختبار [NDT](https://ooni.io/nettest/ndt/).\n\nويمكن قياس أداء بث الفيديو من خلال اختبار [DASH](https://ooni.io/nettest/dash/).\n\nهذه الاختبارات تستهلك بيانات بحسب سرعة اتصالك بالشبكة.\n\nستنشر نتائج اختبارك على [متصفح OONI](https://explorer.ooni.io/world/) و على [OONI API](https://api.ooni.io/).\n\nتنبيه: هذه الاختبارات تعتمد على خوادم من أطراف ثالثة. لذلك لا نستطيع ضمان عدم تسجيل عنوان IP الخاص بك.", + "ca": "Measure the speed and performance of your network using the [NDT](https://ooni.org/nettest/ndt/) test.\n\nMeasure video streaming performance using the [DASH](https://ooni.org/nettest/dash/) test.\n\nThese tests consume data depending on your network speed.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).\n\nDisclaimer: These tests rely on third party servers. We therefore cannot guarantee that your IP address will not be collected.", + "de": "Miss die Geschwindigkeit und Leistung deines Netzwerks mit dem [NDT](https://ooni.org/nettest/ndt/)-Test.\n\nMiss die Videostreaming-Leistung mit dem [DASH](https://ooni.org/nettest/dash/)-Test.\n\nDiese Tests verbrauchen Daten in Abhängigkeit von deiner Netzwerkgeschwindigkeit.\n\nDeine Ergebnisse werden auf dem [OONI Explorer](https://explorer.ooni.org/world/) und [OONI API](https://api.ooni.io/) veröffentlicht.\n\nHaftungsausschluss: Diese Tests verlassen sich auf Server von Drittanbietern. Wir können daher nicht garantieren, dass deine IP-Adresse nicht gesammelt wird.", + "el": "Έλεγξε την ταχύτητα και την απόδοση του δικτύου σου, χρησιμοποιώντας τη δοκιμή [NDT](https://ooni.org/nettest/ndt/).\n\nΜέτρησε την απόδοση ροής βίντεο, χρησιμοποιώντας τη δοκιμή [DASH](https://ooni.org/nettest/dash/).\n\nΑυτές οι δοκιμές καταναλώνουν δεδομένα ανάλογα με την ταχύτητα του δικτύου σου.\n\nΤα αποτελέσματα των δοκιμών σου θα δημοσιευτούν στο [OONI Explorer](https://explorer.ooni.org/world/) και στο [OONI API](https://api.ooni.io/).\n\nΠροσοχή: Αυτές οι δοκιμές βασίζονται σε διακομιστές τρίτων. Επομένως, δεν μπορούμε να εγγυηθούμε ότι η διεύθυνση IP σου δε θα συλλεχθεί.", + "es": "Mide la velocidad y rendimiento de tu red usando la prueba [NDT](https://ooni.org/nettest/ndt/).\n\nMide el rendimiento del streaming de vídeo usando la prueba [DASH](https://ooni.org/nettest/dash/).\n\nEstas pruebas consumen datos dependiendo de la velocidad de tu red.\n\nTus resultados serán publicados en el [Explorador OONI](https://explorer.ooni.org/world/) y la [API OONI](https://api.ooni.io/).\n\nDescargo: Estas pruebas dependen de servidores de terceros. Por lo tanto, no podemos garantizar que tu dirección IP no será recopilada.", + "fa": "سرعت و کارایی شبکه خود را با استفاده از تست [NDT](https://ooni.org/nettest/ndt/) اندازه گیری کنید.\n\nکارایی پخش زنده ویدیویی را با استفاده از تست [DASH](https://ooni.org/nettest/dash/) اندازه گیری کنید.\n\nاین تست‌‌ها با توجه به سرعت شبکه‌ی شما، داده مصرف می‌کنند.\n\nنتایج تست های شما بر روی [OONI Explorer](https://explorer.ooni.org/world/) و [OONI API](https://api.ooni.io/) منتشر خواهند شد.\n\nسلب مسئولیت: این تست‌ها وابسته به سرورهای ثالث هستند. بنابراین ما نمی توانیم تضمین کنیم که آدرس IP شما جمع آوری نخواهد شد.", + "fr": "Mesurez la vitesse et les performances de votre réseau grâce au test [NDT](https://ooni.org/nettest/ndt/) (page en anglais).\n\nMesurez les performances de la diffusion en continu de vidéos grâce au test [DASH](https://ooni.org/nettest/dash/) (page en anglais).\n\nCes tests consomment des données selon la vitesse de votre réseau.\n\nVos résultats seront publiés dans l’[Explorateur OONI](https://explorer.ooni.org/world/) et l’[API d’OONI](https://api.ooni.io/) (site en anglais).\n\nAvis : Ces tests reposent sur des serveurs tiers. Nous ne pouvons donc pas garantir que votre adresse IP ne sera pas recueillie.", + "hi": "[NDT](https://ooni.org/nettest/ndt/) परीक्षण का उपयोग कर अपने नेटवर्क की गति और प्रदर्शन को मापें।\n\n[DASH](https://ooni.org/nettest/dash/) परीक्षण का उपयोग कर वीडियो स्ट्रीमिंग के प्रदर्शन को मापें।\n\nये परीक्षण आपके नेटवर्क की गति के आधार पर डेटा की खपत करते हैं।\n\nआपके परिणाम [OONI एक्सप्लोरर](https://explorer.ooni.org/world/) और [OONI API](https://api.ooni.io/) पर प्रकाशित किए जाएंगे।\n\nअस्वीकरण: ये परीक्षण तीसरे पक्ष के सर्वर पर निर्भर करते हैं। इसलिए हम गारंटी नहीं दे सकते कि आपका आईपी पता एकत्र नहीं किया जाएगा।", + "id": "Ukur kecepatan dan kinerja jaringan Anda menggunakan tes [NDT](https://ooni.org/nettest/ndt/).\n\nUkur kinerja aliran video menggunakan tes [DASH](https://ooni.org/nettest/dash/).\n\nPengetesan ini menggunakan data tergantung pada kecepatan jaringan Anda.\n\nHasil Anda akan dipublikasikan di [OONI Explorer](https://explorer.ooni.org/world/) dan [OONI API](https://api.ooni.io/).\n\nPenafian: Pengetesan ini bergantung pada peladen pihak ketiga. Oleh karena itu, kami tidak dapat menjamin bahwa alamat IP Anda tidak akan dikumpulkan.", + "is": "Mældu hraða og afköst netkerfisins þíns með [NDT](https://ooni.org/nettest/ndt/) prófun.\n\nMældu afköst myndstreymis með [DASH](https://ooni.org/nettest/dash/) prófun.\n\nÞessar prófanir nota gagnamagn í samræmi við hraða netkerfisins.\n\nNiðurstöðurnar þínar verða birtar í [OONI Explorer](https://explorer.ooni.org/world/) og [OONI API](https://api.ooni.io/).\n\nFyrirvari: Þessar prófanir reiða sig á vefþjóna utanaðkomandi aðila. Við getum því ekki ábyrgst að IP-vistföngum sé ekki safnað.", + "it": "Misura la velocità e le prestazioni della tua rete con il test [NDT](https://ooni.org/nettest/ndt/).\n\nMisura le prestazioni dello streaming video con il test [DASH](https://ooni.org/nettest/dash/).\n\nQuesti test consumano traffico dati in base alla velocità della tua rete.\n\nI risultati dei tuoi test saranno pubblicati su [OONI Explorer](https://explorer.ooni.org/world/) e [OONI API](https://api.ooni.io/).\n\nAttenzione: questi test usano server di terze parti. Non possiamo quindi garantire che il vostro indirizzo IP non sarà raccolto.", + "nl": "Meet de snelheid en prestaties van uw netwerk met behulp van de [NDT](https://ooni.org/nettest/ndt/) test.\n\nMeet de prestaties van videostreaming met behulp van de [DASH](https://ooni.org/nettest/dash/)-test.\n\nDeze tests verbruiken gegevens, afhankelijk van uw netwerksnelheid.\n\nUw resultaten worden gepubliceerd op [OONI Explorer](https://explorer.ooni.org/world/) en [OONI API](https://api.ooni.io/).\n\nDisclaimer: deze tests zijn afhankelijk van servers van derden. We kunnen daarom niet garanderen dat uw IP-adres niet wordt verzameld.", + "pt_BR": "Meça a velocidade e o desempenho da sua rede usando o teste [NDT](https://ooni.org/nettest/ndt/).\n\nMeça o desempenho da streaming de vídeo usando o [DASH](https://ooni.org/nettest/dash/).\n\nEsses testes consomem dados dependendo da velocidade da sua rede.\n\nSeus resultados serão publicados no [OONI Explorer](https://explorer.ooni.org/world/) e na [OONI API](https://api.ooni.io/).\n\nIsenção de responsabilidade: Esses testes dependem de servidores de terceiros. Portanto, não podemos garantir que seu endereço IP não seja coletado.", + "ro": "Measure the speed and performance of your network using the [NDT](https://ooni.org/nettest/ndt/) test.\n\nMeasure video streaming performance using the [DASH](https://ooni.org/nettest/dash/) test.\n\nThese tests consume data depending on your network speed.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).\n\nDisclaimer: These tests rely on third party servers. We therefore cannot guarantee that your IP address will not be collected.", + "ru": "Скорость и производительность сети можно измерить с помощью [NDT](https://ooni.io/nettest/ndt/).\n\nСкорость видеопотока — с помощью [DASH](https://ooni.io/nettest/dash/).\n\nЭти тесты обрабатывают данные и зависят от скорости вашей сети.\n\nРезультаты будут опубликованы в [OONI Explorer](https://explorer.ooni.io/world/) и [OONI API](https://api.ooni.io/).\n\nВнимание: в этих тестах используются серверы третьих сторон. Мы не можем гарантировать конфиденциальность вашего IP-адреса.", + "sw": "Pima kasi na utendaji kazi wa mtandao wako kwa kutumia jaribio la [NDT](https://ooni.org/nettest/ndt/).\n\nPima utiririshaji wa video ukitumia jaribio la [DASH](https://ooni.org/nettest/dash/).\n\nVipimo hivi hutumia data kulingana na kasi ya mtandao wako.\n\nMatokeo yako yatachapishwa kwenye [OONI Explorer](https://explorer.ooni.org/world/) na [OONI API](https://api.ooni.io/).\n\nKanusho: Majaribio haya yanategemea seva za mtu mwingine. Kwa hivyo hatuwezi kuhakikisha kuwa anwani yako ya IP haitakusanywa.", + "sk": "Measure the speed and performance of your network using the [NDT](https://ooni.org/nettest/ndt/) test.\n\nMeasure video streaming performance using the [DASH](https://ooni.org/nettest/dash/) test.\n\nThese tests consume data depending on your network speed.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).\n\nDisclaimer: These tests rely on third party servers. We therefore cannot guarantee that your IP address will not be collected.", + "sq": "Measure the speed and performance of your network using the [NDT](https://ooni.org/nettest/ndt/) test.\n\nMeasure video streaming performance using the [DASH](https://ooni.org/nettest/dash/) test.\n\nThese tests consume data depending on your network speed.\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).\n\nDisclaimer: These tests rely on third party servers. We therefore cannot guarantee that your IP address will not be collected.", + "th": "ตรวจวัดความเร็วและประสิทธิภาพของเครือข่ายของคุณ ด้วยการทดสอบ [NDT](https://ooni.io/nettest/ndt/)\n\nตรวจวัดประสิทธิภาพในการสตรีมวิดีโอ ด้วยการทดสอบ [DASH](https://ooni.io/nettest/dash/)\n\nการทดสอบเหล่านี้กินจำนวนการใช้ข้อมูล ขึ้นกับความเร็วเครือข่ายของคุณ\n\nผลทดสอบของคุณจะถูกเผยแพร่บน [OONI Explorer](https://explorer.ooni.org/) และ [OONI API](https://api.ooni.io/)\n\nคำปฏิเสธความรับผิด: การทดสอบเหล่านี้พึ่งพาเซิร์ฟเวอร์ของบุคคลที่สาม ดังนั้นเราจึงไม่สามารถประกันได้ว่าที่อยู่ไอพีของคุณจะไม่ถูกจัดเก็บ", + "tr": "[NDT](https://ooni.org/nettest/ndt/) sınaması ile ağınızın hızını ve başarımını ölçebilirsiniz.\n\n[DASH](https://ooni.org/nettest/dash/) sınaması ile görüntü akış başarımını ölçebilirsiniz.\n\nBu sınamalar sırasında ağınızın hızına göre belirlenen miktarda çeşitli veriler aktarılır.\n\nSonuçlarınız [OONI Explorer](https://explorer.ooni.org/world/) ve [OONI API](https://api.ooni.io/) üzerinde yayınlanır.\n\nBildirim: Bu sınamalar üçüncü tarafların sunucuları üzerinden yapılır. Bu nedenle IP adresinizin kaydedilmeyeceğini garanti edemeyiz.", + "zh_CN": "使用 [NDT](https://ooni.org/nettest/ndt/) 测试测量你的网络速度和性能。\n\n使用 [DASH](https://ooni.org/nettest/dash/) 测试测量视频流性能。\n\n这些测试消耗的数据取决于你的网络速度。\n\n您的结果将被发布在 [OONI Explorer](https://explorer.ooni.org/world/)和[OONI API](https://api.ooni.io/)。\n\n免责声明:这些测试依赖于第三方服务器。因此,我们不能保证你的 IP 地址不会被收集。", + "zh_TW": "利用 [NDT](https://ooni.org/nettest/ndt/) 測試來衡量網路速度和效能。\n\n用 [DASH](https://ooni.org/nettest/dash/) 測試來了解影片串流的表現。\n\n這些測試會因所在網路速度而消耗數據\n\n測試結果會發佈在 [OONI Explorer](https://explorer.ooni.org/world/) 和 [OONI API](https://api.ooni.io/).\n\n免責聲明: 這些測試是透過第三方伺服器,故我們無法保證你的 IP 地址不被他人收集。", + "my": "[NDT] (https://ooni.org/nettest/ndt/) စမ်းသပ်မှုကို သုံး၍ သင်၏ကွန်ရက် အမြန်နှုန်းနှင့် စွမ်းဆောင်ရည်ကို တိုင်းတာပါ။\n\n[DASH] (https://ooni.org/nettest/dash/) စမ်းသပ်မှုကို သုံး၍ ဗီဒီယိုထုတ်လွှင့်ခြင်း စွမ်းဆောင်ရည်ကို တိုင်းတာပါ။\n\nဤစစ်ဆေးမှုများသည် သင့်ကွန်ရက် အမြန်နှုန်းပေါ်မူတည်၍ ဒေတာကို အသုံးပြုကြသည်။\n\nသင့် ရလဒ်များအား [OONI Explorer](https://explorer.ooni.org/world/) နှင့် [OONI API](https://api.ooni.io/) တွင် ထုတ်ဝေပါမည်။\n\nငြင်းဆိုချက် - ဤစစ်ဆေးမှုများသည် ပြင်ပ ဆာဗာများပေါ်တွင် အားကိုးပါသည်။ ထို့ကြောင့် သင်၏ IP လိပ်စာကို စုဆောင်းမည်မဟုတ်ကြောင်း ကျွန်ုပ်တို့ အာမ မခံနိုင်ပါ။ ", + "vi": "Đo tốc độ và hiệu suất mạng của bạn bằng cách sử dụng kiểm tra [NDT] (https://ooni.org/nettest/ndt/).\n\nĐo hiệu suất phát trực tuyến video bằng bài kiểm tra [DASH] (https://ooni.org/nettest/dash/).\n\nCác bài kiểm tra này dùng dữ liệu tùy thuộc vào tốc độ mạng của bạn.\n\nKết quả kiểm tra của bạn sẽ được công bố trên [OONI Explorer] (https://explorer.ooni.org/world/) và [OONI API] (https://api.ooni.io/).\n\nTuyên bố giới hạn trách nhiệm: Những kiểm tra này dựa trên máy chủ của bên thứ ba. Do đó, chúng tôi không thể đảm bảo rằng địa chỉ IP của bạn sẽ không bị thu thập.", + "km": "វាស់ល្បឿន និងគុណភាពនៃបណ្ដាញរបស់អ្នកដោយប្រើ [NDT](https://ooni.org/nettest/ndt/) test.\n\nវាស់គុណភាពនៃដំណើរការវីដេអូដោយប្រើ [DASH](https://ooni.org/nettest/dash/) test.\n\nតេស្តទាំងនេះប្រើទិន្នន័យដែលពឹងផ្អែកលើល្បឿននៃបណ្ដាញរបស់អ្នក។\n\nលទ្ធផលរបស់អ្នកនឹងផ្សព្វផ្សាយលើ [OONI Explorer](https://explorer.ooni.org/world/) and [OONI API](https://api.ooni.io/).\n\nបញ្ជាក់៖ តេស្តទាំងនេះពឹងផ្អែកលើម៉ាសុីនមេរបស់ភាគីទីបី។ ពួកយើងមិនអាចធានាបានថាអាសយដ្ឋាន IP របស់អ្នកនឹងមិនត្រូវបានប្រមូលនោះទេ។" + }, + "icon": "OoniPerformance", + "color": "#be4bdb", + "expiration_date": "4000-01-01T00:00:00.000000Z", + "oonirun_link_id": "10473", + "date_created": "2024-11-06T14:58:44.000000Z", + "date_updated": "2024-11-06T14:58:44.000000Z", + "revision": "1", + "is_mine": false, + "is_expired": false + }, + { + "name": "Experimental", + "short_description": "Run new experimental tests", + "description": "Run the following new experimental tests developed by the OONI team:\n{experimental_test_list}\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "author": "norbel@ooni.org", + "nettests": [ + { + "test_name": "stunreachability", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "openvpn", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + }, + { + "test_name": "vanilla_tor", + "inputs": [], + "options": {}, + "backend_options": {}, + "is_background_run_enabled_default": false, + "is_manual_run_enabled_default": false + } + ], + "name_intl": { + "ar": "تجريبي", + "ca": "Experimental", + "de": "experimentell", + "el": "Πειραματικό", + "es": "Experimental", + "fa": "آزمایشی", + "fr": "Expérimental", + "hi": "प्रयोगात्मक", + "id": "Eksperimental", + "is": "Á tilraunastigi", + "it": "Sperimentale", + "nl": "Experimenteel", + "pt_BR": "Experimental", + "ro": "Experimental", + "ru": "Экспериментальный режим ", + "sw": "Majaribio", + "sk": "Experimental", + "sq": "Experimental", + "th": "ขั้นทดลอง", + "tr": "Deneysel", + "zh_CN": "试验性", + "zh_TW": "試驗性", + "my": "စမ်းသပ် လေ့လာနေဆဲ", + "vi": "Thử nghiệm", + "km": "ពិសោធន៍" + }, + "short_description_intl": { + "ar": "إجراء الاختبارات التجريبيّة الجديدة", + "ca": "Run new experimental tests", + "de": "Neue experimentelle Tests durchführen", + "el": "Εκτέλεση νέων πειραματικών δοκιμών", + "es": "Ejecutar nuevas pruebas experimentales", + "fa": "اجرای تست‌های آزمایشی جدید", + "fr": "Effectuer les nouveaux tests expérimentaux", + "hi": "नए प्रयोगात्मक परीक्षण चलाएं", + "id": "Jalankan tes eksperimental baru", + "is": "Keyra nýjar prófanir á tilraunastigi", + "it": "Esegui nuovi test sperimentali", + "nl": "Nieuwe experimentele tests uitvoeren", + "pt_BR": "Executar novos testes experimentais", + "ro": "Run new experimental tests", + "ru": "Запустить новые экспериментальные тесты", + "sw": "Endesha majaribio mapya ya majaribio", + "sk": "Run new experimental tests", + "sq": "Run new experimental tests", + "th": "เริ่มการทดสอบขั้นทดลองตัวใหม่", + "tr": "Yeni deneysel sınamaları çalıştır", + "zh_CN": "运行新的实验性测试", + "zh_TW": "執行新試驗測試", + "my": "စမ်းသပ်မှုအသစ်များကို လုပ်ဆောင်ရန်", + "vi": "Chạy các bài kiểm tra thử nghiệm mới", + "km": "ដំណើរការតេស្តសាកល្បងថ្មីៗ" + }, + "description_intl": { + "ar": "يمكنكم إجراء بعض الاختبارات التجريبيّة الجديدة المطوّرة من قبل فريق OONI: \n{experimental_test_list}\n\nسيتم نشر نتائج اختباراتكم على كل من [مكتشف OONI](https://explorer.ooni.org) و [واجهة تطبيق OONI](https://api.ooni.io/)", + "ca": "Run the following new experimental tests developed by the OONI team:\n{experimental_test_list}\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "de": "Führe die folgenden neuen, vom OONI-Team entwickelten experimentellen Tests durch:\n{experimental_test_list}\n\nDeine Ergebnisse werden im [OONI Explorer] veröffentlicht.(https://explorer.ooni.org/) und [OONI API](https://api.ooni.io/).", + "el": "Εκτέλεσε τις παρακάτω νέες πειραματικές δοκιμές που αναπτύχθηκαν από την ομάδα του OONI:\n{experimental_test_list}\n\nΤα αποτελέσματά σου θα δημοσιευθούν στο [OONI Explorer](https://explorer.ooni.org/) και στο [OONI API](https://api.ooni.io/).", + "es": "Ejecutar las siguientes nuevas pruebas experimentales desarrolladas por el equipo OONI:\n{experimental_test_list}\n\nTus resultados serán publicados en el [Explorador OONI](https://explorer.ooni.org/) y el [API OONI](https://api.ooni.io/).", + "fa": "این تست‌های آزمایشی جدید توسعه یافته توسط تیم OONI را اجرا کنید:\n{experimental_test_list}\n\nنتایج شما بر روی [OONI Explorer](https://explorer.ooni.org/) و [OONI API](https://api.ooni.io/) منتشر خواهند شد.", + "fr": "Effectuer les nouveaux tests expérimentaux suivants conçus par l’équipe d’OONI :\n{experimental_test_list}\n\nVos résultats seront publiés dans l’[Explorateur OONI](https://explorer.ooni.org/) et l’[API d’OONI](https://api.ooni.io/) (site en anglais).", + "hi": "OONI टीम द्वारा विकसित निम्नलिखित नए प्रयोगात्मक परीक्षण चलाएँ:\n{experimental_test_list}\n\nआपके परिणाम [OONI Explorer](https://explorer.ooni.org/) और [OONI API](https://api.ooni.io/) पर प्रकाशित किए जाएंगे। ", + "id": "Jalankan tes eksperimental baru berikut yang dikembangkan oleh tim OONI:\n{experimental_test_list}\n\nHasil Anda akan dipublikasikan di [OONI Explorer](https://explorer.ooni.org/) dan [OONI API](https://api.ooni.io/).", + "is": "Keyrðu eftirfarandi tilraunaprófanir sem þróaðar hafa verið af OONI-teyminu:\n{experimental_test_list}\n\nNiðurstöðurnar þínar verða birtar í [OONI Explorer](https://explorer.ooni.org/) og [OONI API](https://api.ooni.io/).", + "it": "Esegui i seguenti nuovi test sperimentali sviluppati dal team di OONI:\n{experimental_test_list}\n\nI risultati saranno pubblicati su [OONI Explorer](https://explorer.ooni.org/) e [OONI API](https://api.ooni.io/).", + "nl": "Voer de volgende nieuwe experimentele tests uit die zijn ontwikkeld door het OONI-team:\n{experimental_test_list}\n\nUw resultaten worden gepubliceerd op [OONI Explorer](https://explorer.ooni.org/) en [OONI API](https://api.ooni.io/).", + "pt_BR": "Execute os seguintes novos testes experimentais desenvolvidos pela equipe OONI:\n{experimental_test_list}\n\nSeus resultados serão publicados em [OONI Explorer](https://explorer.ooni.org/) e [OONI API](https://api.ooni.io/).", + "ro": "Run the following new experimental tests developed by the OONI team:\n{experimental_test_list}\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "ru": "Попробуйте запустить новые экспериментальные тесты созданные командой OONI:\n{experimental_test_list}\n\nРезультаты будут опубликованы в [OONI Explorer](https://explorer.ooni.org/) и [OONI API](https://api.ooni.io/).", + "sw": "Tumia majaribio mapya ya majaribio yaliyotengenezwa na timu ya OONI:\n{orodha ya majaribio_ya majaribio}\n\nMatokeo yako yatachapishwa kwenye [OONI Explorer](https://explorer.ooni.org/) na [OONI API](https://api.ooni.io/).", + "sk": "Run the following new experimental tests developed by the OONI team:\n{experimental_test_list}\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "sq": "Run the following new experimental tests developed by the OONI team:\n{experimental_test_list}\n\nYour results will be published on [OONI Explorer](https://explorer.ooni.org/) and [OONI API](https://api.ooni.io/).", + "th": "ดำเนินการทดสอบชุดใหม่ ซึ่งยังอยู่ในขั้นทดลองโดยทีมงาน OONI ดังนี้:\n{experimental_test_list}\n\nผลทดสอบของคุณจะถูกเผยแพร่บน [OONI Explorer](https://explorer.ooni.org/) และ [OONI API](https://api.ooni.io/)", + "tr": "OONI ekibi tarafından geliştirilmiş yeni deneysel sınamaları çalıştırın:\n{experimental_test_list}\n\nSonuçlarınız [OONI Explorer](https://explorer.ooni.org/) ve [OONI API](https://api.ooni.io/) üzerinde yayınlanır.", + "zh_CN": "运行由 OONI 团队开发的以下新的实验性测试:\n{experimental_test_list}\n\n你的结果将在 [OONI Explorer](https://explorer.ooni.org/)和 [OONI API](https://api.ooni.io/)上公布。", + "zh_TW": "執行下方 OONI 團隊所開發的新實驗測試\n{experimental_test_list}\n\n其結果會發佈於 [OONI Explorer](https://explorer.ooni.org/) 與 [OONI API](https://api.ooni.io/).", + "my": "OONI အဖွဲ့မှ ဖန်တီးထားသော အောက်ပါ စမ်းသပ်မှုအသစ်များကို လုပ်ဆောင်မည်\n{experimental_test_list}\n\nသင့်ရလဒ်များကို [OONI Explorer](https://explorer.ooni.org/) နှင့် [OONI API](https://api.ooni.io/) တွင် ထုတ်ဝေပါမည်။", + "vi": "Chạy các bài kiểm tra thử nghiệm mới sau đây do nhóm OONI phát triển:\n{experimental_test_list}\n\nKết quả kiểm tra của bạn sẽ được công bố trên [OONI Explorer] (https://explorer.ooni.org/) và [OONI API] (https://api.ooni.io/).", + "km": "ដំណើរការតេស្តសាកល្បងថ្មីៗដែលបង្កើតដោយក្រុមការងារ OONI៖\n{experimental_test_list}\n\nលទ្ធផលរបស់អ្នកនឹងផ្សព្វផ្សាយលើ [OONI Explorer](https://explorer.ooni.org/) និង [OONI API](https://api.ooni.io/)។" + }, + "icon": "OoniExperimental", + "color": "#495057", + "expiration_date": "4000-01-01T00:00:00.000000Z", + "oonirun_link_id": "10474", + "date_created": "2024-11-06T14:58:44.000000Z", + "date_updated": "2024-11-06T14:58:44.000000Z", + "revision": "1", + "is_mine": false, + "is_expired": false + } +] From ac4a5ac44e88e689ccfb33df1c1990e0a60e871d Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Mon, 18 Nov 2024 15:18:03 +0100 Subject: [PATCH 2/9] chore: update dependencies --- .../ooni/probe/data/models/InstalledTestDescriptorModel.kt | 6 +++--- .../src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt index f6532c03..8ff87e75 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt @@ -61,7 +61,7 @@ data class InstalledTestDescriptorModel( val isDefaultTestDescriptor get() = id.value in 10470..10474 // TODO(aanorbel): switch to OONI reserved namespace val key get() = if (isDefaultTestDescriptor) { - when(id.value) { + when (id.value) { 10470L -> "websites" 10471L -> "instant_messaging" 10472L -> "circumvention" @@ -100,7 +100,7 @@ fun InstalledTestDescriptorModel.toDescriptor(updateStatus: UpdateStatus = Updat icon = icon?.let(InstalledDescriptorIcons::getIconFromValue), color = color?.hexToColor(), animation = icon?.let { determineAnimation(it) } ?: animation?.let(Animation::fromFileName), - dataUsage = { if (isDefaultTestDescriptor) stringResource(getDataUsage()) else null }, + dataUsage = { if (isDefaultTestDescriptor) stringResource(getDataUsage()) else null }, expirationDate = expirationDate, netTests = netTests.orEmpty(), source = Descriptor.Source.Installed(this), @@ -108,7 +108,7 @@ fun InstalledTestDescriptorModel.toDescriptor(updateStatus: UpdateStatus = Updat ) fun InstalledTestDescriptorModel.getDataUsage(): StringResource { - return when(this.key) { + return when (this.key) { "websites" -> Res.string.websites_datausage "instant_messaging" -> Res.string.small_datausage "circumvention" -> Res.string.small_datausage diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt index 1867688d..f617cec9 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt @@ -53,7 +53,6 @@ import org.ooni.probe.domain.FinishInProgressData import org.ooni.probe.domain.GetAutoRunSettings import org.ooni.probe.domain.GetAutoRunSpecification import org.ooni.probe.domain.GetBootstrapTestDescriptors -import org.ooni.probe.domain.GetDefaultTestDescriptors import org.ooni.probe.domain.GetEnginePreferences import org.ooni.probe.domain.GetFirstRun import org.ooni.probe.domain.GetProxySettings @@ -244,7 +243,6 @@ class Dependencies( private val getBootstrapTestDescriptors by lazy { GetBootstrapTestDescriptors(readAssetFile, json, backgroundContext) } - private val getDefaultTestDescriptors by lazy { GetDefaultTestDescriptors() } private val getProxySettings by lazy { GetProxySettings(preferenceRepository) } private val getEnginePreferences by lazy { GetEnginePreferences( @@ -288,7 +286,7 @@ class Dependencies( @VisibleForTesting val getTestDescriptors by lazy { GetTestDescriptors( - getDefaultTestDescriptors = getDefaultTestDescriptors::invoke, + getDefaultTestDescriptors = { emptyList() }, listInstalledTestDescriptors = testDescriptorRepository::list, descriptorUpdates = getDescriptorUpdate::observeAvailableUpdatesState, ) From 70aa880616b7c988bfd0aa98aec9954d6425a526 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Mon, 25 Nov 2024 12:38:39 +0100 Subject: [PATCH 3/9] chore: update settings path --- .../kotlin/org/ooni/probe/config}/OrganizationSettings.kt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename composeApp/src/{commonMain/kotlin/org/ooni/probe/domain => dwMain/kotlin/org/ooni/probe/config}/OrganizationSettings.kt (100%) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/OrganizationSettings.kt b/composeApp/src/dwMain/kotlin/org/ooni/probe/config/OrganizationSettings.kt similarity index 100% rename from composeApp/src/commonMain/kotlin/org/ooni/probe/domain/OrganizationSettings.kt rename to composeApp/src/dwMain/kotlin/org/ooni/probe/config/OrganizationSettings.kt From e79880a07741853affec95454e5770e85c8cf59e Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Wed, 27 Nov 2024 19:18:09 +0100 Subject: [PATCH 4/9] update settings prefix for ooni tests --- .../kotlin/org/ooni/probe/data/models/Descriptor.kt | 6 ++++++ .../ooni/probe/data/repositories/PreferenceRepository.kt | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt index f0385ee1..9f9dea61 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt @@ -46,6 +46,12 @@ data class Descriptor( .sumOf { it.test.runtime(it.inputs).inWholeSeconds } .seconds + val settingsPrefix: String? + get() = when (isDefaultDescriptor()) { + true -> null + else -> (source as Source.Installed).value.id.value.toString() + } + fun isDefaultDescriptor(): Boolean { return when (source) { is Source.Default -> true diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt index f0b9594a..f3399b98 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt @@ -181,8 +181,7 @@ class PreferenceRepository( isAutoRun: Boolean, ) = getPreferenceKey( name = netTest.test.name, - prefix = (descriptor.source as? Descriptor.Source.Installed) - ?.value?.id?.value?.toString(), + prefix = descriptor.settingsPrefix, autoRun = isAutoRun, ) From 8c0c5d852e24addc6238f5db936e748356b53a88 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Tue, 3 Dec 2024 19:09:52 +0100 Subject: [PATCH 5/9] update based on review --- .../org/ooni/probe/data/models/Descriptor.kt | 30 +--- .../models/InstalledTestDescriptorModel.kt | 2 +- .../probe/data/models/RunSpecification.kt | 19 +-- .../data/repositories/PreferenceRepository.kt | 3 +- .../kotlin/org/ooni/probe/di/Dependencies.kt | 1 - .../probe/domain/GetAutoRunSpecification.kt | 2 +- .../org/ooni/probe/domain/GetResults.kt | 2 +- .../ooni/probe/domain/GetTestDescriptors.kt | 34 +---- .../probe/domain/GetTestDescriptorsBySpec.kt | 12 +- .../org/ooni/probe/domain/RunDescriptors.kt | 2 +- .../org/ooni/probe/domain/RunNetTest.kt | 3 +- .../choosewebsites/ChooseWebsitesViewModel.kt | 1 - .../probe/ui/dashboard/DashboardViewModel.kt | 2 +- .../probe/ui/descriptor/DescriptorScreen.kt | 20 +-- .../ui/descriptor/DescriptorViewModel.kt | 9 +- .../ooni/probe/ui/result/ResultViewModel.kt | 2 +- .../org/ooni/probe/ui/run/RunViewModel.kt | 9 +- .../probe/domain/GetDefaultTestDescriptors.kt | 134 ------------------ 18 files changed, 31 insertions(+), 256 deletions(-) delete mode 100644 composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt index 9f9dea61..f96e97e5 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt @@ -20,24 +20,15 @@ data class Descriptor( val expirationDate: LocalDateTime?, val netTests: List, val longRunningTests: List = emptyList(), - val source: Source, + val source: InstalledTestDescriptorModel, val updateStatus: UpdateStatus, ) { - sealed interface Source { - data class Default(val value: DefaultTestDescriptor) : Source - - data class Installed(val value: InstalledTestDescriptorModel) : Source - } - val isExpired get() = expirationDate != null && expirationDate < LocalDateTime.now() val updatable get() = updateStatus is UpdateStatus.UpdateRejected val key: String - get() = when (source) { - is Source.Default -> name - is Source.Installed -> source.value.key - } + get() = source.key val allTests get() = netTests + longRunningTests @@ -46,23 +37,14 @@ data class Descriptor( .sumOf { it.test.runtime(it.inputs).inWholeSeconds } .seconds - val settingsPrefix: String? - get() = when (isDefaultDescriptor()) { - true -> null - else -> (source as Source.Installed).value.id.value.toString() - } + val settingsPrefix: String + get() = source.id.value.toString() fun isDefaultDescriptor(): Boolean { - return when (source) { - is Source.Default -> true - is Source.Installed -> source.value.isDefaultTestDescriptor - } + return source.isDefaultTestDescriptor } fun isInstalledNonDefaultDescriptor(): Boolean { - return when (source) { - is Source.Installed -> !source.value.isDefaultTestDescriptor - else -> false - } + return !source.isDefaultTestDescriptor } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt index 50053c9f..36b1d722 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt @@ -103,7 +103,7 @@ fun InstalledTestDescriptorModel.toDescriptor(updateStatus: UpdateStatus = Updat dataUsage = { if (isDefaultTestDescriptor) stringResource(getDataUsage()) else null }, expirationDate = expirationDate, netTests = netTests.orEmpty(), - source = Descriptor.Source.Installed(this), + source = this, updateStatus = updateStatus, ) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt index 3c2ffd18..68d586e9 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt @@ -17,24 +17,11 @@ sealed interface RunSpecification { @Serializable data class Test( - val source: Source, + val source: InstalledTestDescriptorModel.Id? = null, val netTests: List, ) { - @Serializable - sealed interface Source { - @Serializable - data class Default(val name: String) : Source - - @Serializable - data class Installed(val id: InstalledTestDescriptorModel.Id) : Source - - companion object { - fun fromDescriptor(descriptor: Descriptor) = - when (descriptor.source) { - is Descriptor.Source.Default -> Default(descriptor.name) - is Descriptor.Source.Installed -> Installed(descriptor.source.value.id) - } - } + companion object { + fun fromDescriptor(descriptor: Descriptor) =descriptor.source.id } } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt index f3399b98..32105b27 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt @@ -133,8 +133,7 @@ class PreferenceRepository( ): Flow { val key = getPreferenceKey( name = descriptor.name, - prefix = (descriptor.source as? Descriptor.Source.Installed) - ?.value?.id?.value?.toString(), + prefix = descriptor.source.id.value.toString(), autoRun = isAutoRun, ) return dataStore.data.map { diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt index b247ae7b..bb40df9c 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt @@ -286,7 +286,6 @@ class Dependencies( @VisibleForTesting val getTestDescriptors by lazy { GetTestDescriptors( - getDefaultTestDescriptors = { emptyList() }, listInstalledTestDescriptors = testDescriptorRepository::list, descriptorUpdates = getDescriptorUpdate::observeAvailableUpdatesState, ) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt index 47455162..4fd92041 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt @@ -17,7 +17,7 @@ class GetAutoRunSpecification( return RunSpecification.Full( tests = descriptors.map { descriptor -> RunSpecification.Test( - source = RunSpecification.Test.Source.fromDescriptor(descriptor), + source = RunSpecification.Test.fromDescriptor(descriptor), netTests = descriptor.netTests, ) }, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt index 0a3a283d..e7478872 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt @@ -34,7 +34,7 @@ fun List.forResult(result: ResultModel): Descriptor? = result.testDescriptorId ?.let { descriptorId -> firstOrNull { - it.source is Descriptor.Source.Installed && it.source.value.id == descriptorId + it.source.id == descriptorId } } ?: firstOrNull { it.name == result.testGroupName } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt index b98616c5..7b44e505 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt @@ -3,20 +3,15 @@ package org.ooni.probe.domain import androidx.compose.runtime.Composable import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine -import kotlinx.coroutines.flow.flowOf -import kotlinx.coroutines.flow.map import ooniprobe.composeapp.generated.resources.Res import ooniprobe.composeapp.generated.resources.Settings_TestOptions_LongRunningTest import org.jetbrains.compose.resources.stringResource -import org.ooni.probe.data.models.DefaultTestDescriptor import org.ooni.probe.data.models.Descriptor import org.ooni.probe.data.models.DescriptorUpdatesStatus import org.ooni.probe.data.models.InstalledTestDescriptorModel -import org.ooni.probe.data.models.UpdateStatus import org.ooni.probe.data.models.toDescriptor class GetTestDescriptors( - private val getDefaultTestDescriptors: () -> List, private val listInstalledTestDescriptors: () -> Flow>, private val descriptorUpdates: () -> Flow, ) { @@ -24,39 +19,14 @@ class GetTestDescriptors( return combine( listInstalledTestDescriptors(), descriptorUpdates(), - flowOf(getDefaultTestDescriptors()), - ) { installedDescriptors, descriptorUpdates, defaultDescriptors -> + ) { installedDescriptors, descriptorUpdates -> val updatedDescriptors = installedDescriptors.map { item -> item.toDescriptor(updateStatus = descriptorUpdates.getStatusOf(item.id)) } - return@combine defaultDescriptors - .map { it.toDescriptor() } + updatedDescriptors + return@combine updatedDescriptors } } - private fun DefaultTestDescriptor.toDescriptor() = - Descriptor( - name = label, - title = { stringResource(title) }, - shortDescription = { stringResource(shortDescription) }, - description = { - if (label == "experimental") { - stringResource(description, experimentalLinks()) - } else { - stringResource(description) - } - }, - icon = icon, - color = color, - animation = animation, - dataUsage = { stringResource(dataUsage) }, - expirationDate = null, - netTests = netTests, - longRunningTests = longRunningTests, - source = Descriptor.Source.Default(this), - updateStatus = UpdateStatus.NotApplicable, - ) - @Composable private fun experimentalLinks() = """ diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt index 89017c85..706331d2 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt @@ -32,16 +32,6 @@ class GetTestDescriptorsBySpec( // Is this descriptor contained in the RunSpecification's list of tests private fun RunSpecification.Full.forDescriptor(descriptor: Descriptor) = tests.firstOrNull { specTest -> - when (descriptor.source) { - is Descriptor.Source.Default -> { - specTest.source is RunSpecification.Test.Source.Default && - specTest.source.name == descriptor.name - } - - is Descriptor.Source.Installed -> { - specTest.source is RunSpecification.Test.Source.Installed && - specTest.source.id == descriptor.source.value.id - } - } + specTest.source == descriptor.source.id } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt index 58447056..3fb352f1 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt @@ -129,7 +129,7 @@ class RunDescriptors( ) { val result = ResultModel( testGroupName = descriptor.name, - testDescriptorId = (descriptor.source as? Descriptor.Source.Installed)?.value?.id, + testDescriptorId = descriptor.source.id, taskOrigin = taskOrigin, ) val resultId = storeResult(result) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt index 562b9594..aa648dc3 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt @@ -60,8 +60,7 @@ class RunNetTest( testTotal = spec.testTotal, ) } - val installedDescriptorId = - (spec.descriptor.source as? Descriptor.Source.Installed)?.value?.id + val installedDescriptorId = spec.descriptor.source.id startTest( spec.netTest, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt index 349f2ab1..9ad206a6 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt @@ -104,7 +104,6 @@ class ChooseWebsitesViewModel( RunSpecification.Full( tests = listOf( RunSpecification.Test( - source = RunSpecification.Test.Source.Default("websites"), netTests = listOf( NetTest( test = TestType.WebConnectivity, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt index d179642f..06b40fc4 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt @@ -114,7 +114,7 @@ class DashboardViewModel( .filterIsInstance() .onEach { state.value.descriptors[DescriptorType.Installed] - ?.map { (it.source as Descriptor.Source.Installed).value } + ?.map { it.source } ?.let { descriptors -> fetchDescriptorUpdate(descriptors) } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt index 4308c19e..be25abdc 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt @@ -76,7 +76,7 @@ fun DescriptorScreen( isRefreshing = state.isRefreshing, onRefresh = { onEvent(DescriptorViewModel.Event.FetchUpdatedDescriptor) }, state = pullRefreshState, - enabled = state.descriptor?.source is Descriptor.Source.Installed, + enabled = true, ) .background(MaterialTheme.colorScheme.background), ) { @@ -127,11 +127,7 @@ fun DescriptorScreen( modifier = Modifier.padding(horizontal = 16.dp, vertical = 16.dp), ) - if (descriptor.isInstalledNonDefaultDescriptor()) { - (descriptor.source as Descriptor.Source.Installed?)?.let { - ConfigureUpdates(onEvent, it.value.autoUpdate) - } - } + ConfigureUpdates(onEvent, descriptor.source.autoUpdate) Text( stringResource(Res.string.AddDescriptor_Settings), style = MaterialTheme.typography.titleMedium, @@ -164,13 +160,11 @@ fun DescriptorScreen( TestDisplayMode.WebsitesOnly -> WebsiteItems(state.tests) } - if (descriptor.source is Descriptor.Source.Installed) { - InstalledDescriptorActionsView( - descriptor = descriptor.source.value, - onEvent = onEvent, - modifier = Modifier.padding(horizontal = 16.dp), - ) - } + InstalledDescriptorActionsView( + descriptor = descriptor.source, + onEvent = onEvent, + modifier = Modifier.padding(horizontal = 16.dp), + ) } } if (state.isRefreshing) { diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt index 449f9a25..5acd4a2b 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt @@ -166,8 +166,7 @@ class DescriptorViewModel( events.filterIsInstance() .onEach { val descriptor = state.value.descriptor ?: return@onEach - if (descriptor.source !is Descriptor.Source.Installed) return@onEach - setAutoUpdate(descriptor.source.value.id, it.value) + setAutoUpdate(descriptor.source.id, it.value) } .launchIn(viewModelScope) @@ -176,23 +175,21 @@ class DescriptorViewModel( if (state.value.isRefreshing) return@onEach val descriptor = state.value.descriptor ?: return@onEach - if (descriptor.source !is Descriptor.Source.Installed) return@onEach _state.update { it.copy(refreshType = UpdateStatusType.UpdateLink, updatedDescriptor = null) } - fetchDescriptorUpdate(listOf(descriptor.source.value)) + fetchDescriptorUpdate(listOf(descriptor.source)) } .launchIn(viewModelScope) events.filterIsInstance() .onEach { val descriptor = state.value.updatedDescriptor ?: return@onEach - if (descriptor.source !is Descriptor.Source.Installed) return@onEach _state.update { it.copy(refreshType = UpdateStatusType.None, updatedDescriptor = null) } - reviewUpdates(listOf(descriptor.source.value)) + reviewUpdates(listOf(descriptor.source)) goToReviewDescriptorUpdates() } .launchIn(viewModelScope) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt index d481da49..8951dd24 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt @@ -106,7 +106,7 @@ class ResultViewModel( return RunSpecification.Full( tests = listOf( RunSpecification.Test( - source = RunSpecification.Test.Source.fromDescriptor(item.descriptor), + source = RunSpecification.Test.fromDescriptor(item.descriptor), netTests = listOf( NetTest( test = TestType.WebConnectivity, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt index 16a4af3e..783d6897 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt @@ -228,14 +228,7 @@ class RunViewModel( tests = selectedTests.map { (descriptor, tests) -> RunSpecification.Test( - source = - when (descriptor.source) { - is Descriptor.Source.Default -> - RunSpecification.Test.Source.Default(descriptor.name) - - is Descriptor.Source.Installed -> - RunSpecification.Test.Source.Installed(descriptor.source.value.id) - }, + source = descriptor.source.id, netTests = tests, ) }, diff --git a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt b/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt deleted file mode 100644 index 5ea68194..00000000 --- a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt +++ /dev/null @@ -1,134 +0,0 @@ -package org.ooni.probe.domain - -import androidx.compose.ui.graphics.Color -import ooniprobe.composeapp.generated.resources.Dashboard_Circumvention_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Circumvention_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_Experimental_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Experimental_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_InstantMessaging_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_InstantMessaging_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_Performance_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Performance_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_Websites_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Websites_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Res -import ooniprobe.composeapp.generated.resources.TestResults_NotAvailable -import ooniprobe.composeapp.generated.resources.Test_Circumvention_Fullname -import ooniprobe.composeapp.generated.resources.Test_Experimental_Fullname -import ooniprobe.composeapp.generated.resources.Test_InstantMessaging_Fullname -import ooniprobe.composeapp.generated.resources.Test_Performance_Fullname -import ooniprobe.composeapp.generated.resources.Test_Websites_Fullname -import ooniprobe.composeapp.generated.resources.performance_datausage -import ooniprobe.composeapp.generated.resources.small_datausage -import ooniprobe.composeapp.generated.resources.test_circumvention -import ooniprobe.composeapp.generated.resources.test_experimental -import ooniprobe.composeapp.generated.resources.test_instant_messaging -import ooniprobe.composeapp.generated.resources.test_performance -import ooniprobe.composeapp.generated.resources.test_websites -import ooniprobe.composeapp.generated.resources.websites_datausage -import org.ooni.engine.models.TestType -import org.ooni.probe.data.models.Animation -import org.ooni.probe.data.models.DefaultTestDescriptor -import org.ooni.probe.data.models.NetTest - -class GetDefaultTestDescriptors { - operator fun invoke(): List = emptyList() - /*listOf( - WEBSITES, - INSTANT_MESSAGING, - CIRCUMVENTION, - PERFORMANCE, - EXPERIMENTAL, - )*/ - - companion object { - private val WEBSITES = - DefaultTestDescriptor( - label = "websites", - title = Res.string.Test_Websites_Fullname, - shortDescription = Res.string.Dashboard_Websites_Card_Description, - description = Res.string.Dashboard_Websites_Overview_Paragraph, - icon = Res.drawable.test_websites, - color = Color(0xFF4c6ef5), - animation = Animation.Websites, - dataUsage = Res.string.websites_datausage, - netTests = listOf( - NetTest(TestType.WebConnectivity), - ), - ) - - private val INSTANT_MESSAGING = - DefaultTestDescriptor( - label = "instant_messaging", - title = Res.string.Test_InstantMessaging_Fullname, - shortDescription = Res.string.Dashboard_InstantMessaging_Card_Description, - description = Res.string.Dashboard_InstantMessaging_Overview_Paragraph, - icon = Res.drawable.test_instant_messaging, - color = Color(0xFF15aabf), - animation = Animation.InstantMessaging, - dataUsage = Res.string.small_datausage, - netTests = listOf( - NetTest(TestType.Whatsapp), - NetTest(TestType.Telegram), - NetTest(TestType.FacebookMessenger), - NetTest(TestType.Signal), - ), - ) - - private val CIRCUMVENTION = - DefaultTestDescriptor( - label = "circumvention", - title = Res.string.Test_Circumvention_Fullname, - shortDescription = Res.string.Dashboard_Circumvention_Card_Description, - description = Res.string.Dashboard_Circumvention_Overview_Paragraph, - icon = Res.drawable.test_circumvention, - color = Color(0xFFe64980), - animation = Animation.Circumvention, - dataUsage = Res.string.small_datausage, - netTests = listOf( - NetTest(TestType.Psiphon), - NetTest(TestType.Tor), - ), - ) - - private val PERFORMANCE = - DefaultTestDescriptor( - label = "performance", - title = Res.string.Test_Performance_Fullname, - shortDescription = Res.string.Dashboard_Performance_Card_Description, - description = Res.string.Dashboard_Performance_Overview_Paragraph, - icon = Res.drawable.test_performance, - color = Color(0xFFbe4bdb), - animation = Animation.Performance, - dataUsage = Res.string.performance_datausage, - netTests = listOf( - NetTest(TestType.Ndt), - NetTest(TestType.Dash), - NetTest(TestType.HttpHeaderFieldManipulation), - NetTest(TestType.HttpInvalidRequestLine), - ), - ) - - private val EXPERIMENTAL = - DefaultTestDescriptor( - label = "experimental", - title = Res.string.Test_Experimental_Fullname, - shortDescription = Res.string.Dashboard_Experimental_Card_Description, - description = Res.string.Dashboard_Experimental_Overview_Paragraph, - icon = Res.drawable.test_experimental, - color = Color(0xFF495057), - animation = Animation.Experimental, - dataUsage = Res.string.TestResults_NotAvailable, - netTests = listOf( - NetTest(TestType.Experimental("stunreachability")), - NetTest(TestType.Experimental("openvpn")), - // NetTest(TestType.Experimental("riseupvpn")), - // NetTest(TestType.Experimental("echcheck")), - ), - longRunningTests = listOf( - // NetTest(TestType.Experimental("torsf")), - NetTest(TestType.Experimental("vanilla_tor")), - ), - ) - } -} From f792ba0f549199a65468bfea01c977b0f20b03b4 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Wed, 4 Dec 2024 07:45:19 +0100 Subject: [PATCH 6/9] update based on review --- .../kotlin/org/ooni/testing/factories/DescriptorFactory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composeApp/src/commonTest/kotlin/org/ooni/testing/factories/DescriptorFactory.kt b/composeApp/src/commonTest/kotlin/org/ooni/testing/factories/DescriptorFactory.kt index 1887b18c..370d47ce 100644 --- a/composeApp/src/commonTest/kotlin/org/ooni/testing/factories/DescriptorFactory.kt +++ b/composeApp/src/commonTest/kotlin/org/ooni/testing/factories/DescriptorFactory.kt @@ -41,7 +41,7 @@ object DescriptorFactory { expirationDate = expirationDate, netTests = netTests, longRunningTests = longRunningTests, - source = Descriptor.Source.Installed(installedTestDescriptorModel), + source = installedTestDescriptorModel, updateStatus = UpdateStatus.UpToDate, ) From 0ea31fd6d39253009d13f1792376aea3573a6946 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Wed, 4 Dec 2024 13:06:19 +0100 Subject: [PATCH 7/9] update based on review --- .../models/InstalledTestDescriptorModel.kt | 38 ++++++++++--------- .../probe/data/models/RunSpecification.kt | 8 +--- .../probe/domain/GetAutoRunSpecification.kt | 2 +- .../probe/domain/GetTestDescriptorsBySpec.kt | 2 +- .../choosewebsites/ChooseWebsitesViewModel.kt | 3 ++ .../probe/ui/dashboard/DashboardViewModel.kt | 5 +-- .../ooni/probe/ui/result/ResultViewModel.kt | 2 +- .../org/ooni/probe/ui/run/RunViewModel.kt | 2 +- 8 files changed, 32 insertions(+), 30 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt index 98796a41..19071585 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt @@ -30,6 +30,21 @@ import org.ooni.probe.shared.now import org.ooni.probe.shared.stringMonthArrayResource import org.ooni.probe.shared.toEpoch +enum class OoniTest(val id: Long, val key: String) { + WEBSITES(10470L, "websites"), + INSTANT_MESSAGING(10471L, "instant_messaging"), + CIRCUMVENTION(10472L, "circumvention"), + PERFORMANCE(10473L, "performance"), + EXPERIMENTAL(10474L, "experimental"), + ; + + companion object { + private val map = entries.associateBy(OoniTest::id) + + fun fromId(id: Long) = map[id] + } +} + @Serializable data class InstalledTestDescriptorModel( val id: Id, @@ -59,18 +74,7 @@ data class InstalledTestDescriptorModel( val isDefaultTestDescriptor get() = id.value in 10470..10474 // TODO(aanorbel): switch to OONI reserved namespace - val key get() = if (isDefaultTestDescriptor) { - when (id.value) { - 10470L -> "websites" - 10471L -> "instant_messaging" - 10472L -> "circumvention" - 10473L -> "performance" - 10474L -> "experimental" - else -> id.value.toString() - } - } else { - id.value.toString() - } + val key get() = OoniTest.fromId(id.value) ?: id.value.toString() fun shouldUpdate(other: InstalledTestDescriptorModel): Boolean { return dateUpdated != null && other.dateUpdated != null && other.dateUpdated > dateUpdated @@ -108,11 +112,11 @@ fun InstalledTestDescriptorModel.toDescriptor(updateStatus: UpdateStatus = Updat fun InstalledTestDescriptorModel.getDataUsage(): StringResource { return when (this.key) { - "websites" -> Res.string.websites_datausage - "instant_messaging" -> Res.string.small_datausage - "circumvention" -> Res.string.small_datausage - "performance" -> Res.string.performance_datausage - "experimental" -> Res.string.TestResults_NotAvailable + OoniTest.WEBSITES.key -> Res.string.websites_datausage + OoniTest.INSTANT_MESSAGING.key -> Res.string.small_datausage + OoniTest.CIRCUMVENTION.key -> Res.string.small_datausage + OoniTest.PERFORMANCE.key -> Res.string.performance_datausage + OoniTest.EXPERIMENTAL.key -> Res.string.TestResults_NotAvailable else -> Res.string.TestResults_NotAvailable } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt index edc64127..71f37157 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt @@ -17,11 +17,7 @@ sealed interface RunSpecification { @Serializable data class Test( - val source: InstalledTestDescriptorModel.Id? = null, + val sourceId: InstalledTestDescriptorModel.Id, val netTests: List, - ) { - companion object { - fun fromDescriptor(descriptor: Descriptor) = descriptor.source.id - } - } + ) } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt index 4fd92041..65547792 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt @@ -17,7 +17,7 @@ class GetAutoRunSpecification( return RunSpecification.Full( tests = descriptors.map { descriptor -> RunSpecification.Test( - source = RunSpecification.Test.fromDescriptor(descriptor), + sourceId = descriptor.source.id, netTests = descriptor.netTests, ) }, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt index 706331d2..dc47afb9 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt @@ -32,6 +32,6 @@ class GetTestDescriptorsBySpec( // Is this descriptor contained in the RunSpecification's list of tests private fun RunSpecification.Full.forDescriptor(descriptor: Descriptor) = tests.firstOrNull { specTest -> - specTest.source == descriptor.source.id + specTest.sourceId == descriptor.source.id } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt index 9ad206a6..3a313444 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt @@ -11,7 +11,9 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.update import org.ooni.engine.models.TaskOrigin import org.ooni.engine.models.TestType +import org.ooni.probe.data.models.InstalledTestDescriptorModel import org.ooni.probe.data.models.NetTest +import org.ooni.probe.data.models.OoniTest import org.ooni.probe.data.models.RunSpecification import org.ooni.probe.ui.shared.isValidUrl @@ -104,6 +106,7 @@ class ChooseWebsitesViewModel( RunSpecification.Full( tests = listOf( RunSpecification.Test( + sourceId = InstalledTestDescriptorModel.Id(OoniTest.WEBSITES.id), netTests = listOf( NetTest( test = TestType.WebConnectivity, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt index 06b40fc4..a0a92356 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt @@ -113,9 +113,8 @@ class DashboardViewModel( events .filterIsInstance() .onEach { - state.value.descriptors[DescriptorType.Installed] - ?.map { it.source } - ?.let { descriptors -> + state.value.descriptors.flatMap { it.value } + .map { it.source }.let { descriptors -> fetchDescriptorUpdate(descriptors) } }.launchIn(viewModelScope) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt index 8951dd24..fa7c0026 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt @@ -106,7 +106,7 @@ class ResultViewModel( return RunSpecification.Full( tests = listOf( RunSpecification.Test( - source = RunSpecification.Test.fromDescriptor(item.descriptor), + sourceId = item.descriptor.source.id, netTests = listOf( NetTest( test = TestType.WebConnectivity, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt index 3488a858..dc4d2737 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt @@ -228,7 +228,7 @@ class RunViewModel( tests = selectedTests.map { (descriptor, tests) -> RunSpecification.Test( - source = descriptor.source.id, + sourceId = descriptor.source.id, netTests = tests, ) }, From cd43b4e4fe6d0f672a593d76fcafd6dac9f8b635 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Wed, 4 Dec 2024 13:07:59 +0100 Subject: [PATCH 8/9] update based on review --- .../dwMain/kotlin/org/ooni/probe/config/OrganizationSettings.kt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 composeApp/src/dwMain/kotlin/org/ooni/probe/config/OrganizationSettings.kt diff --git a/composeApp/src/dwMain/kotlin/org/ooni/probe/config/OrganizationSettings.kt b/composeApp/src/dwMain/kotlin/org/ooni/probe/config/OrganizationSettings.kt deleted file mode 100644 index e69de29b..00000000 From 1323b3b5f947e52a1183a3641539fe85aa7c4a5f Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Wed, 4 Dec 2024 17:10:06 +0100 Subject: [PATCH 9/9] chore: update check for `isDefaultTestDescriptor` --- .../ooni/probe/data/models/InstalledTestDescriptorModel.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt index de90e4a7..055ed32f 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt @@ -42,6 +42,10 @@ enum class OoniTest(val id: Long, val key: String) { private val map = entries.associateBy(OoniTest::id) fun fromId(id: Long) = map[id] + + fun isValidId(id: Long): Boolean { + return entries.any { it.id == id } + } } } @@ -72,7 +76,7 @@ data class InstalledTestDescriptorModel( val isExpired get() = expirationDate != null && expirationDate < LocalDateTime.now() - val isDefaultTestDescriptor get() = id.value in 10470..10474 // TODO(aanorbel): switch to OONI reserved namespace + val isDefaultTestDescriptor get() = OoniTest.isValidId(id.value) val key get() = OoniTest.fromId(id.value)?.key ?: id.value.toString()