9 Commits

Author SHA1 Message Date
egor-white
003a4c57a3 update changelog 2025-10-18 15:57:54 +03:00
egor-white
432873409c Update update.json 2025-10-18 15:57:20 +03:00
CherretGit
c5b60b1ee9 use card onClick in settings items 2025-10-18 19:41:51 +07:00
CherretGit
2f349e5108 bump app version 2025-10-18 19:29:27 +07:00
CherretGit
e8a8fa69db fix JNI seg fault 2025-10-18 19:21:51 +07:00
CherretGit
c094a072b8 fix app list mode 2025-10-18 18:46:40 +07:00
white
786321d852 edit strings.xml 2025-10-18 12:57:21 +03:00
white
7a17c93622 change selection screen title font size 2025-10-18 12:55:56 +03:00
white
cf38ef7ac2 some strategy selection interface changes 2025-10-18 12:20:30 +03:00
10 changed files with 27 additions and 22 deletions

View File

@@ -16,8 +16,8 @@ android {
applicationId = "com.cherret.zaprett"
minSdk = 29
targetSdk = 35
versionCode = 22
versionName = "2.10"
versionCode = 23
versionName = "2.11"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

View File

@@ -200,7 +200,7 @@ fun StrategySelectionItem(strategy : StrategyCheckResult, prefs : SharedPreferen
elevation = CardDefaults.cardElevation(defaultElevation = 6.dp),
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceContainer),
onClick = {
if (strategy.status == StrategyTestingStatus.Completed) {
if (strategy.status == StrategyTestingStatus.Completed && strategy.domains.isNotEmpty()) {
expanded = !expanded
}
},
@@ -283,6 +283,9 @@ fun StrategySelectionItem(strategy : StrategyCheckResult, prefs : SharedPreferen
.padding(horizontal = 8.dp)
.fillMaxWidth()
) {
Text(
text = stringResource(R.string.selection_available_domains)
)
LazyColumn(modifier = Modifier.heightIn(max = 300.dp)) {
items(strategy.domains) { item ->
Card(

View File

@@ -35,9 +35,9 @@ fun SettingsItem(title: String, checked: Boolean, onToggle: (Boolean) -> Unit, o
ElevatedCard(
modifier = Modifier
.fillMaxWidth()
.height(80.dp)
.clickable { onToggle(!checked) },
.height(80.dp),
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp),
onClick = { onToggle(!checked) },
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
) {
Row(
@@ -63,9 +63,9 @@ fun SettingsActionItem(title: String, onClick: () -> Unit) {
ElevatedCard(
modifier = Modifier
.fillMaxWidth()
.height(80.dp)
.clickable { onClick() },
.height(80.dp),
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp),
onClick = { onClick() },
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
) {
Row(

View File

@@ -82,7 +82,7 @@ fun StrategySelectionScreen(navController: NavController, vpnLauncher: ActivityR
title = {
Text(
text = stringResource(R.string.title_selection),
fontSize = 40.sp,
fontSize = 30.sp,
fontFamily = FontFamily(Font(R.font.unbounded, FontWeight.Normal))
)
},

View File

@@ -725,7 +725,7 @@ fun getAppsListMode(prefs : SharedPreferences) : String {
}
}
else {
return prefs.getString("applist", "")!!
return prefs.getString("app_list", "none")!!
}
return "none"
}
@@ -753,7 +753,7 @@ fun setAppsListMode(prefs: SharedPreferences, mode: String) {
}
}
else {
prefs.edit { putString("app-list", mode) }
prefs.edit { putString("app_list", mode) }
}
Log.d("App List", "Changed to $mode")
}

View File

@@ -116,4 +116,5 @@
<string name="strategy_selection_info_msg">"В этом разделе настроек приложения представлен перебор стратегий\n Подбор проходит среди скачанных стратегий, поэтому заранее скачайте из репозитория или добавьте из файловой системы интересующие вас стратегии для сравнения. \n Перед началом так же выберете один или несколько листов доменов на вкладке \"Листы\", затем нажмите на \"Начать подбор\". Не используйте для перебора списки с большим количеством доменов."</string>
<string name="selection_no_hosts_title">Нет активных листов</string>
<string name="selection_no_hosts_message">Не обнаружено активных списков хостов, включите один или несколько, иначе подбор не сработает</string>
<string name="selection_available_domains">Доступные домены</string>
</resources>

View File

@@ -121,4 +121,5 @@
<string name="strategy_selection_info_msg">This section of the application settings allows you to iterate through strategies.\n The selection is based on downloaded strategies, so download the strategies you\'re interested in from the repository or add them from the file system for comparison.\n Before starting, select one or more domain lists in the \"Lists\" tab, then click \"Start selection\". Avoid using lists with a large number of domains.</string>
<string name="selection_no_hosts_title">No active hosts</string>
<string name="selection_no_hosts_message">No active host lists found, please enable one or more, otherwise the selection will not work</string>
<string name="selection_available_domains">Available domains</string>
</resources>

View File

@@ -1,4 +1,4 @@
1) Добавлена поддержка ipset
2) JNI **полностью переписан** на Rust
3) Добавлен подбор стратегии
4) Исправлены баги
Список изменений:
1) Более подробный подбор старатегий
2) Исправление JNI
3) Исправление ошибок

View File

@@ -47,6 +47,11 @@ pub unsafe extern "system" fn Java_com_cherret_zaprett_byedpi_NativeBridge_jniSt
let mut argv: Vec<*const c_char> = cstrings.iter().map(|s| s.as_ptr()).collect();
argv.push(std::ptr::null());
info!("starting proxy");
unsafe {
optind = 1;
optreset = 1;
clear_params();
}
PROXY_RUNNING.store(true, Ordering::SeqCst);
let ret = unsafe { main(argc as i32, argv.as_ptr()) };
PROXY_RUNNING.store(false, Ordering::SeqCst);
@@ -65,10 +70,5 @@ pub unsafe extern "system" fn Java_com_cherret_zaprett_byedpi_NativeBridge_jniSt
}
info!("stopping proxy");
let ret = unsafe { shutdown(server_fd, SHUT_RDWR) };
unsafe {
optreset = 1;
optind = 1;
}
unsafe { clear_params() };
ret as jint
}

View File

@@ -1,6 +1,6 @@
{
"version": "2.10",
"versionCode": 22,
"downloadUrl": "https://github.com/CherretGit/zaprett-app/releases/download/2.10.0/app-release.apk",
"version": "2.11",
"versionCode": 23,
"downloadUrl": "https://github.com/CherretGit/zaprett-app/releases/download/2.11.0/app-release.apk",
"changelogUrl": "https://raw.githubusercontent.com/CherretGit/zaprett-app/refs/heads/main/changelog.md"
}