feat(telegram): добавить переключатель watchdog в настройках и применить исправления для бота

This commit is contained in:
Dushnilin
2026-07-15 21:45:26 +03:00
parent faa6e70202
commit 7471b8c965
10 changed files with 3507 additions and 2418 deletions
+2
View File
@@ -10,3 +10,5 @@ AGENTS.md
sandbox/
.wsl-build/
dist/
build-out/
+38 -24
View File
@@ -207,7 +207,7 @@
"call": "Administrator Chat IDs",
"key": "Administrator Chat IDs",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:715"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:721"
]
},
{
@@ -320,7 +320,7 @@
"call": "At least one Admin Chat ID is required",
"key": "At least one Admin Chat ID is required",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:723"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:729"
]
},
{
@@ -764,7 +764,7 @@
"call": "Comma-separated list of Telegram user IDs authorized to control the bot.",
"key": "Comma-separated list of Telegram user IDs authorized to control the bot.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:716"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:722"
]
},
{
@@ -1462,7 +1462,14 @@
"call": "Enable Telegram Bot",
"key": "Enable Telegram Bot",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:690"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:696"
]
},
{
"call": "Enable Watchdog",
"key": "Enable Watchdog",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:683"
]
},
{
@@ -1483,7 +1490,14 @@
"call": "Enables the background daemon that polls Telegram for commands and sends notifications.",
"key": "Enables the background daemon that polls Telegram for commands and sends notifications.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:691"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:697"
]
},
{
"call": "Enables the background watchdog process to monitor services and auto-recover on failures.",
"key": "Enables the background watchdog process to monitor services and auto-recover on failures.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:684"
]
},
{
@@ -1536,7 +1550,7 @@
"call": "Enter the API token obtained from @BotFather.",
"key": "Enter the API token obtained from @BotFather.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:700"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:706"
]
},
{
@@ -1989,7 +2003,7 @@
"call": "How often to check Telegram for new messages (default: 5).",
"key": "How often to check Telegram for new messages (default: 5).",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:736"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:742"
]
},
{
@@ -2875,7 +2889,7 @@
"call": "Must be a comma-separated list of numeric IDs",
"key": "Must be a comma-separated list of numeric IDs",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:726"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:732"
]
},
{
@@ -3136,42 +3150,42 @@
"call": "Notify on Certificate Warnings",
"key": "Notify on Certificate Warnings",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:792"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:798"
]
},
{
"call": "Notify on Core Crashes",
"key": "Notify on Core Crashes",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:752"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:758"
]
},
{
"call": "Notify on DNS Leaks",
"key": "Notify on DNS Leaks",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:802"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:808"
]
},
{
"call": "Notify on Server Switches",
"key": "Notify on Server Switches",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:772"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:778"
]
},
{
"call": "Notify on Service Restarts",
"key": "Notify on Service Restarts",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:762"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:768"
]
},
{
"call": "Notify on Subscription Updates",
"key": "Notify on Subscription Updates",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:782"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:788"
]
},
{
@@ -3397,14 +3411,14 @@
"call": "Polling Interval (seconds)",
"key": "Polling Interval (seconds)",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:735"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:741"
]
},
{
"call": "Polling interval must be at least 1 second",
"key": "Polling interval must be at least 1 second",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:744"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:750"
]
},
{
@@ -4073,42 +4087,42 @@
"call": "Send a Telegram notification if a potential DNS leak is detected.",
"key": "Send a Telegram notification if a potential DNS leak is detected.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:803"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:809"
]
},
{
"call": "Send a Telegram notification if sing-box or nftables rules crash and get auto-restored.",
"key": "Send a Telegram notification if sing-box or nftables rules crash and get auto-restored.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:753"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:759"
]
},
{
"call": "Send a Telegram notification if SSL/TLS certificates are close to expiration.",
"key": "Send a Telegram notification if SSL/TLS certificates are close to expiration.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:793"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:799"
]
},
{
"call": "Send a Telegram notification if the Tachyon service is restarted by the watchdog.",
"key": "Send a Telegram notification if the Tachyon service is restarted by the watchdog.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:763"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:769"
]
},
{
"call": "Send a Telegram notification when a URLTest group switches to a new server.",
"key": "Send a Telegram notification when a URLTest group switches to a new server.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:773"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:779"
]
},
{
"call": "Send a Telegram notification when proxy subscriptions are successfully updated.",
"key": "Send a Telegram notification when proxy subscriptions are successfully updated.",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:783"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:789"
]
},
{
@@ -4748,7 +4762,7 @@
"call": "Telegram Bot Token",
"key": "Telegram Bot Token",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:699"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:705"
]
},
{
@@ -4948,7 +4962,7 @@
"call": "Token is required when the bot is enabled",
"key": "Token is required when the bot is enabled",
"places": [
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:707"
"../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:713"
]
},
{
+34 -26
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: TACHYON\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-15 15:04+0300\n"
"PO-Revision-Date: 2026-07-15 15:04+0300\n"
"POT-Creation-Date: 2026-07-15 18:44+0300\n"
"PO-Revision-Date: 2026-07-15 18:44+0300\n"
"Last-Translator: Dushnilin <dushnilin@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@ -139,7 +139,7 @@ msgstr ""
msgid "Address"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:715
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:721
msgid "Administrator Chat IDs"
msgstr ""
@@ -204,7 +204,7 @@ msgstr ""
msgid "Apply section rules only to the specified local IP addresses"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:723
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:729
msgid "At least one Admin Chat ID is required"
msgstr ""
@@ -474,7 +474,7 @@ msgstr ""
msgid "Closed"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:716
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:722
msgid "Comma-separated list of Telegram user IDs authorized to control the bot."
msgstr ""
@@ -881,10 +881,14 @@ msgstr ""
msgid "Enable Output Network Interface"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:690
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:696
msgid "Enable Telegram Bot"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:683
msgid "Enable Watchdog"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:413
msgid "Enable YACD"
msgstr ""
@@ -893,10 +897,14 @@ msgstr ""
msgid "Enable YACD WAN Access"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:691
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:697
msgid "Enables the background daemon that polls Telegram for commands and sends notifications."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:684
msgid "Enables the background watchdog process to monitor services and auto-recover on failures."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/server.js:2582
msgid "Enter a complete sing-box inbound object"
msgstr ""
@@ -925,7 +933,7 @@ msgstr ""
msgid "Enter HWID"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:700
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:706
msgid "Enter the API token obtained from @BotFather."
msgstr ""
@@ -1195,7 +1203,7 @@ msgstr ""
msgid "How often the currently selected server is checked"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:736
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:742
msgid "How often to check Telegram for new messages (default: 5)."
msgstr ""
@@ -1715,7 +1723,7 @@ msgstr ""
msgid "Monitoring"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:726
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:732
msgid "Must be a comma-separated list of numeric IDs"
msgstr ""
@@ -1874,27 +1882,27 @@ msgstr ""
msgid "Not running"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:792
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:798
msgid "Notify on Certificate Warnings"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:752
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:758
msgid "Notify on Core Crashes"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:802
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:808
msgid "Notify on DNS Leaks"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:772
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:778
msgid "Notify on Server Switches"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:762
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:768
msgid "Notify on Service Restarts"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:782
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:788
msgid "Notify on Subscription Updates"
msgstr ""
@@ -2027,11 +2035,11 @@ msgstr ""
msgid "Pin on dashboard"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:735
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:741
msgid "Polling Interval (seconds)"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:744
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:750
msgid "Polling interval must be at least 1 second"
msgstr ""
@@ -2421,27 +2429,27 @@ msgstr ""
msgid "Selector and URLTest outbounds must contain a non-empty outbounds array"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:803
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:809
msgid "Send a Telegram notification if a potential DNS leak is detected."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:753
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:759
msgid "Send a Telegram notification if sing-box or nftables rules crash and get auto-restored."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:793
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:799
msgid "Send a Telegram notification if SSL/TLS certificates are close to expiration."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:763
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:769
msgid "Send a Telegram notification if the Tachyon service is restarted by the watchdog."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:773
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:779
msgid "Send a Telegram notification when a URLTest group switches to a new server."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:783
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:789
msgid "Send a Telegram notification when proxy subscriptions are successfully updated."
msgstr ""
@@ -2811,7 +2819,7 @@ msgstr ""
msgid "Telegram Bot"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:699
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:705
msgid "Telegram Bot Token"
msgstr ""
@@ -2930,7 +2938,7 @@ msgstr ""
msgid "tiny"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:707
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:713
msgid "Token is required when the bot is enabled"
msgstr ""
+8 -2
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: TACHYON\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-15 18:04+0300\n"
"PO-Revision-Date: 2026-07-15 18:04+0300\n"
"POT-Creation-Date: 2026-07-15 21:44+0300\n"
"PO-Revision-Date: 2026-07-15 21:44+0300\n"
"Last-Translator: Dushnilin\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -614,6 +614,9 @@ msgstr "Включить выходной сетевой интерфейс"
msgid "Enable Telegram Bot"
msgstr "Включить Telegram-бота"
msgid "Enable Watchdog"
msgstr "Включить сторожевой таймер (Watchdog)"
msgid "Enable YACD"
msgstr "Включить YACD"
@@ -623,6 +626,9 @@ msgstr "Включить доступ YACD WAN"
msgid "Enables the background daemon that polls Telegram for commands and sends notifications."
msgstr "Включает фоновый процесс, который опрашивает Telegram на наличие команд и отправляет уведомления."
msgid "Enables the background watchdog process to monitor services and auto-recover on failures."
msgstr "Включает фоновый процесс watchdog для мониторинга служб и автоматического восстановления при сбоях."
msgid "Enter a complete sing-box inbound object"
msgstr "Введите полный объект inbound sing-box"
File diff suppressed because it is too large Load Diff
@@ -2515,9 +2515,7 @@ function addUrlTestItemOptions(itemSection, options = {}) {
form.Flag,
"interrupt_exist_connections",
_("Interrupt connections"),
_(
"Interrupt connections when URLTest switches the selected server",
),
_("Interrupt connections when URLTest switches the selected server"),
);
o.default = "1";
o.rmempty = false;
@@ -677,10 +677,16 @@ function createSettingsContent(section, capabilities) {
"Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN",
),
);
o.default = "0";
o = section.option(
form.Flag,
"enable_watchdog",
_("Enable Watchdog"),
_(
"Enables the background watchdog process to monitor services and auto-recover on failures.",
),
);
o.default = "1";
o.rmempty = false;
}
function createTelegramContent(section) {
@@ -688,7 +694,9 @@ function createTelegramContent(section) {
form.Flag,
"enabled",
_("Enable Telegram Bot"),
_("Enables the background daemon that polls Telegram for commands and sends notifications."),
_(
"Enables the background daemon that polls Telegram for commands and sends notifications.",
),
);
o.default = "0";
o.rmempty = false;
@@ -713,7 +721,9 @@ function createTelegramContent(section) {
form.Value,
"admin_ids",
_("Administrator Chat IDs"),
_("Comma-separated list of Telegram user IDs authorized to control the bot."),
_(
"Comma-separated list of Telegram user IDs authorized to control the bot.",
),
);
o.depends("enabled", "1");
o.rmempty = false;
@@ -750,7 +760,9 @@ function createTelegramContent(section) {
form.Flag,
"notify_crash",
_("Notify on Core Crashes"),
_("Send a Telegram notification if sing-box or nftables rules crash and get auto-restored."),
_(
"Send a Telegram notification if sing-box or nftables rules crash and get auto-restored.",
),
);
o.depends("enabled", "1");
o.default = "1";
@@ -760,7 +772,9 @@ function createTelegramContent(section) {
form.Flag,
"notify_restart",
_("Notify on Service Restarts"),
_("Send a Telegram notification if the Tachyon service is restarted by the watchdog."),
_(
"Send a Telegram notification if the Tachyon service is restarted by the watchdog.",
),
);
o.depends("enabled", "1");
o.default = "1";
@@ -770,7 +784,9 @@ function createTelegramContent(section) {
form.Flag,
"notify_server_switch",
_("Notify on Server Switches"),
_("Send a Telegram notification when a URLTest group switches to a new server."),
_(
"Send a Telegram notification when a URLTest group switches to a new server.",
),
);
o.depends("enabled", "1");
o.default = "1";
@@ -780,7 +796,9 @@ function createTelegramContent(section) {
form.Flag,
"notify_subscription",
_("Notify on Subscription Updates"),
_("Send a Telegram notification when proxy subscriptions are successfully updated."),
_(
"Send a Telegram notification when proxy subscriptions are successfully updated.",
),
);
o.depends("enabled", "1");
o.default = "1";
@@ -790,7 +808,9 @@ function createTelegramContent(section) {
form.Flag,
"notify_cert",
_("Notify on Certificate Warnings"),
_("Send a Telegram notification if SSL/TLS certificates are close to expiration."),
_(
"Send a Telegram notification if SSL/TLS certificates are close to expiration.",
),
);
o.depends("enabled", "1");
o.default = "1";
+8 -2
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: TACHYON\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-15 18:04+0300\n"
"PO-Revision-Date: 2026-07-15 18:04+0300\n"
"POT-Creation-Date: 2026-07-15 21:44+0300\n"
"PO-Revision-Date: 2026-07-15 21:44+0300\n"
"Last-Translator: Dushnilin\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -614,6 +614,9 @@ msgstr "Включить выходной сетевой интерфейс"
msgid "Enable Telegram Bot"
msgstr "Включить Telegram-бота"
msgid "Enable Watchdog"
msgstr "Включить сторожевой таймер (Watchdog)"
msgid "Enable YACD"
msgstr "Включить YACD"
@@ -623,6 +626,9 @@ msgstr "Включить доступ YACD WAN"
msgid "Enables the background daemon that polls Telegram for commands and sends notifications."
msgstr "Включает фоновый процесс, который опрашивает Telegram на наличие команд и отправляет уведомления."
msgid "Enables the background watchdog process to monitor services and auto-recover on failures."
msgstr "Включает фоновый процесс watchdog для мониторинга служб и автоматического восстановления при сбоях."
msgid "Enter a complete sing-box inbound object"
msgstr "Введите полный объект inbound sing-box"
+34 -26
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: TACHYON\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-15 15:04+0300\n"
"PO-Revision-Date: 2026-07-15 15:04+0300\n"
"POT-Creation-Date: 2026-07-15 18:44+0300\n"
"PO-Revision-Date: 2026-07-15 18:44+0300\n"
"Last-Translator: Dushnilin <dushnilin@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@ -139,7 +139,7 @@ msgstr ""
msgid "Address"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:715
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:721
msgid "Administrator Chat IDs"
msgstr ""
@@ -204,7 +204,7 @@ msgstr ""
msgid "Apply section rules only to the specified local IP addresses"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:723
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:729
msgid "At least one Admin Chat ID is required"
msgstr ""
@@ -474,7 +474,7 @@ msgstr ""
msgid "Closed"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:716
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:722
msgid "Comma-separated list of Telegram user IDs authorized to control the bot."
msgstr ""
@@ -881,10 +881,14 @@ msgstr ""
msgid "Enable Output Network Interface"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:690
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:696
msgid "Enable Telegram Bot"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:683
msgid "Enable Watchdog"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:413
msgid "Enable YACD"
msgstr ""
@@ -893,10 +897,14 @@ msgstr ""
msgid "Enable YACD WAN Access"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:691
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:697
msgid "Enables the background daemon that polls Telegram for commands and sends notifications."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:684
msgid "Enables the background watchdog process to monitor services and auto-recover on failures."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/server.js:2582
msgid "Enter a complete sing-box inbound object"
msgstr ""
@@ -925,7 +933,7 @@ msgstr ""
msgid "Enter HWID"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:700
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:706
msgid "Enter the API token obtained from @BotFather."
msgstr ""
@@ -1195,7 +1203,7 @@ msgstr ""
msgid "How often the currently selected server is checked"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:736
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:742
msgid "How often to check Telegram for new messages (default: 5)."
msgstr ""
@@ -1715,7 +1723,7 @@ msgstr ""
msgid "Monitoring"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:726
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:732
msgid "Must be a comma-separated list of numeric IDs"
msgstr ""
@@ -1874,27 +1882,27 @@ msgstr ""
msgid "Not running"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:792
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:798
msgid "Notify on Certificate Warnings"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:752
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:758
msgid "Notify on Core Crashes"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:802
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:808
msgid "Notify on DNS Leaks"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:772
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:778
msgid "Notify on Server Switches"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:762
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:768
msgid "Notify on Service Restarts"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:782
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:788
msgid "Notify on Subscription Updates"
msgstr ""
@@ -2027,11 +2035,11 @@ msgstr ""
msgid "Pin on dashboard"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:735
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:741
msgid "Polling Interval (seconds)"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:744
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:750
msgid "Polling interval must be at least 1 second"
msgstr ""
@@ -2421,27 +2429,27 @@ msgstr ""
msgid "Selector and URLTest outbounds must contain a non-empty outbounds array"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:803
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:809
msgid "Send a Telegram notification if a potential DNS leak is detected."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:753
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:759
msgid "Send a Telegram notification if sing-box or nftables rules crash and get auto-restored."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:793
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:799
msgid "Send a Telegram notification if SSL/TLS certificates are close to expiration."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:763
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:769
msgid "Send a Telegram notification if the Tachyon service is restarted by the watchdog."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:773
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:779
msgid "Send a Telegram notification when a URLTest group switches to a new server."
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:783
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:789
msgid "Send a Telegram notification when proxy subscriptions are successfully updated."
msgstr ""
@@ -2811,7 +2819,7 @@ msgstr ""
msgid "Telegram Bot"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:699
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:705
msgid "Telegram Bot Token"
msgstr ""
@@ -2930,7 +2938,7 @@ msgstr ""
msgid "tiny"
msgstr ""
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:707
#: ../luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js:713
msgid "Token is required when the bot is enabled"
msgstr ""
+24 -18
View File
@@ -46,21 +46,29 @@ function get_proxy_args() {
function tg_request(token, method, payload) {
if (!token) return null;
let url = "https://api.telegram.org/bot" + token + "/" + method;
let payload_path = "/tmp/tg_payload_" + method + ".json";
let payload_path = "/tmp/tg_payload_" + method + "_" + time() + "_" + clock()[1] + ".json";
fs.writefile(payload_path, sprintf("%J", payload));
let args = [ "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json", "-d", "@" + payload_path ];
let proxy = get_proxy_args();
for (let p in proxy) {
push(args, p);
let res = null;
try {
fs.writefile(payload_path, sprintf("%J", payload));
let args = [ "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json", "-d", "@" + payload_path ];
let proxy = get_proxy_args();
for (let p in proxy) {
push(args, p);
}
push(args, url);
res = command_capture(command_from_args(args));
}
catch (e) {
try { fs.unlink(payload_path); } catch(err) {}
return null;
}
push(args, url);
let res = command_capture(command_from_args(args));
fs.unlink(payload_path);
try { fs.unlink(payload_path); } catch(err) {}
if (res.status != 0 || res.output == "") {
if (!res || res.status != 0 || res.output == "") {
return null;
}
@@ -169,11 +177,9 @@ function get_clash_url(endpoint) {
let sb_cfg = json(config_data);
let ext = sb_cfg.experimental?.clash_api?.external_controller;
if (ext) {
if (index(ext, "0.0.0.0:") == 0) {
host = "127.0.0.1" + substr(ext, 7);
} else {
host = ext;
}
let parts = split(ext, ":");
let port = (length(parts) > 1) ? parts[length(parts) - 1] : "9090";
host = "127.0.0.1:" + port;
}
} catch(e) {}
}
@@ -209,7 +215,7 @@ function handle_servers(token, chat_id) {
}
let active_server = "Не определен";
let main_out = data.proxies["MAIN-out"];
let main_out = data.proxies["main-out"];
if (main_out && main_out.now) {
active_server = main_out.now;
}
@@ -220,7 +226,7 @@ function handle_servers(token, chat_id) {
for (let name in keys(data.proxies)) {
let proxy = data.proxies[name];
let p_type = lc(as_string(proxy.type || ""));
if (p_type == "vless" || p_type == "vmess" || p_type == "shadowsocks" || p_type == "trojan" || p_type == "socks" || p_type == "http") {
if (p_type == "vless" || p_type == "vmess" || p_type == "shadowsocks" || p_type == "trojan" || p_type == "socks" || p_type == "http" || p_type == "hysteria2" || p_type == "tuic" || p_type == "wireguard" || p_type == "hysteria" || p_type == "ssr") {
let delay = "N/A";
if (type(proxy.history) == "array" && length(proxy.history) > 0) {
let last = proxy.history[length(proxy.history) - 1];