From d4b3377d68874ec379d40340c415ac6cf6e8bc68 Mon Sep 17 00:00:00 2001 From: Andrey Petelin Date: Mon, 27 Oct 2025 15:17:20 +0500 Subject: [PATCH 1/9] feat: add URLTest check interval, tolerance and testing URL options and wire them into outbound config generation --- .../resources/view/podkop/section.js | 37 +++++++++++++++++++ podkop/files/usr/bin/podkop | 8 +++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js index 585771d..77067ac 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js @@ -104,6 +104,43 @@ function createSectionContent(section) { return validation.message; }; + o = section.option( + form.ListValue, + "urltest_check_interval", + _("URLTest Check Interval"), + _("The interval between connectivity tests") + ); + o.value("30s", _("Every 30 seconds")); + o.value("1m", _("Every 1 minute")); + o.value("3m", _("Every 3 minutes")); + o.value("5m", _("Every 5 minutes")); + o.default = "3m" + o.depends("proxy_config_type", "urltest"); + + o = section.option( + form.Value, + "urltest_tolerance", + _("URLTest Tolerance"), + _("The maximum difference in response times (ms) allowed when comparing servers") + ); + o.default = "50" + o.rmempty = false; + o.depends("proxy_config_type", "urltest"); + + o = section.option( + form.Value, + "urltest_testing_url", + _("URLTest Testing URL"), + _("The URL used to test server connectivity") + ); + o.value("https://www.gstatic.com/generate_204", "https://www.gstatic.com/generate_204 (Google)"); + o.value("https://cp.cloudflare.com/generate_204", "https://cp.cloudflare.com/generate_204 (Cloudflare)"); + o.value("https://captive.apple.com", "https://captive.apple.com (Apple)"); + o.value("https://connectivity-check.ubuntu.com", " https://connectivity-check.ubuntu.com (Ubuntu)") + o.default = "https://www.gstatic.com/generate_204" + o.rmempty = false; + o.depends("proxy_config_type", "urltest"); + o = section.option( form.Flag, "enable_udp_over_tcp", diff --git a/podkop/files/usr/bin/podkop b/podkop/files/usr/bin/podkop index 9f2bd07..2ef9a9e 100755 --- a/podkop/files/usr/bin/podkop +++ b/podkop/files/usr/bin/podkop @@ -627,9 +627,12 @@ configure_outbound_handler() { urltest) log "Detected proxy configuration type: urltest" "debug" local urltest_proxy_links udp_over_tcp i urltest_tag selector_tag outbound_tag outbound_tags \ - urltest_outbounds selector_outbounds + urltest_outbounds selector_outbounds urltest_check_interval urltest_tolerance urltest_testing_url config_get urltest_proxy_links "$section" "urltest_proxy_links" config_get udp_over_tcp "$section" "enable_udp_over_tcp" + config_get urltest_check_interval "$section" "urltest_check_interval" "3m" + config_get urltest_tolerance "$section" "urltest_tolerance" 50 + config_get urltest_testing_url "$section" "urltest_testing_url" "https://www.gstatic.com/generate_204" if [ -z "$urltest_proxy_links" ]; then log "URLTest proxy links is not set. Aborted." "fatal" @@ -652,7 +655,8 @@ configure_outbound_handler() { selector_tag="$(get_outbound_tag_by_section "$section")" urltest_outbounds="$(comma_string_to_json_array "$outbound_tags")" selector_outbounds="$(comma_string_to_json_array "$outbound_tags,$urltest_tag")" - config="$(sing_box_cm_add_urltest_outbound "$config" "$urltest_tag" "$urltest_outbounds")" + config="$(sing_box_cm_add_urltest_outbound "$config" "$urltest_tag" "$urltest_outbounds" \ + "$urltest_testing_url" "$urltest_check_interval" "$urltest_tolerance")" config="$(sing_box_cm_add_selector_outbound "$config" "$selector_tag" "$selector_outbounds" "$urltest_tag")" ;; *) From f1a6ff34696df640641916c9cc316488404e1e9c Mon Sep 17 00:00:00 2001 From: divocat Date: Mon, 27 Oct 2025 13:06:33 +0200 Subject: [PATCH 2/9] feat: add validations & translations --- fe-app-podkop/locales/calls.json | 198 ++++++++++++------ fe-app-podkop/locales/podkop.pot | 169 +++++++++------ fe-app-podkop/locales/podkop.ru.po | 37 +++- .../src/validators/tests/validateUrl.test.js | 1 + fe-app-podkop/src/validators/validateUrl.ts | 36 ++-- .../luci-static/resources/view/podkop/main.js | 24 ++- .../resources/view/podkop/section.js | 27 +++ luci-app-podkop/po/ru/podkop.po | 37 +++- luci-app-podkop/po/templates/podkop.pot | 169 +++++++++------ 9 files changed, 488 insertions(+), 210 deletions(-) diff --git a/fe-app-podkop/locales/calls.json b/fe-app-podkop/locales/calls.json index 75b8119..b0a6200 100644 --- a/fe-app-podkop/locales/calls.json +++ b/fe-app-podkop/locales/calls.json @@ -45,21 +45,21 @@ "call": "Applicable for SOCKS and Shadowsocks proxy", "key": "Applicable for SOCKS and Shadowsocks proxy", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:175" ] }, { "call": "At least one valid domain must be specified. Comments-only content is not allowed.", "key": "At least one valid domain must be specified. Comments-only content is not allowed.", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:356" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:420" ] }, { "call": "At least one valid subnet or IP must be specified. Comments-only content is not allowed.", "key": "At least one valid subnet or IP must be specified. Comments-only content is not allowed.", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:437" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:501" ] }, { @@ -171,7 +171,7 @@ "call": "Community Lists", "key": "Community Lists", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:211" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:275" ] }, { @@ -290,8 +290,8 @@ "call": "Disabled", "key": "Disabled", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:302", - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:382" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:366", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:446" ] }, { @@ -305,7 +305,7 @@ "call": "DNS over HTTPS (DoH)", "key": "DNS over HTTPS (DoH)", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:179", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:243", "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:15" ] }, @@ -313,7 +313,7 @@ "call": "DNS over TLS (DoT)", "key": "DNS over TLS (DoT)", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:180", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:244", "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:16" ] }, @@ -321,7 +321,7 @@ "call": "DNS Protocol Type", "key": "DNS Protocol Type", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:176", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:240", "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:12" ] }, @@ -336,7 +336,7 @@ "call": "DNS Server", "key": "DNS Server", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:189", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:253", "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:24" ] }, @@ -358,7 +358,7 @@ "call": "Domain Resolver", "key": "Domain Resolver", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:166" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:230" ] }, { @@ -409,8 +409,8 @@ "call": "Dynamic List", "key": "Dynamic List", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:303", - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:383" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:367", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:447" ] }, { @@ -424,14 +424,14 @@ "call": "Enable built-in DNS resolver for domains handled by this section", "key": "Enable built-in DNS resolver for domains handled by this section", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:167" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:231" ] }, { "call": "Enable Mixed Proxy", "key": "Enable Mixed Proxy", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:575" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:639" ] }, { @@ -445,7 +445,7 @@ "call": "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies", "key": "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:576" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:640" ] }, { @@ -466,21 +466,49 @@ "call": "Enter domain names separated by commas, spaces, or newlines. You can add comments using //", "key": "Enter domain names separated by commas, spaces, or newlines. You can add comments using //", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:338" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:402" ] }, { "call": "Enter domain names without protocols, e.g. example.com or sub.example.com", "key": "Enter domain names without protocols, e.g. example.com or sub.example.com", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:312" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:376" ] }, { "call": "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses", "key": "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:392" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:456" + ] + }, + { + "call": "Every 1 minute", + "key": "Every 1 minute", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:114" + ] + }, + { + "call": "Every 3 minutes", + "key": "Every 3 minutes", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:115" + ] + }, + { + "call": "Every 30 seconds", + "key": "Every 30 seconds", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:113" + ] + }, + { + "call": "Every 5 minutes", + "key": "Every 5 minutes", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:116" ] }, { @@ -521,14 +549,14 @@ "key": "Fastest", "places": [ "src/podkop/methods/custom/getDashboardSections.ts:117", - "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:58" + "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:59" ] }, { "call": "Fully Routed IPs", "key": "Fully Routed IPs", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:550" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:614" ] }, { @@ -774,7 +802,8 @@ "call": "Invalid URL format", "key": "Invalid URL format", "places": [ - "src/validators/validateUrl.ts:18" + "src/validators/validateUrl.ts:8", + "src/validators/validateUrl.ts:31" ] }, { @@ -816,14 +845,14 @@ "call": "Local Domain Lists", "key": "Local Domain Lists", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:458" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:522" ] }, { "call": "Local Subnet Lists", "key": "Local Subnet Lists", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:481" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:545" ] }, { @@ -844,7 +873,7 @@ "call": "Mixed Proxy Port", "key": "Mixed Proxy Port", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:586" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:650" ] }, { @@ -854,11 +883,18 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:198" ] }, + { + "call": "Must be a number in the range of 50 - 1000", + "key": "Must be a number in the range of 50 - 1000", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:140" + ] + }, { "call": "Network Interface", "key": "Network Interface", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:120" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:184" ] }, { @@ -879,9 +915,9 @@ "call": "Not responding", "key": "Not responding", "places": [ - "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:74", - "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:80", - "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:99" + "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:75", + "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:81", + "src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:100" ] }, { @@ -1015,21 +1051,21 @@ "call": "Regional options cannot be used together", "key": "Regional options cannot be used together", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:309" ] }, { "call": "Remote Domain Lists", "key": "Remote Domain Lists", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:504" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:568" ] }, { "call": "Remote Subnet Lists", "key": "Remote Subnet Lists", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:527" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:591" ] }, { @@ -1113,7 +1149,7 @@ "call": "Russia inside restrictions", "key": "Russia inside restrictions", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:264" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:328" ] }, { @@ -1127,7 +1163,7 @@ "call": "Select a predefined list for routing", "key": "Select a predefined list for routing", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:212" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:276" ] }, { @@ -1162,14 +1198,14 @@ "call": "Select network interface for VPN connection", "key": "Select network interface for VPN connection", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:121" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:185" ] }, { "call": "Select or enter DNS server address", "key": "Select or enter DNS server address", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:190", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:254", "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:25" ] }, @@ -1191,21 +1227,21 @@ "call": "Select the DNS protocol type for the domain resolver", "key": "Select the DNS protocol type for the domain resolver", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:177" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:241" ] }, { "call": "Select the list type for adding custom domains", "key": "Select the list type for adding custom domains", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:300" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:364" ] }, { "call": "Select the list type for adding custom subnets", "key": "Select the list type for adding custom subnets", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:380" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:444" ] }, { @@ -1318,29 +1354,29 @@ "call": "Specify local IP addresses or subnets whose traffic will always be routed through the configured route", "key": "Specify local IP addresses or subnets whose traffic will always be routed through the configured route", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:551" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:615" ] }, { "call": "Specify remote URLs to download and use domain lists", "key": "Specify remote URLs to download and use domain lists", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:505" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:569" ] }, { "call": "Specify remote URLs to download and use subnet lists", "key": "Specify remote URLs to download and use subnet lists", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:528" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:592" ] }, { "call": "Specify the path to the list file located on the router filesystem", "key": "Specify the path to the list file located on the router filesystem", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:459", - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:482" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:523", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:546" ] }, { @@ -1396,14 +1432,14 @@ "call": "Text List", "key": "Text List", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:304" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:368" ] }, { "call": "Text List (comma/space/newline separated)", "key": "Text List (comma/space/newline separated)", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:384" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:448" ] }, { @@ -1413,6 +1449,27 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:46" ] }, + { + "call": "The interval between connectivity tests", + "key": "The interval between connectivity tests", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111" + ] + }, + { + "call": "The maximum difference in response times (ms) allowed when comparing servers", + "key": "The maximum difference in response times (ms) allowed when comparing servers", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:124" + ] + }, + { + "call": "The URL used to test server connectivity", + "key": "The URL used to test server connectivity", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:147" + ] + }, { "call": "Time in seconds for DNS record caching (default: 60)", "key": "Time in seconds for DNS record caching (default: 60)", @@ -1459,7 +1516,7 @@ "call": "UDP (Unprotected DNS)", "key": "UDP (Unprotected DNS)", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:181", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245", "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:17" ] }, @@ -1467,7 +1524,7 @@ "call": "UDP over TCP", "key": "UDP over TCP", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:110" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:174" ] }, { @@ -1509,7 +1566,7 @@ "call": "URL must use one of the following protocols:", "key": "URL must use one of the following protocols:", "places": [ - "src/validators/validateUrl.ts:13" + "src/validators/validateUrl.ts:17" ] }, { @@ -1519,6 +1576,13 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:27" ] }, + { + "call": "URLTest Check Interval", + "key": "URLTest Check Interval", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:110" + ] + }, { "call": "URLTest Proxy Links", "key": "URLTest Proxy Links", @@ -1526,46 +1590,60 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:87" ] }, + { + "call": "URLTest Testing URL", + "key": "URLTest Testing URL", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:146" + ] + }, + { + "call": "URLTest Tolerance", + "key": "URLTest Tolerance", + "places": [ + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:123" + ] + }, { "call": "User Domain List Type", "key": "User Domain List Type", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:299" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:363" ] }, { "call": "User Domains", "key": "User Domains", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:311" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:375" ] }, { "call": "User Domains List", "key": "User Domains List", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:337" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:401" ] }, { "call": "User Subnet List Type", "key": "User Subnet List Type", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:379" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:443" ] }, { "call": "User Subnets", "key": "User Subnets", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:391" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:455" ] }, { "call": "User Subnets List", "key": "User Subnets List", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:417" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:481" ] }, { @@ -1583,7 +1661,7 @@ "src/validators/validateSocksUrl.ts:80", "src/validators/validateSubnet.ts:38", "src/validators/validateTrojanUrl.ts:59", - "src/validators/validateUrl.ts:16", + "src/validators/validateUrl.ts:28", "src/validators/validateVlessUrl.ts:108" ] }, @@ -1591,8 +1669,8 @@ "call": "Validation errors:", "key": "Validation errors:", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:370", - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:449" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:434", + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:513" ] }, { @@ -1614,14 +1692,14 @@ "call": "Warning: %s cannot be used together with %s. Previous selections have been removed.", "key": "Warning: %s cannot be used together with %s. Previous selections have been removed.", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:247" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:311" ] }, { "call": "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection.", "key": "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection.", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:266" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:330" ] }, { diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index 26b3d38..b5e418a 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-26 12:56+0200\n" -"PO-Revision-Date: 2025-10-26 12:56+0200\n" +"POT-Creation-Date: 2025-10-27 11:06+0200\n" +"PO-Revision-Date: 2025-10-27 11:06+0200\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -40,15 +40,15 @@ msgstr "" msgid "Additional marking rules found" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:175 msgid "Applicable for SOCKS and Shadowsocks proxy" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:356 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:420 msgid "At least one valid domain must be specified. Comments-only content is not allowed." msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:437 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:501 msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgstr "" @@ -115,7 +115,7 @@ msgstr "" msgid "Close" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:211 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:275 msgid "Community Lists" msgstr "" @@ -183,8 +183,8 @@ msgstr "" msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:302 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:382 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:366 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:446 msgid "Disabled" msgstr "" @@ -192,17 +192,17 @@ msgstr "" msgid "DNS on router" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:179 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:243 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:15 msgid "DNS over HTTPS (DoH)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:180 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:244 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:16 msgid "DNS over TLS (DoT)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:176 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:240 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:12 msgid "DNS Protocol Type" msgstr "" @@ -211,7 +211,7 @@ msgstr "" msgid "DNS Rewrite TTL" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:189 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:253 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:24 msgid "DNS Server" msgstr "" @@ -224,7 +224,7 @@ msgstr "" msgid "Do not panic, everything can be fixed, just..." msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:166 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:230 msgid "Domain Resolver" msgstr "" @@ -254,8 +254,8 @@ msgstr "" msgid "Downloading all lists via specific Proxy/VPN" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:303 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:383 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:367 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:447 msgid "Dynamic List" msgstr "" @@ -263,11 +263,11 @@ msgstr "" msgid "Enable autostart" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:167 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:231 msgid "Enable built-in DNS resolver for domains handled by this section" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:575 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:639 msgid "Enable Mixed Proxy" msgstr "" @@ -275,7 +275,7 @@ msgstr "" msgid "Enable Output Network Interface" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:576 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:640 msgid "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies" msgstr "" @@ -287,18 +287,34 @@ msgstr "" msgid "Enter complete outbound configuration in JSON format" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:338 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:402 msgid "Enter domain names separated by commas, spaces, or newlines. You can add comments using //" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:312 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:376 msgid "Enter domain names without protocols, e.g. example.com or sub.example.com" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:392 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:456 msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" msgstr "" +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:114 +msgid "Every 1 minute" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:115 +msgid "Every 3 minutes" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:113 +msgid "Every 30 seconds" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:116 +msgid "Every 5 minutes" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:365 msgid "Exclude NTP" msgstr "" @@ -321,11 +337,11 @@ msgid "Failed to execute!" msgstr "" #: src/podkop/methods/custom/getDashboardSections.ts:117 -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:58 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:59 msgid "Fastest" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:550 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:614 msgid "Fully Routed IPs" msgstr "" @@ -466,7 +482,8 @@ msgstr "" msgid "Invalid Trojan URL: parsing failed" msgstr "" -#: src/validators/validateUrl.ts:18 +#: src/validators/validateUrl.ts:8 +#: src/validators/validateUrl.ts:31 msgid "Invalid URL format" msgstr "" @@ -490,11 +507,11 @@ msgstr "" msgid "List Update Frequency" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:458 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:522 msgid "Local Domain Lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:481 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:545 msgid "Local Subnet Lists" msgstr "" @@ -506,7 +523,7 @@ msgstr "" msgid "Memory Usage" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:586 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:650 msgid "Mixed Proxy Port" msgstr "" @@ -514,7 +531,11 @@ msgstr "" msgid "Monitored Interfaces" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:120 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:140 +msgid "Must be a number in the range of 50 - 1000" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:184 msgid "Network Interface" msgstr "" @@ -526,9 +547,9 @@ msgstr "" msgid "Not implement yet" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:74 -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:80 -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:99 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:75 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:81 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:100 msgid "Not responding" msgstr "" @@ -608,15 +629,15 @@ msgstr "" msgid "Proxy traffic is routed via FakeIP" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:309 msgid "Regional options cannot be used together" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:504 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:568 msgid "Remote Domain Lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:527 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:591 msgid "Remote Subnet Lists" msgstr "" @@ -664,7 +685,7 @@ msgstr "" msgid "Run Diagnostic" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:264 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:328 msgid "Russia inside restrictions" msgstr "" @@ -672,7 +693,7 @@ msgstr "" msgid "Sections" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:212 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:276 msgid "Select a predefined list for routing" msgstr "" @@ -692,11 +713,11 @@ msgstr "" msgid "Select how to configure the proxy" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:121 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:185 msgid "Select network interface for VPN connection" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:190 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:254 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:25 msgid "Select or enter DNS server address" msgstr "" @@ -709,15 +730,15 @@ msgstr "" msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:177 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:241 msgid "Select the DNS protocol type for the domain resolver" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:300 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:364 msgid "Select the list type for adding custom domains" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:380 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:444 msgid "Select the list type for adding custom subnets" msgstr "" @@ -782,20 +803,20 @@ msgstr "" msgid "Specify a local IP address to be excluded from routing" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:551 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:615 msgid "Specify local IP addresses or subnets whose traffic will always be routed through the configured route" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:505 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:569 msgid "Specify remote URLs to download and use domain lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:528 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:592 msgid "Specify remote URLs to download and use subnet lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:459 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:482 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:523 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:546 msgid "Specify the path to the list file located on the router filesystem" msgstr "" @@ -827,11 +848,11 @@ msgstr "" msgid "Test latency" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:304 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:368 msgid "Text List" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:384 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:448 msgid "Text List (comma/space/newline separated)" msgstr "" @@ -839,6 +860,18 @@ msgstr "" msgid "The DNS server used to look up the IP address of an upstream DNS server" msgstr "" +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111 +msgid "The interval between connectivity tests" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:124 +msgid "The maximum difference in response times (ms) allowed when comparing servers" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:147 +msgid "The URL used to test server connectivity" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:69 msgid "Time in seconds for DNS record caching (default: 60)" msgstr "" @@ -863,12 +896,12 @@ msgstr "" msgid "TTL value cannot be empty" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:181 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:17 msgid "UDP (Unprotected DNS)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:110 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:174 msgid "UDP over TCP" msgstr "" @@ -895,7 +928,7 @@ msgstr "" msgid "URL must start with vless://, ss://, trojan://, or socks4/5://" msgstr "" -#: src/validators/validateUrl.ts:13 +#: src/validators/validateUrl.ts:17 msgid "URL must use one of the following protocols:" msgstr "" @@ -903,31 +936,43 @@ msgstr "" msgid "URLTest" msgstr "" +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:110 +msgid "URLTest Check Interval" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:87 msgid "URLTest Proxy Links" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:299 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:146 +msgid "URLTest Testing URL" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:123 +msgid "URLTest Tolerance" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:363 msgid "User Domain List Type" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:311 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:375 msgid "User Domains" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:337 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:401 msgid "User Domains List" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:379 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:443 msgid "User Subnet List Type" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:391 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:455 msgid "User Subnets" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:417 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:481 msgid "User Subnets List" msgstr "" @@ -942,13 +987,13 @@ msgstr "" #: src/validators/validateSocksUrl.ts:80 #: src/validators/validateSubnet.ts:38 #: src/validators/validateTrojanUrl.ts:59 -#: src/validators/validateUrl.ts:16 +#: src/validators/validateUrl.ts:28 #: src/validators/validateVlessUrl.ts:108 msgid "Valid" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:370 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:449 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:434 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:513 msgid "Validation errors:" msgstr "" @@ -961,11 +1006,11 @@ msgstr "" msgid "Visit Wiki" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:247 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:311 msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:266 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:330 msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection." msgstr "" diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index 13a5c41..9d9c038 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-26 14:56+0200\n" -"PO-Revision-Date: 2025-10-26 14:56+0200\n" +"POT-Creation-Date: 2025-10-27 13:06+0200\n" +"PO-Revision-Date: 2025-10-27 13:06+0200\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -218,6 +218,18 @@ msgstr "Введите доменные имена без протоколов, msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" msgstr "Введите подсети в нотации CIDR (например, 103.21.244.0/22) или отдельные IP-адреса" +msgid "Every 1 minute" +msgstr "Каждую минуту" + +msgid "Every 3 minutes" +msgstr "каждые 3 минуты" + +msgid "Every 30 seconds" +msgstr "Каждые 30 секунд" + +msgid "Every 5 minutes" +msgstr "Каждые 5 минут" + msgid "Exclude NTP" msgstr "Исключить NTP" @@ -374,6 +386,9 @@ msgstr "Порт смешанного прокси" msgid "Monitored Interfaces" msgstr "Наблюдаемые интерфейсы" +msgid "Must be a number in the range of 50 - 1000" +msgstr "Должно быть числом от 50 до 1000" + msgid "Network Interface" msgstr "Сетевой интерфейс" @@ -608,6 +623,15 @@ msgstr "Текстовый список (через запятую, пробел msgid "The DNS server used to look up the IP address of an upstream DNS server" msgstr "DNS-сервер, используемый для поиска IP-адреса вышестоящего DNS-сервера" +msgid "The interval between connectivity tests" +msgstr "Интервал между тестами подключения" + +msgid "The maximum difference in response times (ms) allowed when comparing servers" +msgstr "Максимально допустимая разница во времени отклика (мс) при сравнении серверов" + +msgid "The URL used to test server connectivity" +msgstr "URL-адрес, используемый для проверки подключения к серверу" + msgid "Time in seconds for DNS record caching (default: 60)" msgstr "Время в секундах для кэширования DNS записей (по умолчанию: 60)" @@ -650,9 +674,18 @@ msgstr "URL должен использовать один из следующи msgid "URLTest" msgstr "URLTest" +msgid "URLTest Check Interval" +msgstr "Интервал проверки URLTest" + msgid "URLTest Proxy Links" msgstr "Ссылки прокси для URLTest" +msgid "URLTest Testing URL" +msgstr "URLTest ссылка для проверки" + +msgid "URLTest Tolerance" +msgstr "URLTest допустимое отклонение" + msgid "User Domain List Type" msgstr "Тип пользовательского списка доменов" diff --git a/fe-app-podkop/src/validators/tests/validateUrl.test.js b/fe-app-podkop/src/validators/tests/validateUrl.test.js index 7d13833..f8ae3d6 100644 --- a/fe-app-podkop/src/validators/tests/validateUrl.test.js +++ b/fe-app-podkop/src/validators/tests/validateUrl.test.js @@ -16,6 +16,7 @@ const invalidUrls = [ ['Unsupported protocol (ftp)', 'ftp://example.com'], ['Unsupported protocol (ws)', 'ws://example.com'], ['Empty string', ''], + ['Without tld', 'https://google'], ]; describe('validateUrl', () => { diff --git a/fe-app-podkop/src/validators/validateUrl.ts b/fe-app-podkop/src/validators/validateUrl.ts index dd2c88e..417b4e7 100644 --- a/fe-app-podkop/src/validators/validateUrl.ts +++ b/fe-app-podkop/src/validators/validateUrl.ts @@ -2,19 +2,31 @@ import { ValidationResult } from './types'; export function validateUrl( url: string, - protocols: string[] = ['http:', 'https:'], + protocols = ['http:', 'https:'], ): ValidationResult { - try { - const parsedUrl = new URL(url); - - if (!protocols.includes(parsedUrl.protocol)) { - return { - valid: false, - message: `${_('URL must use one of the following protocols:')} ${protocols.join(', ')}`, - }; - } - return { valid: true, message: _('Valid') }; - } catch (_e) { + if (!url.length) { return { valid: false, message: _('Invalid URL format') }; } + + const hasValidProtocol = protocols.some((p) => url.indexOf(p + '//') === 0); + + if (!hasValidProtocol) + return { + valid: false, + message: + _('URL must use one of the following protocols:') + + ' ' + + protocols.join(', '), + }; + + const regex = new RegExp( + `^(?:${protocols.map((p) => p.replace(':', '')).join('|')})://` + + `(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}(?::\\d+)?(?:/[^\\s]*)?$`, + ); + + if (regex.test(url)) { + return { valid: true, message: _('Valid') }; + } + + return { valid: false, message: _('Invalid URL format') }; } diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index 1516752..d7b7ef1 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -58,18 +58,22 @@ function validateDNS(value) { // src/validators/validateUrl.ts function validateUrl(url, protocols = ["http:", "https:"]) { - try { - const parsedUrl = new URL(url); - if (!protocols.includes(parsedUrl.protocol)) { - return { - valid: false, - message: `${_("URL must use one of the following protocols:")} ${protocols.join(", ")}` - }; - } - return { valid: true, message: _("Valid") }; - } catch (_e) { + if (!url.length) { return { valid: false, message: _("Invalid URL format") }; } + const hasValidProtocol = protocols.some((p) => url.indexOf(p + "//") === 0); + if (!hasValidProtocol) + return { + valid: false, + message: _("URL must use one of the following protocols:") + " " + protocols.join(", ") + }; + const regex = new RegExp( + `^(?:${protocols.map((p) => p.replace(":", "")).join("|")})://(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}(?::\\d+)?(?:/[^\\s]*)?$` + ); + if (regex.test(url)) { + return { valid: true, message: _("Valid") }; + } + return { valid: false, message: _("Invalid URL format") }; } // src/validators/validatePath.ts diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js index 77067ac..cc38037 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js @@ -126,6 +126,19 @@ function createSectionContent(section) { o.default = "50" o.rmempty = false; o.depends("proxy_config_type", "urltest"); + o.validate = function (section_id, value) { + if (!value || value.length === 0) { + return true; + } + + const parsed = parseFloat(value); + + if (/^[0-9]+$/.test(value) && !isNaN(parsed) && isFinite(parsed) && parsed >= 50 && parsed <= 1000) { + return true; + } + + return _('Must be a number in the range of 50 - 1000'); + }; o = section.option( form.Value, @@ -141,6 +154,20 @@ function createSectionContent(section) { o.rmempty = false; o.depends("proxy_config_type", "urltest"); + o.validate = function (section_id, value) { + if (!value || value.length === 0) { + return true; + } + + const validation = main.validateUrl(value); + + if (validation.valid) { + return true; + } + + return validation.message; + }; + o = section.option( form.Flag, "enable_udp_over_tcp", diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 13a5c41..9d9c038 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-26 14:56+0200\n" -"PO-Revision-Date: 2025-10-26 14:56+0200\n" +"POT-Creation-Date: 2025-10-27 13:06+0200\n" +"PO-Revision-Date: 2025-10-27 13:06+0200\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -218,6 +218,18 @@ msgstr "Введите доменные имена без протоколов, msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" msgstr "Введите подсети в нотации CIDR (например, 103.21.244.0/22) или отдельные IP-адреса" +msgid "Every 1 minute" +msgstr "Каждую минуту" + +msgid "Every 3 minutes" +msgstr "каждые 3 минуты" + +msgid "Every 30 seconds" +msgstr "Каждые 30 секунд" + +msgid "Every 5 minutes" +msgstr "Каждые 5 минут" + msgid "Exclude NTP" msgstr "Исключить NTP" @@ -374,6 +386,9 @@ msgstr "Порт смешанного прокси" msgid "Monitored Interfaces" msgstr "Наблюдаемые интерфейсы" +msgid "Must be a number in the range of 50 - 1000" +msgstr "Должно быть числом от 50 до 1000" + msgid "Network Interface" msgstr "Сетевой интерфейс" @@ -608,6 +623,15 @@ msgstr "Текстовый список (через запятую, пробел msgid "The DNS server used to look up the IP address of an upstream DNS server" msgstr "DNS-сервер, используемый для поиска IP-адреса вышестоящего DNS-сервера" +msgid "The interval between connectivity tests" +msgstr "Интервал между тестами подключения" + +msgid "The maximum difference in response times (ms) allowed when comparing servers" +msgstr "Максимально допустимая разница во времени отклика (мс) при сравнении серверов" + +msgid "The URL used to test server connectivity" +msgstr "URL-адрес, используемый для проверки подключения к серверу" + msgid "Time in seconds for DNS record caching (default: 60)" msgstr "Время в секундах для кэширования DNS записей (по умолчанию: 60)" @@ -650,9 +674,18 @@ msgstr "URL должен использовать один из следующи msgid "URLTest" msgstr "URLTest" +msgid "URLTest Check Interval" +msgstr "Интервал проверки URLTest" + msgid "URLTest Proxy Links" msgstr "Ссылки прокси для URLTest" +msgid "URLTest Testing URL" +msgstr "URLTest ссылка для проверки" + +msgid "URLTest Tolerance" +msgstr "URLTest допустимое отклонение" + msgid "User Domain List Type" msgstr "Тип пользовательского списка доменов" diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index 26b3d38..b5e418a 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-26 12:56+0200\n" -"PO-Revision-Date: 2025-10-26 12:56+0200\n" +"POT-Creation-Date: 2025-10-27 11:06+0200\n" +"PO-Revision-Date: 2025-10-27 11:06+0200\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -40,15 +40,15 @@ msgstr "" msgid "Additional marking rules found" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:175 msgid "Applicable for SOCKS and Shadowsocks proxy" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:356 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:420 msgid "At least one valid domain must be specified. Comments-only content is not allowed." msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:437 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:501 msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgstr "" @@ -115,7 +115,7 @@ msgstr "" msgid "Close" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:211 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:275 msgid "Community Lists" msgstr "" @@ -183,8 +183,8 @@ msgstr "" msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:302 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:382 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:366 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:446 msgid "Disabled" msgstr "" @@ -192,17 +192,17 @@ msgstr "" msgid "DNS on router" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:179 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:243 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:15 msgid "DNS over HTTPS (DoH)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:180 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:244 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:16 msgid "DNS over TLS (DoT)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:176 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:240 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:12 msgid "DNS Protocol Type" msgstr "" @@ -211,7 +211,7 @@ msgstr "" msgid "DNS Rewrite TTL" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:189 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:253 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:24 msgid "DNS Server" msgstr "" @@ -224,7 +224,7 @@ msgstr "" msgid "Do not panic, everything can be fixed, just..." msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:166 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:230 msgid "Domain Resolver" msgstr "" @@ -254,8 +254,8 @@ msgstr "" msgid "Downloading all lists via specific Proxy/VPN" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:303 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:383 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:367 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:447 msgid "Dynamic List" msgstr "" @@ -263,11 +263,11 @@ msgstr "" msgid "Enable autostart" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:167 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:231 msgid "Enable built-in DNS resolver for domains handled by this section" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:575 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:639 msgid "Enable Mixed Proxy" msgstr "" @@ -275,7 +275,7 @@ msgstr "" msgid "Enable Output Network Interface" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:576 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:640 msgid "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies" msgstr "" @@ -287,18 +287,34 @@ msgstr "" msgid "Enter complete outbound configuration in JSON format" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:338 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:402 msgid "Enter domain names separated by commas, spaces, or newlines. You can add comments using //" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:312 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:376 msgid "Enter domain names without protocols, e.g. example.com or sub.example.com" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:392 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:456 msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" msgstr "" +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:114 +msgid "Every 1 minute" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:115 +msgid "Every 3 minutes" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:113 +msgid "Every 30 seconds" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:116 +msgid "Every 5 minutes" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:365 msgid "Exclude NTP" msgstr "" @@ -321,11 +337,11 @@ msgid "Failed to execute!" msgstr "" #: src/podkop/methods/custom/getDashboardSections.ts:117 -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:58 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:59 msgid "Fastest" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:550 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:614 msgid "Fully Routed IPs" msgstr "" @@ -466,7 +482,8 @@ msgstr "" msgid "Invalid Trojan URL: parsing failed" msgstr "" -#: src/validators/validateUrl.ts:18 +#: src/validators/validateUrl.ts:8 +#: src/validators/validateUrl.ts:31 msgid "Invalid URL format" msgstr "" @@ -490,11 +507,11 @@ msgstr "" msgid "List Update Frequency" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:458 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:522 msgid "Local Domain Lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:481 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:545 msgid "Local Subnet Lists" msgstr "" @@ -506,7 +523,7 @@ msgstr "" msgid "Memory Usage" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:586 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:650 msgid "Mixed Proxy Port" msgstr "" @@ -514,7 +531,11 @@ msgstr "" msgid "Monitored Interfaces" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:120 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:140 +msgid "Must be a number in the range of 50 - 1000" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:184 msgid "Network Interface" msgstr "" @@ -526,9 +547,9 @@ msgstr "" msgid "Not implement yet" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:74 -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:80 -#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:99 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:75 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:81 +#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:100 msgid "Not responding" msgstr "" @@ -608,15 +629,15 @@ msgstr "" msgid "Proxy traffic is routed via FakeIP" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:309 msgid "Regional options cannot be used together" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:504 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:568 msgid "Remote Domain Lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:527 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:591 msgid "Remote Subnet Lists" msgstr "" @@ -664,7 +685,7 @@ msgstr "" msgid "Run Diagnostic" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:264 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:328 msgid "Russia inside restrictions" msgstr "" @@ -672,7 +693,7 @@ msgstr "" msgid "Sections" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:212 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:276 msgid "Select a predefined list for routing" msgstr "" @@ -692,11 +713,11 @@ msgstr "" msgid "Select how to configure the proxy" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:121 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:185 msgid "Select network interface for VPN connection" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:190 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:254 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:25 msgid "Select or enter DNS server address" msgstr "" @@ -709,15 +730,15 @@ msgstr "" msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:177 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:241 msgid "Select the DNS protocol type for the domain resolver" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:300 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:364 msgid "Select the list type for adding custom domains" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:380 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:444 msgid "Select the list type for adding custom subnets" msgstr "" @@ -782,20 +803,20 @@ msgstr "" msgid "Specify a local IP address to be excluded from routing" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:551 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:615 msgid "Specify local IP addresses or subnets whose traffic will always be routed through the configured route" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:505 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:569 msgid "Specify remote URLs to download and use domain lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:528 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:592 msgid "Specify remote URLs to download and use subnet lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:459 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:482 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:523 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:546 msgid "Specify the path to the list file located on the router filesystem" msgstr "" @@ -827,11 +848,11 @@ msgstr "" msgid "Test latency" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:304 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:368 msgid "Text List" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:384 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:448 msgid "Text List (comma/space/newline separated)" msgstr "" @@ -839,6 +860,18 @@ msgstr "" msgid "The DNS server used to look up the IP address of an upstream DNS server" msgstr "" +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111 +msgid "The interval between connectivity tests" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:124 +msgid "The maximum difference in response times (ms) allowed when comparing servers" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:147 +msgid "The URL used to test server connectivity" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:69 msgid "Time in seconds for DNS record caching (default: 60)" msgstr "" @@ -863,12 +896,12 @@ msgstr "" msgid "TTL value cannot be empty" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:181 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:17 msgid "UDP (Unprotected DNS)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:110 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:174 msgid "UDP over TCP" msgstr "" @@ -895,7 +928,7 @@ msgstr "" msgid "URL must start with vless://, ss://, trojan://, or socks4/5://" msgstr "" -#: src/validators/validateUrl.ts:13 +#: src/validators/validateUrl.ts:17 msgid "URL must use one of the following protocols:" msgstr "" @@ -903,31 +936,43 @@ msgstr "" msgid "URLTest" msgstr "" +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:110 +msgid "URLTest Check Interval" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:87 msgid "URLTest Proxy Links" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:299 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:146 +msgid "URLTest Testing URL" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:123 +msgid "URLTest Tolerance" +msgstr "" + +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:363 msgid "User Domain List Type" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:311 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:375 msgid "User Domains" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:337 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:401 msgid "User Domains List" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:379 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:443 msgid "User Subnet List Type" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:391 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:455 msgid "User Subnets" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:417 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:481 msgid "User Subnets List" msgstr "" @@ -942,13 +987,13 @@ msgstr "" #: src/validators/validateSocksUrl.ts:80 #: src/validators/validateSubnet.ts:38 #: src/validators/validateTrojanUrl.ts:59 -#: src/validators/validateUrl.ts:16 +#: src/validators/validateUrl.ts:28 #: src/validators/validateVlessUrl.ts:108 msgid "Valid" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:370 -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:449 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:434 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:513 msgid "Validation errors:" msgstr "" @@ -961,11 +1006,11 @@ msgstr "" msgid "Visit Wiki" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:247 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:311 msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:266 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:330 msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection." msgstr "" From 675a6af89cdaf58b72f536b093b45fe98f84ba31 Mon Sep 17 00:00:00 2001 From: divocat Date: Mon, 27 Oct 2025 13:16:18 +0200 Subject: [PATCH 3/9] feat: simplify sb check displaying --- fe-app-podkop/locales/calls.json | 4 ++-- fe-app-podkop/locales/podkop.pot | 6 +++--- fe-app-podkop/locales/podkop.ru.po | 8 ++++---- .../src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts | 2 +- .../htdocs/luci-static/resources/view/podkop/main.js | 2 +- luci-app-podkop/po/ru/podkop.po | 8 ++++---- luci-app-podkop/po/templates/podkop.pot | 6 +++--- podkop/files/usr/bin/podkop | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/fe-app-podkop/locales/calls.json b/fe-app-podkop/locales/calls.json index b0a6200..fbaadad 100644 --- a/fe-app-podkop/locales/calls.json +++ b/fe-app-podkop/locales/calls.json @@ -1330,8 +1330,8 @@ ] }, { - "call": "Sing-box version >= 1.12.4", - "key": "Sing-box version >= 1.12.4", + "call": "Sing-box version is compatible (newer than 1.12.4)", + "key": "Sing-box version is compatible (newer than 1.12.4)", "places": [ "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:67" ] diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index b5e418a..f0f750a 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-27 11:06+0200\n" -"PO-Revision-Date: 2025-10-27 11:06+0200\n" +"POT-Creation-Date: 2025-10-27 11:15+0200\n" +"PO-Revision-Date: 2025-10-27 11:15+0200\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -792,7 +792,7 @@ msgid "Sing-box service exist" msgstr "" #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:67 -msgid "Sing-box version >= 1.12.4" +msgid "Sing-box version is compatible (newer than 1.12.4)" msgstr "" #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:89 diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index 9d9c038..cf50c38 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-27 13:06+0200\n" -"PO-Revision-Date: 2025-10-27 13:06+0200\n" +"POT-Creation-Date: 2025-10-27 13:15+0200\n" +"PO-Revision-Date: 2025-10-27 13:15+0200\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -572,8 +572,8 @@ msgstr "Процесс sing-box запущен" msgid "Sing-box service exist" msgstr "Сервис sing-box существует" -msgid "Sing-box version >= 1.12.4" -msgstr "Версия sing-box >= 1.12.4" +msgid "Sing-box version is compatible (newer than 1.12.4)" +msgstr "Версия Sing-box совместима (новее 1.12.4)" msgid "Source Network Interface" msgstr "Сетевой интерфейс источника" diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts index 28c7815..b13f0bc 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts @@ -64,7 +64,7 @@ export async function runSingBoxCheck() { }, { state: data.sing_box_version_ok ? 'success' : 'error', - key: _('Sing-box version >= 1.12.4'), + key: _('Sing-box version is compatible (newer than 1.12.4)'), value: '', }, { diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index d7b7ef1..21ec692 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -2509,7 +2509,7 @@ async function runSingBoxCheck() { }, { state: data.sing_box_version_ok ? "success" : "error", - key: _("Sing-box version >= 1.12.4"), + key: _("Sing-box version is compatible (newer than 1.12.4)"), value: "" }, { diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 9d9c038..cf50c38 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-27 13:06+0200\n" -"PO-Revision-Date: 2025-10-27 13:06+0200\n" +"POT-Creation-Date: 2025-10-27 13:15+0200\n" +"PO-Revision-Date: 2025-10-27 13:15+0200\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -572,8 +572,8 @@ msgstr "Процесс sing-box запущен" msgid "Sing-box service exist" msgstr "Сервис sing-box существует" -msgid "Sing-box version >= 1.12.4" -msgstr "Версия sing-box >= 1.12.4" +msgid "Sing-box version is compatible (newer than 1.12.4)" +msgstr "Версия Sing-box совместима (новее 1.12.4)" msgid "Source Network Interface" msgstr "Сетевой интерфейс источника" diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index b5e418a..f0f750a 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-27 11:06+0200\n" -"PO-Revision-Date: 2025-10-27 11:06+0200\n" +"POT-Creation-Date: 2025-10-27 11:15+0200\n" +"PO-Revision-Date: 2025-10-27 11:15+0200\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -792,7 +792,7 @@ msgid "Sing-box service exist" msgstr "" #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:67 -msgid "Sing-box version >= 1.12.4" +msgid "Sing-box version is compatible (newer than 1.12.4)" msgstr "" #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:89 diff --git a/podkop/files/usr/bin/podkop b/podkop/files/usr/bin/podkop index 2ef9a9e..0f4f2a4 100755 --- a/podkop/files/usr/bin/podkop +++ b/podkop/files/usr/bin/podkop @@ -2277,9 +2277,9 @@ global_check() { fi if [ "$sing_box_version_ok" -eq 1 ]; then - print_global "✅ Sing-box version >= 1.12.4" + print_global "✅ Sing-box version is compatible (newer than 1.12.4)" else - print_global "❌ Sing-box version >= 1.12.4" + print_global "❌ Sing-box version is not compatible (older than 1.12.4)" fi if [ "$sing_box_service_exist" -eq 1 ]; then From 01bff8ccfb6b7908d5c74c2d4ab585f0c392ce36 Mon Sep 17 00:00:00 2001 From: Andrey Petelin Date: Mon, 27 Oct 2025 16:21:51 +0500 Subject: [PATCH 4/9] chore: refine Russian translations for 'URLTest Testing URL' and 'URLTest Tolerance' --- luci-app-podkop/po/ru/podkop.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index cf50c38..85d3938 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -681,10 +681,10 @@ msgid "URLTest Proxy Links" msgstr "Ссылки прокси для URLTest" msgid "URLTest Testing URL" -msgstr "URLTest ссылка для проверки" +msgstr "URL для тестирования URLTest" msgid "URLTest Tolerance" -msgstr "URLTest допустимое отклонение" +msgstr "Порог переключения URLTest" msgid "User Domain List Type" msgstr "Тип пользовательского списка доменов" From 557e3666ebbb17178854ad98d7dc6ce46ad7b3f2 Mon Sep 17 00:00:00 2001 From: divocat Date: Mon, 27 Oct 2025 14:13:20 +0200 Subject: [PATCH 5/9] Update luci-app-podkop/po/ru/podkop.po Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- luci-app-podkop/po/ru/podkop.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 85d3938..468a438 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -222,7 +222,7 @@ msgid "Every 1 minute" msgstr "Каждую минуту" msgid "Every 3 minutes" -msgstr "каждые 3 минуты" +msgstr "Каждые 3 минуты" msgid "Every 30 seconds" msgstr "Каждые 30 секунд" From 68010ed5f79cbcc076ae0b442ba10c17d378dbf7 Mon Sep 17 00:00:00 2001 From: divocat Date: Mon, 27 Oct 2025 14:13:31 +0200 Subject: [PATCH 6/9] Update luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../htdocs/luci-static/resources/view/podkop/section.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js index cc38037..1d0ba53 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js @@ -149,7 +149,7 @@ function createSectionContent(section) { o.value("https://www.gstatic.com/generate_204", "https://www.gstatic.com/generate_204 (Google)"); o.value("https://cp.cloudflare.com/generate_204", "https://cp.cloudflare.com/generate_204 (Cloudflare)"); o.value("https://captive.apple.com", "https://captive.apple.com (Apple)"); - o.value("https://connectivity-check.ubuntu.com", " https://connectivity-check.ubuntu.com (Ubuntu)") + o.value("https://connectivity-check.ubuntu.com", "https://connectivity-check.ubuntu.com (Ubuntu)") o.default = "https://www.gstatic.com/generate_204" o.rmempty = false; o.depends("proxy_config_type", "urltest"); From 10d76177398a17a42219a6e4369e813e26ed4022 Mon Sep 17 00:00:00 2001 From: divocat Date: Mon, 27 Oct 2025 14:15:19 +0200 Subject: [PATCH 7/9] fix: run linter --- .../htdocs/luci-static/resources/view/podkop/section.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js index 1d0ba53..51f188c 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js @@ -114,7 +114,7 @@ function createSectionContent(section) { o.value("1m", _("Every 1 minute")); o.value("3m", _("Every 3 minutes")); o.value("5m", _("Every 5 minutes")); - o.default = "3m" + o.default = "3m"; o.depends("proxy_config_type", "urltest"); o = section.option( @@ -123,7 +123,7 @@ function createSectionContent(section) { _("URLTest Tolerance"), _("The maximum difference in response times (ms) allowed when comparing servers") ); - o.default = "50" + o.default = "50"; o.rmempty = false; o.depends("proxy_config_type", "urltest"); o.validate = function (section_id, value) { @@ -150,7 +150,7 @@ function createSectionContent(section) { o.value("https://cp.cloudflare.com/generate_204", "https://cp.cloudflare.com/generate_204 (Cloudflare)"); o.value("https://captive.apple.com", "https://captive.apple.com (Apple)"); o.value("https://connectivity-check.ubuntu.com", "https://connectivity-check.ubuntu.com (Ubuntu)") - o.default = "https://www.gstatic.com/generate_204" + o.default = "https://www.gstatic.com/generate_204"; o.rmempty = false; o.depends("proxy_config_type", "urltest"); From 8a3b41ec9ce1945cadcdb2b7a2a6155cc92314bb Mon Sep 17 00:00:00 2001 From: divocat Date: Mon, 27 Oct 2025 14:18:36 +0200 Subject: [PATCH 8/9] Update fe-app-podkop/locales/podkop.ru.po Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- fe-app-podkop/locales/podkop.ru.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index cf50c38..2dcda99 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -222,7 +222,7 @@ msgid "Every 1 minute" msgstr "Каждую минуту" msgid "Every 3 minutes" -msgstr "каждые 3 минуты" +msgstr "Каждые 3 минуты" msgid "Every 30 seconds" msgstr "Каждые 30 секунд" From 835cd859704da20153586d871d7f7810aa0eb8dc Mon Sep 17 00:00:00 2001 From: divocat Date: Mon, 27 Oct 2025 14:56:10 +0200 Subject: [PATCH 9/9] feat: increase timeouts for delays 2s->5s & 5s -> 10s --- fe-app-podkop/src/podkop/methods/shell/index.ts | 4 ++-- .../htdocs/luci-static/resources/view/podkop/main.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fe-app-podkop/src/podkop/methods/shell/index.ts b/fe-app-podkop/src/podkop/methods/shell/index.ts index e0d3475..e9c2940 100644 --- a/fe-app-podkop/src/podkop/methods/shell/index.ts +++ b/fe-app-podkop/src/podkop/methods/shell/index.ts @@ -31,12 +31,12 @@ export const PodkopShellMethods = { getClashApiProxyLatency: async (tag: string) => callBaseMethod( Podkop.AvailableMethods.CLASH_API, - [Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, tag], + [Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, tag, '5000'], ), getClashApiGroupLatency: async (tag: string) => callBaseMethod( Podkop.AvailableMethods.CLASH_API, - [Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, tag], + [Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, tag, '10000'], ), setClashApiGroupProxy: async (group: string, proxy: string) => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [ diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index 21ec692..c4b7ee7 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -561,11 +561,11 @@ var PodkopShellMethods = { ]), getClashApiProxyLatency: async (tag) => callBaseMethod( Podkop.AvailableMethods.CLASH_API, - [Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, tag] + [Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, tag, "5000"] ), getClashApiGroupLatency: async (tag) => callBaseMethod( Podkop.AvailableMethods.CLASH_API, - [Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, tag] + [Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, tag, "10000"] ), setClashApiGroupProxy: async (group, proxy) => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [ Podkop.AvailableClashAPIMethods.SET_GROUP_PROXY,