Refine zapret installer and diagnostics

This commit is contained in:
ushan0v
2026-05-01 18:49:48 +03:00
parent ad9b14fea4
commit 34a78d18d4
9 changed files with 161 additions and 241 deletions
+33 -43
View File
@@ -242,6 +242,9 @@
"call": "Checks failed",
"key": "Checks failed",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:58",
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:61",
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:64",
"src/podkop/tabs/diagnostic/helpers/getMeta.ts:26"
]
},
@@ -249,7 +252,7 @@
"call": "Checks passed",
"key": "Checks passed",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:53",
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:54",
"src/podkop/tabs/diagnostic/helpers/getMeta.ts:13"
]
},
@@ -1161,6 +1164,8 @@
"call": "Issues detected",
"key": "Issues detected",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:67",
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:70",
"src/podkop/tabs/diagnostic/helpers/getMeta.ts:20"
]
},
@@ -1303,14 +1308,14 @@
"call": "NFQUEUE range is available",
"key": "NFQUEUE range is available",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:123"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:118"
]
},
{
"call": "NFQUEUE range overlaps with another rule",
"key": "NFQUEUE range overlaps with another rule",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:122"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:117"
]
},
{
@@ -1338,7 +1343,7 @@
"call": "No rules use Zapret",
"key": "No rules use Zapret",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:105"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:100"
]
},
{
@@ -1507,28 +1512,21 @@
"call": "Podkop-managed nfqws runtime is not ready",
"key": "Podkop-managed nfqws runtime is not ready",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:113"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:108"
]
},
{
"call": "Podkop-managed nfqws runtime is not running",
"key": "Podkop-managed nfqws runtime is not running",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:116"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:111"
]
},
{
"call": "Podkop-managed nfqws runtime is ready",
"key": "Podkop-managed nfqws runtime is ready",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:112"
]
},
{
"call": "Podkop-managed Zapret runtime is not ready",
"key": "Podkop-managed Zapret runtime is not ready",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:62"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:107"
]
},
{
@@ -1936,8 +1934,21 @@
"call": "Standalone Zapret is active together with Podkop Zapret rules",
"key": "Standalone Zapret is active together with Podkop Zapret rules",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:73",
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:131"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:125"
]
},
{
"call": "Standalone Zapret service is active",
"key": "Standalone Zapret service is active",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:126"
]
},
{
"call": "Standalone Zapret service is inactive",
"key": "Standalone Zapret service is inactive",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:127"
]
},
{
@@ -2014,7 +2025,7 @@
"call": "There are rules using Zapret",
"key": "There are rules using Zapret",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:104"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:99"
]
},
{
@@ -2120,7 +2131,7 @@
"call": "Unexpected Podkop-managed nfqws runtime is running",
"key": "Unexpected Podkop-managed nfqws runtime is running",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:115"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:110"
]
},
{
@@ -2374,53 +2385,32 @@
"../luci-app-podkop-plus/htdocs/luci-static/resources/view/podkop/section.js:1008"
]
},
{
"call": "Zapret integration conflict detected",
"key": "Zapret integration conflict detected",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:65"
]
},
{
"call": "Zapret package is installed",
"key": "Zapret package is installed",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:97"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:92"
]
},
{
"call": "Zapret package is not installed",
"key": "Zapret package is not installed",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:98"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:93"
]
},
{
"call": "Zapret provider binary is available",
"key": "Zapret provider binary is available",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:86"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:81"
]
},
{
"call": "Zapret provider binary is not available",
"key": "Zapret provider binary is not available",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:87"
]
},
{
"call": "Zapret provider is not installed; action=zapret is unavailable",
"key": "Zapret provider is not installed; action=zapret is unavailable",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:68"
]
},
{
"call": "Zapret provider is unavailable while zapret rules are enabled",
"key": "Zapret provider is unavailable while zapret rules are enabled",
"places": [
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:57"
"src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:82"
]
}
]
+29 -33
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PODKOP PLUS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-01 15:19+0300\n"
"PO-Revision-Date: 2026-05-01 15:19+0300\n"
"POT-Creation-Date: 2026-05-01 15:39+0300\n"
"PO-Revision-Date: 2026-05-01 15:39+0300\n"
"Last-Translator: Codex <codex@local>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@ -159,11 +159,14 @@ msgstr ""
msgid "checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:58
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:61
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:64
#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:26
msgid "Checks failed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:53
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:54
#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13
msgid "Checks passed"
msgstr ""
@@ -697,6 +700,8 @@ msgstr ""
msgid "IPs"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:67
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:70
#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20
msgid "Issues detected"
msgstr ""
@@ -779,11 +784,11 @@ msgstr ""
msgid "Must be a number in the range of 50 - 1000"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:123
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:118
msgid "NFQUEUE range is available"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:122
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:117
msgid "NFQUEUE range overlaps with another rule"
msgstr ""
@@ -799,7 +804,7 @@ msgstr ""
msgid "No other marking rules found"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:105
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:100
msgid "No rules use Zapret"
msgstr ""
@@ -902,22 +907,18 @@ msgstr ""
msgid "Podkop Plus will not modify your DHCP configuration"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:113
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:108
msgid "Podkop-managed nfqws runtime is not ready"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:116
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:111
msgid "Podkop-managed nfqws runtime is not running"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:112
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:107
msgid "Podkop-managed nfqws runtime is ready"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:62
msgid "Podkop-managed Zapret runtime is not ready"
msgstr ""
#: ../luci-app-podkop-plus/htdocs/luci-static/resources/view/podkop/section.js:1949
msgid "Port cannot be empty"
msgstr ""
@@ -1148,11 +1149,18 @@ msgstr ""
msgid "Specify a local IP address to be excluded from routing"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:73
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:131
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:125
msgid "Standalone Zapret is active together with Podkop Zapret rules"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:126
msgid "Standalone Zapret service is active"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:127
msgid "Standalone Zapret service is inactive"
msgstr ""
#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:69
msgid "Start Podkop Plus"
msgstr ""
@@ -1193,7 +1201,7 @@ msgstr ""
msgid "The NFQUEUE number is assigned by Podkop Plus for each rule and must not be overridden here."
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:104
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:99
msgid "There are rules using Zapret"
msgstr ""
@@ -1254,7 +1262,7 @@ msgstr ""
msgid "Unable to validate the NFQWS strategy through the backend parser."
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:115
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:110
msgid "Unexpected Podkop-managed nfqws runtime is running"
msgstr ""
@@ -1413,30 +1421,18 @@ msgstr ""
msgid "Zapret hostlist templates are not supported here because Podkop Plus does not expand them for per-rule NFQWS strategies."
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:65
msgid "Zapret integration conflict detected"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:97
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:92
msgid "Zapret package is installed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:98
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:93
msgid "Zapret package is not installed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:86
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:81
msgid "Zapret provider binary is available"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:87
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:82
msgid "Zapret provider binary is not available"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:68
msgid "Zapret provider is not installed; action=zapret is unavailable"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:57
msgid "Zapret provider is unavailable while zapret rules are enabled"
msgstr ""
+9 -15
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PODKOP PLUS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-01 18:19+0300\n"
"PO-Revision-Date: 2026-05-01 18:19+0300\n"
"POT-Creation-Date: 2026-05-01 18:39+0300\n"
"PO-Revision-Date: 2026-05-01 18:39+0300\n"
"Last-Translator: Codex\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -644,9 +644,6 @@ msgstr "NFQWS Podkop Plus не запущен"
msgid "Podkop-managed nfqws runtime is ready"
msgstr "NFQWS Podkop Plus готов"
msgid "Podkop-managed Zapret runtime is not ready"
msgstr "Zapret в Podkop Plus не готов"
msgid "Port cannot be empty"
msgstr "Порт не может быть пустым"
@@ -821,6 +818,12 @@ msgstr "Укажите локальный IP-адрес, который след
msgid "Standalone Zapret is active together with Podkop Zapret rules"
msgstr "Отдельная служба Zapret активна вместе с правилами Zapret в Podkop Plus"
msgid "Standalone Zapret service is active"
msgstr "Отдельная служба Zapret активна"
msgid "Standalone Zapret service is inactive"
msgstr "Отдельная служба Zapret неактивна"
msgid "Start Podkop Plus"
msgstr "Запустить Podkop Plus"
@@ -852,7 +855,7 @@ msgid "The NFQUEUE number is assigned by Podkop Plus for each rule and must not
msgstr "Номер NFQUEUE назначается Podkop Plus для каждого правила и не должен переопределяться здесь."
msgid "There are rules using Zapret"
msgstr "Есть правила, использующие Zapret"
msgstr "Есть правила использующие Zapret"
msgid "This field must start a working nfqws strategy; --dry-run exits immediately and is not allowed here."
msgstr "Это поле должно запускать рабочую стратегию nfqws; --dry-run сразу завершает процесс и здесь запрещён."
@@ -995,9 +998,6 @@ msgstr "Zapret (провайдер недоступен)"
msgid "Zapret hostlist templates are not supported here because Podkop Plus does not expand them for per-rule NFQWS strategies."
msgstr "Шаблоны hostlist zapret здесь не поддерживаются, потому что Podkop Plus не разворачивает их для per-rule стратегий NFQWS."
msgid "Zapret integration conflict detected"
msgstr "Обнаружен конфликт интеграции Zapret"
msgid "Zapret package is installed"
msgstr "Пакет Zapret установлен"
@@ -1009,9 +1009,3 @@ msgstr "Бинарник провайдера Zapret доступен"
msgid "Zapret provider binary is not available"
msgstr "Бинарник провайдера Zapret недоступен"
msgid "Zapret provider is not installed; action=zapret is unavailable"
msgstr "Провайдер Zapret не установлен; action=zapret недоступен"
msgid "Zapret provider is unavailable while zapret rules are enabled"
msgstr "Провайдер Zapret недоступен, хотя включены правила Zapret"
@@ -38,7 +38,8 @@ export async function runZapretCheck() {
const hasZapretRules = Number(data.enabled_rule_count || 0) > 0;
const ready = Boolean(data.ready);
const queueOverlap = Boolean(data.queue_overlap);
const standaloneConflict = Boolean(data.standalone_conflict);
const standaloneServiceRunning = Boolean(data.standalone_service_running);
const standaloneConflict = hasZapretRules && standaloneServiceRunning;
const expectedProcesses = Number(data.expected_process_count || 0);
const runningProcesses = Number(data.running_process_count || 0);
const supervisorProcesses = Number(data.supervisor_process_count || 0);
@@ -54,25 +55,19 @@ export async function runZapretCheck() {
if (hasZapretRules && !providerAvailable) {
state = 'error';
description = _(
'Zapret provider is unavailable while zapret rules are enabled',
);
description = _('Checks failed');
} else if (hasZapretRules && !ready) {
state = 'error';
description = _('Podkop-managed Zapret runtime is not ready');
description = _('Checks failed');
} else if (queueOverlap) {
state = 'error';
description = _('Zapret integration conflict detected');
description = _('Checks failed');
} else if (!hasZapretRules && !providerAvailable) {
state = 'warning';
description = _(
'Zapret provider is not installed; action=zapret is unavailable',
);
description = _('Issues detected');
} else if (standaloneConflict) {
state = 'warning';
description = _(
'Standalone Zapret is active together with Podkop Zapret rules',
);
description = _('Issues detected');
}
const items: Array<IDiagnosticsChecksItem> = [
@@ -123,15 +118,16 @@ export async function runZapretCheck() {
: _('NFQUEUE range is available'),
value: `${Number(data.queue_base || 0)}-${Number(data.queue_range_end || 0)}`,
},
];
if (standaloneConflict) {
items.push({
state: 'warning',
key: _('Standalone Zapret is active together with Podkop Zapret rules'),
{
state: standaloneConflict ? 'warning' : 'success',
key: standaloneServiceRunning
? hasZapretRules
? _('Standalone Zapret is active together with Podkop Zapret rules')
: _('Standalone Zapret service is active')
: _('Standalone Zapret service is inactive'),
value: '',
});
}
},
];
updateCheckStore({
order,
+23 -62
View File
@@ -458,16 +458,6 @@ resolve_podkop_plus_release() {
fi
}
detect_installed_podkop_plus_version() {
version=""
if command_exists podkop-plus; then
version="$(podkop-plus show_version 2>/dev/null | head -n 1)"
fi
printf '%s' "$version"
}
is_original_podkop_present() {
pkg_is_installed "podkop" ||
pkg_is_installed "luci-app-podkop" ||
@@ -509,45 +499,6 @@ migrate_podkop_plus_config_if_needed() {
msg "Migrated the Podkop Plus config to /etc/config/podkop-plus"
}
reset_legacy_config_if_needed() {
current_version=""
backup_path=""
default_config_url=""
default_config_tmp=""
[ -f /etc/config/podkop-plus ] || return 0
current_version="$(detect_installed_podkop_plus_version)"
if [ -n "$current_version" ] && version_ge "$current_version" "0.7.0"; then
return 0
fi
if ! pkg_is_installed "luci-app-podkop-plus" &&
[ ! -x /etc/init.d/podkop-plus ] &&
[ ! -x /usr/bin/podkop-plus ] &&
[ ! -d /usr/lib/podkop-plus ]; then
return 0
fi
warn "Detected a legacy Podkop Plus installation."
warn "The current config will be backed up to /etc/config/podkop-plus-070.<timestamp> and replaced with the Podkop Plus default config."
confirm_prompt "Continue and reset /etc/config/podkop-plus?" || fail "Installation cancelled by user"
backup_path="/etc/config/podkop-plus-070.$(date +%Y%m%d%H%M%S 2>/dev/null || echo "$$")"
mv /etc/config/podkop-plus "$backup_path" || fail "Failed to back up /etc/config/podkop-plus"
default_config_url="https://raw.githubusercontent.com/${REPO_OWNER}/${REPO_NAME}/${PODKOP_PLUS_RELEASE_TAG}/podkop/files/etc/config/podkop"
default_config_tmp="$TMP_DIR/default-podkop-plus-config"
download_with_retry "$default_config_url" "$default_config_tmp" "default Podkop Plus config" || fail "Failed to download the default Podkop Plus config"
cp "$default_config_tmp" /etc/config/podkop-plus || fail "Failed to restore /etc/config/podkop-plus"
chmod 0644 /etc/config/podkop-plus || true
msg "A fresh Podkop Plus config was installed. Backup saved to $backup_path"
}
remove_conflicting_dns_proxy() {
if ! pkg_is_installed "https-dns-proxy"; then
return 0
@@ -922,18 +873,35 @@ download_and_extract_zapret_package() {
}
install_packages() {
if [ -n "$ZAPRET_PACKAGE_FILE" ]; then
pkg_remove_if_installed "zapret"
pkg_install_files "$ZAPRET_PACKAGE_FILE" || fail "zapret provider installation failed"
disable_installed_zapret_service
fi
set -- "$PODKOP_PLUS_PACKAGE_FILE"
if [ -n "$PODKOP_PLUS_I18N_FILE" ]; then
set -- "$@" "$PODKOP_PLUS_I18N_FILE"
fi
if [ -n "$ZAPRET_PACKAGE_FILE" ]; then
pkg_remove_if_installed "zapret"
set -- "$ZAPRET_PACKAGE_FILE" "$@"
pkg_install_files "$@" || fail "Package installation failed"
}
disable_installed_zapret_service() {
[ -n "$ZAPRET_PACKAGE_FILE" ] || return 0
[ -x /etc/init.d/zapret ] || return 0
/etc/init.d/zapret stop >/dev/null 2>&1 || true
/etc/init.d/zapret disable >/dev/null 2>&1 || true
if /etc/init.d/zapret status >/dev/null 2>&1; then
warn "Standalone /etc/init.d/zapret is still running after installation. Stop it manually if you do not use standalone zapret."
fi
pkg_install_files "$@" || fail "Package installation failed"
if /etc/init.d/zapret enabled >/dev/null 2>&1; then
warn "Standalone /etc/init.d/zapret autostart is still enabled after installation. Disable it manually if you do not use standalone zapret."
fi
}
post_install() {
@@ -945,16 +913,10 @@ post_install() {
fi
if [ -n "$ZAPRET_PACKAGE_FILE" ]; then
disable_installed_zapret_service
warn "The zapret provider was installed as an external upstream package."
warn "Podkop Plus does not modify /etc/config/zapret or luci-app-zapret settings."
if [ -x /etc/init.d/zapret ] && /etc/init.d/zapret enabled >/dev/null 2>&1; then
warn "Standalone /etc/init.d/zapret autostart is enabled by the upstream package."
fi
if [ -x /etc/init.d/zapret ] && /etc/init.d/zapret status >/dev/null 2>&1; then
warn "Standalone /etc/init.d/zapret is currently running. Podkop diagnostics will report possible overlap if action=zapret is used."
fi
msg "Standalone /etc/init.d/zapret service and autostart were disabled after provider installation."
fi
}
@@ -982,7 +944,6 @@ main() {
resolve_podkop_plus_release
migrate_podkop_plus_config_if_needed
reset_legacy_config_if_needed
remove_conflicting_dns_proxy
remove_old_sing_box_if_needed
@@ -2963,7 +2963,8 @@ async function runZapretCheck() {
const hasZapretRules = Number(data.enabled_rule_count || 0) > 0;
const ready = Boolean(data.ready);
const queueOverlap = Boolean(data.queue_overlap);
const standaloneConflict = Boolean(data.standalone_conflict);
const standaloneServiceRunning = Boolean(data.standalone_service_running);
const standaloneConflict = hasZapretRules && standaloneServiceRunning;
const expectedProcesses = Number(data.expected_process_count || 0);
const runningProcesses = Number(data.running_process_count || 0);
const supervisorProcesses = Number(data.supervisor_process_count || 0);
@@ -2973,25 +2974,19 @@ async function runZapretCheck() {
let description = _("Checks passed");
if (hasZapretRules && !providerAvailable) {
state = "error";
description = _(
"Zapret provider is unavailable while zapret rules are enabled"
);
description = _("Checks failed");
} else if (hasZapretRules && !ready) {
state = "error";
description = _("Podkop-managed Zapret runtime is not ready");
description = _("Checks failed");
} else if (queueOverlap) {
state = "error";
description = _("Zapret integration conflict detected");
description = _("Checks failed");
} else if (!hasZapretRules && !providerAvailable) {
state = "warning";
description = _(
"Zapret provider is not installed; action=zapret is unavailable"
);
description = _("Issues detected");
} else if (standaloneConflict) {
state = "warning";
description = _(
"Standalone Zapret is active together with Podkop Zapret rules"
);
description = _("Issues detected");
}
const items = [
{
@@ -3018,15 +3013,13 @@ async function runZapretCheck() {
state: queueOverlap ? "error" : "success",
key: queueOverlap ? _("NFQUEUE range overlaps with another rule") : _("NFQUEUE range is available"),
value: `${Number(data.queue_base || 0)}-${Number(data.queue_range_end || 0)}`
},
{
state: standaloneConflict ? "warning" : "success",
key: standaloneServiceRunning ? hasZapretRules ? _("Standalone Zapret is active together with Podkop Zapret rules") : _("Standalone Zapret service is active") : _("Standalone Zapret service is inactive"),
value: ""
}
];
if (standaloneConflict) {
items.push({
state: "warning",
key: _("Standalone Zapret is active together with Podkop Zapret rules"),
value: ""
});
}
updateCheckStore({
order,
code,
+9 -15
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PODKOP PLUS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-01 18:19+0300\n"
"PO-Revision-Date: 2026-05-01 18:19+0300\n"
"POT-Creation-Date: 2026-05-01 18:39+0300\n"
"PO-Revision-Date: 2026-05-01 18:39+0300\n"
"Last-Translator: Codex\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -644,9 +644,6 @@ msgstr "NFQWS Podkop Plus не запущен"
msgid "Podkop-managed nfqws runtime is ready"
msgstr "NFQWS Podkop Plus готов"
msgid "Podkop-managed Zapret runtime is not ready"
msgstr "Zapret в Podkop Plus не готов"
msgid "Port cannot be empty"
msgstr "Порт не может быть пустым"
@@ -821,6 +818,12 @@ msgstr "Укажите локальный IP-адрес, который след
msgid "Standalone Zapret is active together with Podkop Zapret rules"
msgstr "Отдельная служба Zapret активна вместе с правилами Zapret в Podkop Plus"
msgid "Standalone Zapret service is active"
msgstr "Отдельная служба Zapret активна"
msgid "Standalone Zapret service is inactive"
msgstr "Отдельная служба Zapret неактивна"
msgid "Start Podkop Plus"
msgstr "Запустить Podkop Plus"
@@ -852,7 +855,7 @@ msgid "The NFQUEUE number is assigned by Podkop Plus for each rule and must not
msgstr "Номер NFQUEUE назначается Podkop Plus для каждого правила и не должен переопределяться здесь."
msgid "There are rules using Zapret"
msgstr "Есть правила, использующие Zapret"
msgstr "Есть правила использующие Zapret"
msgid "This field must start a working nfqws strategy; --dry-run exits immediately and is not allowed here."
msgstr "Это поле должно запускать рабочую стратегию nfqws; --dry-run сразу завершает процесс и здесь запрещён."
@@ -995,9 +998,6 @@ msgstr "Zapret (провайдер недоступен)"
msgid "Zapret hostlist templates are not supported here because Podkop Plus does not expand them for per-rule NFQWS strategies."
msgstr "Шаблоны hostlist zapret здесь не поддерживаются, потому что Podkop Plus не разворачивает их для per-rule стратегий NFQWS."
msgid "Zapret integration conflict detected"
msgstr "Обнаружен конфликт интеграции Zapret"
msgid "Zapret package is installed"
msgstr "Пакет Zapret установлен"
@@ -1009,9 +1009,3 @@ msgstr "Бинарник провайдера Zapret доступен"
msgid "Zapret provider binary is not available"
msgstr "Бинарник провайдера Zapret недоступен"
msgid "Zapret provider is not installed; action=zapret is unavailable"
msgstr "Провайдер Zapret не установлен; action=zapret недоступен"
msgid "Zapret provider is unavailable while zapret rules are enabled"
msgstr "Провайдер Zapret недоступен, хотя включены правила Zapret"
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PODKOP PLUS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-01 15:19+0300\n"
"PO-Revision-Date: 2026-05-01 15:19+0300\n"
"POT-Creation-Date: 2026-05-01 15:39+0300\n"
"PO-Revision-Date: 2026-05-01 15:39+0300\n"
"Last-Translator: Codex <codex@local>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@ -159,11 +159,14 @@ msgstr ""
msgid "checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:58
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:61
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:64
#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:26
msgid "Checks failed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:53
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:54
#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13
msgid "Checks passed"
msgstr ""
@@ -697,6 +700,8 @@ msgstr ""
msgid "IPs"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:67
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:70
#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20
msgid "Issues detected"
msgstr ""
@@ -779,11 +784,11 @@ msgstr ""
msgid "Must be a number in the range of 50 - 1000"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:123
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:118
msgid "NFQUEUE range is available"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:122
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:117
msgid "NFQUEUE range overlaps with another rule"
msgstr ""
@@ -799,7 +804,7 @@ msgstr ""
msgid "No other marking rules found"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:105
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:100
msgid "No rules use Zapret"
msgstr ""
@@ -902,22 +907,18 @@ msgstr ""
msgid "Podkop Plus will not modify your DHCP configuration"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:113
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:108
msgid "Podkop-managed nfqws runtime is not ready"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:116
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:111
msgid "Podkop-managed nfqws runtime is not running"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:112
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:107
msgid "Podkop-managed nfqws runtime is ready"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:62
msgid "Podkop-managed Zapret runtime is not ready"
msgstr ""
#: ../luci-app-podkop-plus/htdocs/luci-static/resources/view/podkop/section.js:1949
msgid "Port cannot be empty"
msgstr ""
@@ -1148,11 +1149,18 @@ msgstr ""
msgid "Specify a local IP address to be excluded from routing"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:73
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:131
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:125
msgid "Standalone Zapret is active together with Podkop Zapret rules"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:126
msgid "Standalone Zapret service is active"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:127
msgid "Standalone Zapret service is inactive"
msgstr ""
#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:69
msgid "Start Podkop Plus"
msgstr ""
@@ -1193,7 +1201,7 @@ msgstr ""
msgid "The NFQUEUE number is assigned by Podkop Plus for each rule and must not be overridden here."
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:104
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:99
msgid "There are rules using Zapret"
msgstr ""
@@ -1254,7 +1262,7 @@ msgstr ""
msgid "Unable to validate the NFQWS strategy through the backend parser."
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:115
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:110
msgid "Unexpected Podkop-managed nfqws runtime is running"
msgstr ""
@@ -1413,30 +1421,18 @@ msgstr ""
msgid "Zapret hostlist templates are not supported here because Podkop Plus does not expand them for per-rule NFQWS strategies."
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:65
msgid "Zapret integration conflict detected"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:97
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:92
msgid "Zapret package is installed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:98
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:93
msgid "Zapret package is not installed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:86
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:81
msgid "Zapret provider binary is available"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:87
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:82
msgid "Zapret provider binary is not available"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:68
msgid "Zapret provider is not installed; action=zapret is unavailable"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runZapretCheck.ts:57
msgid "Zapret provider is unavailable while zapret rules are enabled"
msgstr ""
+1 -1
View File
@@ -1032,7 +1032,7 @@ zapret_external_queue_overlap_present() {
zapret_standalone_conflict_present() {
has_enabled_zapret_rules || return 1
is_zapret_standalone_service_running || is_zapret_standalone_service_enabled
is_zapret_standalone_service_running
}
zapret_rule_outbound_present() {