Compare commits

...

71 Commits

Author SHA1 Message Date
Kirill Sobakin
c045f8f224 Add grpc mode example from #259 2025-11-28 00:44:21 +03:00
Kirill Sobakin
b45088dad7 Merge pull request #259 from kokoc26/main
Feat: service_name for gRPC
2025-11-28 00:43:34 +03:00
Kokoc
eb9239696e feat: add support for optional gRPC service name in outbound transport configuration 2025-11-26 14:52:13 +03:00
Kirill Sobakin
5b3421498e Merge pull request #258 from itdoginfo/refactor/dnsmasq
Refactor/dnsmasq
2025-11-26 14:14:02 +03:00
Andrey Petelin
6a48a060e1 refactor: remove sing-box start exit check 2025-11-26 16:01:41 +05:00
Andrey Petelin
14f704fcb8 fix: use echolog for sing-box start failure 2025-11-26 15:47:12 +05:00
Andrey Petelin
ff43f477e9 chore: restore shutdown_correctly logic 2025-11-26 14:14:27 +05:00
Andrey Petelin
576e58fd17 chore: restore start_main and stop_main; have reload call them instead of full start/stop 2025-11-26 13:56:10 +05:00
Andrey Petelin
7a497f1e31 fix: reload PODKOP_CONFIG after uci commit to refresh config on shutdown 2025-11-25 17:05:25 +05:00
Andrey Petelin
d52f6e26ae refactor: add configurable DNS/curl timeouts and retries, detect service proxy, and improve connection checks 2025-11-25 17:04:31 +05:00
Andrey Petelin
68c61aed50 refactor: use uci wrappers 2025-11-25 14:10:18 +05:00
Andrey Petelin
626ac981eb refactor: configuring dnsmasq after starting sing-box 2025-11-25 13:53:24 +05:00
Kirill Sobakin
352d10a047 Fix: HY2 links 2025-11-25 11:32:50 +03:00
Kirill Sobakin
031c419ffb Merge pull request #252 from itdoginfo/fix/argument-list-too-long
jq: Argument list too long
2025-11-24 18:13:43 +03:00
Kirill Sobakin
c13fdf5785 HY2 examples 2025-11-24 18:05:40 +03:00
Andrey Petelin
1b7ab606ba refactor: unify source ruleset preparation and list handlers; make ruleset creation idempotent and atomic updates 2025-11-21 20:37:19 +05:00
Andrey Petelin
2bf208ecac fix: import remote plain domain and subnet lists using chunked processing 2025-11-16 13:21:51 +05:00
Andrey Petelin
e256e4bee5 chore: shorten Text List option label by removing the detailed format hint 2025-11-16 09:56:12 +05:00
Andrey Petelin
32c385b309 fix: load large plain domain/subnet lists in chunks; move ruleset logic to rulesets.sh and nft chunker to nft.sh 2025-11-16 09:55:44 +05:00
Kirill Sobakin
56829c74c8 Merge pull request #246 from itdoginfo/fix/listening_address 2025-11-10 12:58:10 +03:00
Andrey Petelin
9d78cd2ce4 style: add missing semicolons to o.depends calls in luci-app-podkop settings.js 2025-11-06 21:20:05 +05:00
Andrey Petelin
d9ce3b361e chore: correct typo "spedifying" to "specifying" in REST API secret comment 2025-11-06 21:18:15 +05:00
divocat
c67aadf267 feat: add yacd_secret_key support for ws 2025-11-06 16:52:08 +02:00
divocat
ac4d7570f3 feat: add translations for new keys 2025-11-06 16:20:35 +02:00
Andrey Petelin
86897fd0af fix: bind mixed proxy and Clash API to service IP (no 0.0.0.0); add YACD WAN toggle and secret key 2025-11-06 16:33:03 +05:00
Andrey Petelin
230ffbce46 feat: Add optional secret for RESTful API to experimental.clash_api config 2025-11-06 16:30:42 +05:00
Kirill Sobakin
dd5ddd1a14 Merge pull request #240 from itdoginfo/fix/long-nft-command
Import large subnet lists in chunks into nft sets
2025-10-30 16:01:14 +03:00
Andrey Petelin
cc947f9734 fix: import large subnet lists in chunks into nft sets 2025-10-30 14:07:12 +05:00
Kirill Sobakin
f8510cd828 Merge pull request #239 from itdoginfo/fix/crlf-clean
BUG: Clearing CRLF from SRS files
2025-10-29 21:15:47 +03:00
Andrey Petelin
23cbe7be4a fix: include filename in log and remove temp file on CRLF-to-LF conversion 2025-10-29 22:11:29 +05:00
Andrey Petelin
f168fb7e31 refactor: fetch remote JSON to temp files and parse ip_cidr into subnets; remove download_to_stream 2025-10-29 21:52:44 +05:00
Andrey Petelin
fe84b3154f fix: convert Windows CRLF line endings to LF for downloaded files 2025-10-29 21:36:46 +05:00
Kirill Sobakin
d09fdc0b95 Merge pull request #235 from itdoginfo/feat/urltest
feat/urltest
2025-10-27 16:07:13 +03:00
divocat
835cd85970 feat: increase timeouts for delays 2s->5s & 5s -> 10s 2025-10-27 14:56:10 +02:00
divocat
8a3b41ec9c Update fe-app-podkop/locales/podkop.ru.po
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-27 14:18:36 +02:00
divocat
10d7617739 fix: run linter 2025-10-27 14:15:19 +02:00
divocat
68010ed5f7 Update luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-27 14:13:31 +02:00
divocat
557e3666eb Update luci-app-podkop/po/ru/podkop.po
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-27 14:13:20 +02:00
Andrey Petelin
01bff8ccfb chore: refine Russian translations for 'URLTest Testing URL' and 'URLTest Tolerance' 2025-10-27 16:21:51 +05:00
divocat
675a6af89c feat: simplify sb check displaying 2025-10-27 13:16:18 +02:00
divocat
f1a6ff3469 feat: add validations & translations 2025-10-27 13:06:33 +02:00
Andrey Petelin
d4b3377d68 feat: add URLTest check interval, tolerance and testing URL options and wire them into outbound config generation 2025-10-27 15:17:20 +05:00
Kirill Sobakin
d2ef640d76 Merge pull request #233 from itdoginfo/feat/add_display_name
feat: replace outbound code with display name
2025-10-27 12:08:04 +03:00
divocat
47457f2c27 feat: replace outbound code with display name 2025-10-26 16:07:28 +02:00
Kirill Sobakin
8a29e176f2 Merge pull request #232 from itdoginfo/fix/change_json_outbound_validation
small pack of fixes
2025-10-26 16:07:47 +03:00
divocat
9653310208 fix: update locales && possible fix of incorrect outdated 2025-10-26 14:58:09 +02:00
divocat
3540610c78 fix: potential fix of structuredClone for old browsers 2025-10-26 14:52:08 +02:00
divocat
fb54d62a7f feat: actualize json outbound validation 2025-10-26 14:46:39 +02:00
Kirill Sobakin
288b8d4cc2 Merge pull request #230 from itdoginfo/feat/diagnostic-outbound-check
Add outbound check to diagnostic
2025-10-26 09:27:09 +03:00
divocat
e014396ae2 feat: extend selector checks displaying 2025-10-26 01:37:17 +03:00
divocat
694e4ca35a fix: remove extra console log 2025-10-26 01:10:33 +03:00
divocat
788c539e16 feat: add outbounds checks to diagnostics 2025-10-26 01:09:24 +03:00
Kirill Sobakin
743cba8936 Merge pull request #229 from itdoginfo/fix/show-config
Fix masked config
2025-10-25 17:38:45 +03:00
Andrey Petelin
d1d703764c fix: mask outbound_json block and DNS/domain_resolver addresses in podkop config output 2025-10-25 19:27:01 +05:00
Kirill Sobakin
2efd415305 Merge pull request #226 from itdoginfo/fix/excluded_ips
Routing Excluded IPs
2025-10-24 15:34:57 +03:00
Andrey Petelin
407b19b3ed fix: read routing_excluded_ips as non-boolean string with config_get instead of config_get_bool 2025-10-24 17:32:35 +05:00
Kirill Sobakin
c3fac995d5 Merge pull request #224 from itdoginfo/feat/fe-improvements
Some FE improvements
2025-10-23 21:12:03 +03:00
divocat
21ecfbbeca fix: correct types on ru translations 2025-10-23 20:43:46 +03:00
divocat
2918487845 feat: add custom port support to dns 2025-10-23 20:33:18 +03:00
divocat
ac258c53c0 fix: alert displaying 2025-10-23 20:05:55 +03:00
divocat
9a389c47bf fix: actualize locales 2025-10-23 20:02:49 +03:00
divocat
7cd70468c5 feat: add wiki disclaimer to diagnostics 2025-10-23 20:00:55 +03:00
divocat
13d27dab21 feat: add toast when shell exec failed 2025-10-23 19:08:27 +03:00
divocat
9f8f032dce feat: increase shell timeout to 15s 2025-10-23 19:01:06 +03:00
divocat
8301f4c271 feat: update checks displaying 2025-10-23 18:59:23 +03:00
divocat
c4078c8242 feat: update some translations 2025-10-23 18:35:34 +03:00
Kirill Sobakin
e0d149f03a fix 2025-10-23 16:39:41 +03:00
Kirill Sobakin
0f77867ca2 Merge pull request #223 from itdoginfo/fix/version-check
fix: correct versions comparison
2025-10-23 16:21:01 +03:00
divocat
fb5ae9c1e8 fix: correct versions comparison 2025-10-23 16:19:13 +03:00
Kirill Sobakin
9e9bd5a2bd fix: some fixes 2025-10-23 16:15:08 +03:00
Kirill Sobakin
005574a01f feat: rm tiny 2025-10-23 16:14:44 +03:00
49 changed files with 2550 additions and 1429 deletions

View File

@@ -34,6 +34,7 @@ vless://4d21ce62-8723-4c4d-93e3-d586b107aa40@127.0.0.1:51394?type=ws&encryption=
# gRPC # gRPC
vless://974b39e3-f7bf-42b9-933c-16699c635e77@127.0.0.1:15633?type=grpc&encryption=none&serviceName=TunService&authority=&security=none#vless-gRPC-none vless://974b39e3-f7bf-42b9-933c-16699c635e77@127.0.0.1:15633?type=grpc&encryption=none&serviceName=TunService&authority=&security=none#vless-gRPC-none
vless://651e7eca-5152-46f1-baf2-d502e0af7b27@127.0.0.1:28535?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=reality&pbk=nhZ7NiKfcqESa5ZeBFfsq9o18W-OWOAHLln9UmuVXSk&fp=chrome&sni=google.com&sid=11cbaeaa&spx=%2F#vless-gRPC-reality vless://651e7eca-5152-46f1-baf2-d502e0af7b27@127.0.0.1:28535?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=reality&pbk=nhZ7NiKfcqESa5ZeBFfsq9o18W-OWOAHLln9UmuVXSk&fp=chrome&sni=google.com&sid=11cbaeaa&spx=%2F#vless-gRPC-reality
vless://221ff905-b783-41a0-a6a6-8089eaf3b34b@abc.def.xyz:443?security=reality&type=grpc&headerType=&authority=abc.def.xyz&serviceName=name&mode=gun&sni=abc.def.xyz&fp=chrome&pbk=C3nhDJw02ZU_rjx4GbC54Sp79-ysF5lWIQVWdY4FOnE&sid=#vless-gRPC-reality-mode
vless://af1f8b5f-26c9-4fe8-8ce7-6d6366c5c9ce@127.0.0.1:47904?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=tls&fp=chrome&alpn=h2%2Chttp%2F1.1&sni=google.com#vless-gRPC-tls vless://af1f8b5f-26c9-4fe8-8ce7-6d6366c5c9ce@127.0.0.1:47904?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=tls&fp=chrome&alpn=h2%2Chttp%2F1.1&sni=google.com#vless-gRPC-tls
vless://95f2c4bb-abcb-47ba-bfad-e181c03e4659@127.0.0.1:34530?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=tls&fp=chrome&alpn=h2%2Chttp%2F1.1&allowInsecure=1&sni=google.com#vless-gRPC-tls-insecure vless://95f2c4bb-abcb-47ba-bfad-e181c03e4659@127.0.0.1:34530?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=tls&fp=chrome&alpn=h2%2Chttp%2F1.1&allowInsecure=1&sni=google.com#vless-gRPC-tls-insecure
vless://bd39490f-9a4f-49b2-96b6-824190cf89e9@127.0.0.1:27779?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=tls&fp=chrome&alpn=h2%2Chttp%2F1.1&sni=google.com&ech=AF3%2BDQBZAAAgACBc%2FiNdo4QkTt9eQCQgkOiJVSfA9G6UWAyipaBFtBD%2FVQAkAAEAAQABAAIAAQADAAIAAQACAAIAAgADAAMAAQADAAIAAwADAApnb29nbGUuY29tAAA%3D#vless-gRPC-tls-ech vless://bd39490f-9a4f-49b2-96b6-824190cf89e9@127.0.0.1:27779?type=grpc&encryption=none&serviceName=TunService&authority=authority&security=tls&fp=chrome&alpn=h2%2Chttp%2F1.1&sni=google.com&ech=AF3%2BDQBZAAAgACBc%2FiNdo4QkTt9eQCQgkOiJVSfA9G6UWAyipaBFtBD%2FVQAkAAEAAQABAAIAAQADAAIAAQACAAIAAgADAAMAAQADAAIAAwADAApnb29nbGUuY29tAAA%3D#vless-gRPC-tls-ech
@@ -82,3 +83,37 @@ trojan://ou8pLSyx9N@127.0.0.1:17737?type=httpupgrade&path=%2Fhttpupgradepath&hos
# XHTTP # XHTTP
trojan://VEetltxLtw@127.0.0.1:59072?type=xhttp&path=%2Fxhttppath&host=google.com&mode=auto&security=none#trojan-xhttp trojan://VEetltxLtw@127.0.0.1:59072?type=xhttp&path=%2Fxhttppath&host=google.com&mode=auto&security=none#trojan-xhttp
``` ```
## Hysteria2
hysteria2://
```
# With password
hysteria2://password@example.com:443/#hysteria2-password
hysteria2://password@example.com:443/?insecure=1#hysteria2-password-insecure
# With SNI
hysteria2://password@example.com:443/?sni=example.com#hysteria2-password-sni
# With obfuscation
hysteria2://password@example.com:443/?obfs=salamander&obfs-password=obfspassword#hysteria2-obfs
# All parameters combined
hysteria2://mypassword@example.com:8443/?sni=example.com&obfs=salamander&obfs-password=obfspass&insecure=1#hysteria2-all-params
```
hy2://
```
# With password
hy2://password@example.com:443/#hysteria2-password
hy2://password@example.com:443/?insecure=1#hysteria2-password-insecure
# With SNI
hy2://password@example.com:443/?sni=example.com#hysteria2-password-sni
# With obfuscation
hy2://password@example.com:443/?obfs=salamander&obfs-password=obfspassword#hysteria2-obfs
# All parameters combined
hy2://mypassword@example.com:8443/?sni=example.com&obfs=salamander&obfs-password=obfspass&insecure=1#hysteria2-all-params
```

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PODKOP\n" "Project-Id-Version: PODKOP\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-21 20:02+0300\n" "POT-Creation-Date: 2025-11-06 14:19+0200\n"
"PO-Revision-Date: 2025-10-21 20:02+0300\n" "PO-Revision-Date: 2025-11-06 14:19+0200\n"
"Last-Translator: divocat <divocatt@gmail.com>\n" "Last-Translator: divocat <divocatt@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
@@ -36,23 +36,31 @@ msgstr ""
msgid "Active Connections" msgid "Active Connections"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:117 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:106
msgid "Additional marking rules found" msgid "Additional marking rules found"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:247
msgid "Allows access to YACD from the WAN. Make sure to open the appropriate port in your firewall."
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:175
msgid "Applicable for SOCKS and Shadowsocks proxy" msgid "Applicable for SOCKS and Shadowsocks proxy"
msgstr "" 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." msgid "At least one valid domain must be specified. Comments-only content is not allowed."
msgstr "" 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." msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed."
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:43
msgid "Available actions"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:65
msgid "Bootsrap DNS" msgid "Bootsrap DNS"
msgstr "" msgstr ""
@@ -60,48 +68,47 @@ msgstr ""
msgid "Bootstrap DNS server" msgid "Bootstrap DNS server"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:81 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:58
msgid "Browser is not using FakeIP" msgid "Browser is not using FakeIP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:80 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57
msgid "Browser is using FakeIP correctly" msgid "Browser is using FakeIP correctly"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:322 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:348
msgid "Cache File Path" msgid "Cache File Path"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:336 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:362
msgid "Cache file path cannot be empty" msgid "Cache file path cannot be empty"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:26 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:27
msgid "Cannot receive DNS checks result" #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:28
#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:27
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:25
msgid "Cannot receive checks result"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:27 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:15
msgid "Cannot receive nftables checks result" #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:15
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:13
#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:15
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:13
msgid "Checking, please wait"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:24 #: src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts:2
msgid "Cannot receive Sing-box checks result" msgid "checks"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:14 #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:26
msgid "Checking dns, please wait" msgid "Checks failed"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:14 #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13
msgid "Checking FakeIP, please wait" msgid "Checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:12
msgid "Checking nftables, please wait"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:12
msgid "Checking sing-box, please wait"
msgstr "" msgstr ""
#: src/validators/validateSubnet.ts:33 #: src/validators/validateSubnet.ts:33
@@ -112,11 +119,11 @@ msgstr ""
msgid "Close" msgid "Close"
msgstr "" 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" msgid "Community Lists"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:309 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:335
msgid "Config File Path" msgid "Config File Path"
msgstr "" msgstr ""
@@ -152,15 +159,15 @@ msgstr ""
msgid "Dashboard currently unavailable" msgid "Dashboard currently unavailable"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:215 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222
msgid "Delay in milliseconds before reloading podkop after interface UP" msgid "Delay in milliseconds before reloading podkop after interface UP"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:229
msgid "Delay value cannot be empty" msgid "Delay value cannot be empty"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:89 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:82
msgid "DHCP has DNS server" msgid "DHCP has DNS server"
msgstr "" msgstr ""
@@ -172,42 +179,34 @@ msgstr ""
msgid "Disable autostart" msgid "Disable autostart"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:239 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:265
msgid "Disable QUIC" msgid "Disable QUIC"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:240 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:266
msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming" msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:302 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:366
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:382 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:446
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:14 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:77
msgid "DNS checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:64
msgid "DNS checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:84
msgid "DNS on router" msgid "DNS on router"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:15
msgid "DNS over HTTPS (DoH)" msgid "DNS over HTTPS (DoH)"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:16
msgid "DNS over TLS (DoT)" msgid "DNS over TLS (DoT)"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:12
msgid "DNS Protocol Type" msgid "DNS Protocol Type"
msgstr "" msgstr ""
@@ -216,7 +215,7 @@ msgstr ""
msgid "DNS Rewrite TTL" msgid "DNS Rewrite TTL"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:24
msgid "DNS Server" msgid "DNS Server"
msgstr "" msgstr ""
@@ -225,11 +224,15 @@ msgstr ""
msgid "DNS server address cannot be empty" msgid "DNS server address cannot be empty"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:166 #: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:26
msgid "Do not panic, everything can be fixed, just..."
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:230
msgid "Domain Resolver" msgid "Domain Resolver"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:300 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:326
msgid "Dont Touch My DHCP!" msgid "Dont Touch My DHCP!"
msgstr "" msgstr ""
@@ -242,24 +245,21 @@ msgstr ""
msgid "Download" msgid "Download"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:262 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:288
msgid "Download Lists via Proxy/VPN" msgid "Download Lists via Proxy/VPN"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:271 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:297
msgid "Download Lists via specific proxy section" msgid "Download Lists via specific proxy section"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:263 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:289
msgid "Downloading all lists via main Proxy/VPN" #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:298
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:272
msgid "Downloading all lists via specific Proxy/VPN" msgid "Downloading all lists via specific Proxy/VPN"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:303 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:367
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:383 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:447
msgid "Dynamic List" msgid "Dynamic List"
msgstr "" msgstr ""
@@ -267,11 +267,11 @@ msgstr ""
msgid "Enable autostart" msgid "Enable autostart"
msgstr "" 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" msgid "Enable built-in DNS resolver for domains handled by this section"
msgstr "" 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" msgid "Enable Mixed Proxy"
msgstr "" msgstr ""
@@ -279,35 +279,55 @@ msgstr ""
msgid "Enable Output Network Interface" msgid "Enable Output Network Interface"
msgstr "" 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" msgid "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:230 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:237
msgid "Enable YACD" msgid "Enable YACD"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:246
msgid "Enable YACD WAN Access"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:65 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:65
msgid "Enter complete outbound configuration in JSON format" msgid "Enter complete outbound configuration in JSON format"
msgstr "" 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 //" msgid "Enter domain names separated by commas, spaces, or newlines. You can add comments using //"
msgstr "" 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" msgid "Enter domain names without protocols, e.g. example.com or sub.example.com"
msgstr "" 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" msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:358 #: ../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:384
msgid "Exclude NTP" msgid "Exclude NTP"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:359 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:385
msgid "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN" msgid "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN"
msgstr "" msgstr ""
@@ -315,27 +335,21 @@ msgstr ""
msgid "Failed to copy!" msgid "Failed to copy!"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:29 #: src/podkop/tabs/diagnostic/initController.ts:227
msgid "FakeIP checks" #: src/podkop/tabs/diagnostic/initController.ts:231
msgstr "" #: src/podkop/tabs/diagnostic/initController.ts:261
#: src/podkop/tabs/diagnostic/initController.ts:265
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57 #: src/podkop/tabs/diagnostic/initController.ts:299
msgid "FakeIP checks failed" #: src/podkop/tabs/diagnostic/initController.ts:303
msgstr "" msgid "Failed to execute!"
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51
msgid "FakeIP checks partially passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:44
msgid "FakeIP checks passed"
msgstr "" msgstr ""
#: src/podkop/methods/custom/getDashboardSections.ts:117 #: src/podkop/methods/custom/getDashboardSections.ts:117
#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:59
msgid "Fastest" msgid "Fastest"
msgstr "" 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" msgid "Fully Routed IPs"
msgstr "" msgstr ""
@@ -343,7 +357,7 @@ msgstr ""
msgid "Get global check" msgid "Get global check"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:218 #: src/podkop/tabs/diagnostic/initController.ts:222
msgid "Global check" msgid "Global check"
msgstr "" msgstr ""
@@ -351,19 +365,19 @@ msgstr ""
msgid "HTTP error" msgid "HTTP error"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:182 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:189
msgid "Interface Monitoring" msgid "Interface Monitoring"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:214 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:221
msgid "Interface Monitoring Delay" msgid "Interface Monitoring Delay"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:183 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:190
msgid "Interface monitoring for Bad WAN" msgid "Interface monitoring for Bad WAN"
msgstr "" msgstr ""
#: src/validators/validateDns.ts:20 #: src/validators/validateDns.ts:23
msgid "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH" msgid "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH"
msgstr "" msgstr ""
@@ -380,7 +394,7 @@ msgstr ""
msgid "Invalid IP address" msgid "Invalid IP address"
msgstr "" msgstr ""
#: src/validators/validateOutboundJson.ts:19 #: src/validators/validateOutboundJson.ts:9
msgid "Invalid JSON format" msgid "Invalid JSON format"
msgstr "" msgstr ""
@@ -476,11 +490,12 @@ msgstr ""
msgid "Invalid Trojan URL: parsing failed" msgid "Invalid Trojan URL: parsing failed"
msgstr "" msgstr ""
#: src/validators/validateUrl.ts:18 #: src/validators/validateUrl.ts:8
#: src/validators/validateUrl.ts:31
msgid "Invalid URL format" msgid "Invalid URL format"
msgstr "" msgstr ""
#: src/validators/validateVlessUrl.ts:109 #: src/validators/validateVlessUrl.ts:110
msgid "Invalid VLESS URL: parsing failed" msgid "Invalid VLESS URL: parsing failed"
msgstr "" msgstr ""
@@ -488,23 +503,27 @@ msgstr ""
msgid "IP address 0.0.0.0 is not allowed" msgid "IP address 0.0.0.0 is not allowed"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:404 #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20
msgid "Issues detected"
msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:453
msgid "Latest" msgid "Latest"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:250 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:276
msgid "List Update Frequency" msgid "List Update Frequency"
msgstr "" 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" msgid "Local Domain Lists"
msgstr "" 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" msgid "Local Subnet Lists"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:79 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72
msgid "Main DNS" msgid "Main DNS"
msgstr "" msgstr ""
@@ -512,31 +531,23 @@ msgstr ""
msgid "Memory Usage" msgid "Memory Usage"
msgstr "" 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" msgid "Mixed Proxy Port"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:191 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:198
msgid "Monitored Interfaces" msgid "Monitored Interfaces"
msgstr "" 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" msgid "Network Interface"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:24 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105
msgid "Nftables checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:75
msgid "Nftables checks partially passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74
msgid "Nftables checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:116
msgid "No other marking rules found" msgid "No other marking rules found"
msgstr "" msgstr ""
@@ -544,10 +555,17 @@ msgstr ""
msgid "Not implement yet" msgid "Not implement yet"
msgstr "" msgstr ""
#: 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 ""
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:55 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:55
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:63 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:63
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:71 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:71
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:79 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:79
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:87
msgid "Not running" msgid "Not running"
msgstr "" msgstr ""
@@ -563,11 +581,7 @@ msgstr ""
msgid "Outbound Configuration" msgid "Outbound Configuration"
msgstr "" msgstr ""
#: src/validators/validateOutboundJson.ts:11 #: src/podkop/tabs/diagnostic/initController.ts:443
msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields"
msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:394
msgid "Outdated" msgid "Outdated"
msgstr "" msgstr ""
@@ -579,18 +593,26 @@ msgstr ""
msgid "Path cannot be empty" msgid "Path cannot be empty"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:340 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:366
msgid "Path must be absolute (start with /)" msgid "Path must be absolute (start with /)"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:349 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:375
msgid "Path must contain at least one directory (like /tmp/cache.db)" msgid "Path must contain at least one directory (like /tmp/cache.db)"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:344 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:370
msgid "Path must end with cache.db" msgid "Path must end with cache.db"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:127
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:135
msgid "Pending"
msgstr ""
#: src/podkop/tabs/dashboard/initController.ts:340 #: src/podkop/tabs/dashboard/initController.ts:340
msgid "Podkop" msgid "Podkop"
msgstr "" msgstr ""
@@ -599,7 +621,7 @@ msgstr ""
msgid "Podkop Settings" msgid "Podkop Settings"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:301 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:327
msgid "Podkop will not modify your DHCP configuration" msgid "Podkop will not modify your DHCP configuration"
msgstr "" msgstr ""
@@ -607,30 +629,23 @@ msgstr ""
msgid "Proxy Configuration URL" msgid "Proxy Configuration URL"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:89 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:66
msgid "Proxy traffic is not routed via FakeIP" msgid "Proxy traffic is not routed via FakeIP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:88 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:65
msgid "Proxy traffic is routed via FakeIP" msgid "Proxy traffic is routed via FakeIP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:95 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:309
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119
msgid "Queued"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245
msgid "Regional options cannot be used together" msgid "Regional options cannot be used together"
msgstr "" 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" msgid "Remote Domain Lists"
msgstr "" 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" msgid "Remote Subnet Lists"
msgstr "" msgstr ""
@@ -638,39 +653,39 @@ msgstr ""
msgid "Restart podkop" msgid "Restart podkop"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:74 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51
msgid "Router DNS is not routed through sing-box" msgid "Router DNS is not routed through sing-box"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:73 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:50
msgid "Router DNS is routed through sing-box" msgid "Router DNS is routed through sing-box"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:369 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:395
msgid "Routing Excluded IPs" msgid "Routing Excluded IPs"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:90 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:79
msgid "Rules mangle counters" msgid "Rules mangle counters"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:85 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74
msgid "Rules mangle exist" msgid "Rules mangle exist"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:100 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:89
msgid "Rules mangle output counters" msgid "Rules mangle output counters"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:95 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:84
msgid "Rules mangle output exist" msgid "Rules mangle output exist"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:110 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:99
msgid "Rules proxy counters" msgid "Rules proxy counters"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:94
msgid "Rules proxy exist" msgid "Rules proxy exist"
msgstr "" msgstr ""
@@ -678,15 +693,19 @@ msgstr ""
msgid "Run Diagnostic" msgid "Run Diagnostic"
msgstr "" 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" msgid "Russia inside restrictions"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:257
msgid "Secret key for authenticating remote access to YACD when WAN access is enabled."
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:36 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:36
msgid "Sections" msgid "Sections"
msgstr "" 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" msgid "Select a predefined list for routing"
msgstr "" msgstr ""
@@ -698,7 +717,7 @@ msgstr ""
msgid "Select DNS protocol to use" msgid "Select DNS protocol to use"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:251 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:277
msgid "Select how often the domain or subnet lists are updated automatically" msgid "Select how often the domain or subnet lists are updated automatically"
msgstr "" msgstr ""
@@ -706,32 +725,32 @@ msgstr ""
msgid "Select how to configure the proxy" msgid "Select how to configure the proxy"
msgstr "" 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" msgid "Select network interface for VPN connection"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:25
msgid "Select or enter DNS server address" msgid "Select or enter DNS server address"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:323 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:349
msgid "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing" msgid "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:310 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:336
msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing" msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing"
msgstr "" 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" msgid "Select the DNS protocol type for the domain resolver"
msgstr "" 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" msgid "Select the list type for adding custom domains"
msgstr "" 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" msgid "Select the list type for adding custom subnets"
msgstr "" msgstr ""
@@ -743,7 +762,7 @@ msgstr ""
msgid "Select the network interface to which the traffic will originate" msgid "Select the network interface to which the traffic will originate"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:192 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:199
msgid "Select the WAN interfaces to be monitored" msgid "Select the WAN interfaces to be monitored"
msgstr "" msgstr ""
@@ -755,7 +774,7 @@ msgstr ""
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:278 #: src/podkop/tabs/diagnostic/initController.ts:290
#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116
msgid "Show sing-box config" msgid "Show sing-box config"
msgstr "" msgstr ""
@@ -764,60 +783,52 @@ msgstr ""
msgid "Sing-box" msgid "Sing-box"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:86 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:77
msgid "Sing-box autostart disabled" msgid "Sing-box autostart disabled"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:19 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:62
msgid "Sing-box checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:66
msgid "Sing-box checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:71
msgid "Sing-box installed" msgid "Sing-box installed"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:96 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:87
msgid "Sing-box listening ports" msgid "Sing-box listening ports"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:91 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:82
msgid "Sing-box process running" msgid "Sing-box process running"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:81 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:72
msgid "Sing-box service exist" msgid "Sing-box service exist"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:76 #: 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 "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:89 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:89
msgid "Source Network Interface" msgid "Source Network Interface"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:370 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:396
msgid "Specify a local IP address to be excluded from routing" msgid "Specify a local IP address to be excluded from routing"
msgstr "" 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" msgid "Specify local IP addresses or subnets whose traffic will always be routed through the configured route"
msgstr "" 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" msgid "Specify remote URLs to download and use domain lists"
msgstr "" 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" msgid "Specify remote URLs to download and use subnet lists"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:459 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:523
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:482 #: ../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" msgid "Specify the path to the list file located on the router filesystem"
msgstr "" msgstr ""
@@ -837,7 +848,11 @@ msgstr ""
msgid "System info" msgid "System info"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:80 #: src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts:21
msgid "System information"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:69
msgid "Table exist" msgid "Table exist"
msgstr "" msgstr ""
@@ -845,11 +860,11 @@ msgstr ""
msgid "Test latency" msgid "Test latency"
msgstr "" 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" msgid "Text List"
msgstr "" 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)" msgid "Text List (comma/space/newline separated)"
msgstr "" msgstr ""
@@ -857,6 +872,18 @@ msgstr ""
msgid "The DNS server used to look up the IP address of an upstream DNS server" msgid "The DNS server used to look up the IP address of an upstream DNS server"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:69
msgid "Time in seconds for DNS record caching (default: 60)" msgid "Time in seconds for DNS record caching (default: 60)"
msgstr "" msgstr ""
@@ -869,6 +896,10 @@ msgstr ""
msgid "Traffic Total" msgid "Traffic Total"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:25
msgid "Troubleshooting"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:80 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:80
msgid "TTL must be a positive number" msgid "TTL must be a positive number"
msgstr "" msgstr ""
@@ -877,22 +908,22 @@ msgstr ""
msgid "TTL value cannot be empty" msgid "TTL value cannot be empty"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:17
msgid "UDP (Unprotected DNS)" msgid "UDP (Unprotected DNS)"
msgstr "" 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" msgid "UDP over TCP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:34
#: src/podkop/tabs/diagnostic/initController.ts:35
#: src/podkop/tabs/diagnostic/initController.ts:36
#: src/podkop/tabs/diagnostic/initController.ts:37
#: src/podkop/tabs/diagnostic/initController.ts:38 #: src/podkop/tabs/diagnostic/initController.ts:38
#: src/podkop/tabs/diagnostic/initController.ts:39 #: src/podkop/tabs/diagnostic/initController.ts:39
#: src/podkop/tabs/diagnostic/initController.ts:373 #: src/podkop/tabs/diagnostic/initController.ts:40
#: src/podkop/tabs/diagnostic/initController.ts:41
#: src/podkop/tabs/diagnostic/initController.ts:42
#: src/podkop/tabs/diagnostic/initController.ts:43
#: src/podkop/tabs/diagnostic/initController.ts:417
msgid "unknown" msgid "unknown"
msgstr "" msgstr ""
@@ -905,11 +936,11 @@ msgstr ""
msgid "Uplink" msgid "Uplink"
msgstr "" msgstr ""
#: src/validators/validateProxyUrl.ts:27 #: src/validators/validateProxyUrl.ts:29
msgid "URL must start with vless://, ss://, trojan://, or socks4/5://" msgid "URL must start with vless://, ss://, trojan://, or socks4/5://"
msgstr "" msgstr ""
#: src/validators/validateUrl.ts:13 #: src/validators/validateUrl.ts:17
msgid "URL must use one of the following protocols:" msgid "URL must use one of the following protocols:"
msgstr "" msgstr ""
@@ -917,68 +948,88 @@ msgstr ""
msgid "URLTest" msgid "URLTest"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:87
msgid "URLTest Proxy Links" msgid "URLTest Proxy Links"
msgstr "" 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" msgid "User Domain List Type"
msgstr "" 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" msgid "User Domains"
msgstr "" 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" msgid "User Domains List"
msgstr "" 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" msgid "User Subnet List Type"
msgstr "" 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" msgid "User Subnets"
msgstr "" 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" msgid "User Subnets List"
msgstr "" msgstr ""
#: src/validators/validateDns.ts:11 #: src/validators/validateDns.ts:14
#: src/validators/validateDns.ts:15 #: src/validators/validateDns.ts:18
#: src/validators/validateDomain.ts:13 #: src/validators/validateDomain.ts:13
#: src/validators/validateDomain.ts:30 #: src/validators/validateDomain.ts:30
#: src/validators/validateIp.ts:8 #: src/validators/validateIp.ts:8
#: src/validators/validateOutboundJson.ts:17 #: src/validators/validateOutboundJson.ts:7
#: src/validators/validatePath.ts:16 #: src/validators/validatePath.ts:16
#: src/validators/validateShadowsocksUrl.ts:95 #: src/validators/validateShadowsocksUrl.ts:95
#: src/validators/validateSocksUrl.ts:80 #: src/validators/validateSocksUrl.ts:80
#: src/validators/validateSubnet.ts:38 #: src/validators/validateSubnet.ts:38
#: src/validators/validateTrojanUrl.ts:59 #: src/validators/validateTrojanUrl.ts:59
#: src/validators/validateUrl.ts:16 #: src/validators/validateUrl.ts:28
#: src/validators/validateVlessUrl.ts:107 #: src/validators/validateVlessUrl.ts:108
msgid "Valid" msgid "Valid"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:370 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:434
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:449 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:513
msgid "Validation errors:" msgid "Validation errors:"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:248 #: src/podkop/tabs/diagnostic/initController.ts:256
#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107
msgid "View logs" msgid "View logs"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:247 #: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:31
msgid "Visit Wiki"
msgstr ""
#: ../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." msgid "Warning: %s cannot be used together with %s. Previous selections have been removed."
msgstr "" 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." msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection."
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:256
msgid "YACD Secret Key"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:127 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:127
msgid "You can select Output Network Interface, by default autodetect" msgid "You can select Output Network Interface, by default autodetect"
msgstr "" msgstr ""

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PODKOP\n" "Project-Id-Version: PODKOP\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-21 23:02+0300\n" "POT-Creation-Date: 2025-11-06 16:19+0200\n"
"PO-Revision-Date: 2025-10-21 23:02+0300\n" "PO-Revision-Date: 2025-11-06 16:19+0200\n"
"Last-Translator: divocat\n" "Last-Translator: divocat\n"
"Language-Team: none\n" "Language-Team: none\n"
"Language: ru\n" "Language: ru\n"
@@ -35,6 +35,9 @@ msgstr "Активные соединения"
msgid "Additional marking rules found" msgid "Additional marking rules found"
msgstr "Найдены дополнительные правила маркировки" msgstr "Найдены дополнительные правила маркировки"
msgid "Allows access to YACD from the WAN. Make sure to open the appropriate port in your firewall."
msgstr "Обеспечивает доступ к YACD из WAN. Убедитесь, что в брандмауэре открыт соответствующий порт."
msgid "Applicable for SOCKS and Shadowsocks proxy" msgid "Applicable for SOCKS and Shadowsocks proxy"
msgstr "Применимо для SOCKS и Shadowsocks прокси" msgstr "Применимо для SOCKS и Shadowsocks прокси"
@@ -44,6 +47,9 @@ msgstr "Необходимо указать хотя бы один действ
msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed."
msgstr "Необходимо указать хотя бы одну действительную подсеть или IP. Только комментарии недопустимы." msgstr "Необходимо указать хотя бы одну действительную подсеть или IP. Только комментарии недопустимы."
msgid "Available actions"
msgstr "Доступные действия"
msgid "Bootsrap DNS" msgid "Bootsrap DNS"
msgstr "Bootstrap DNS" msgstr "Bootstrap DNS"
@@ -62,26 +68,20 @@ msgstr "Путь к файлу кэша"
msgid "Cache file path cannot be empty" msgid "Cache file path cannot be empty"
msgstr "Путь к файлу кэша не может быть пустым" msgstr "Путь к файлу кэша не может быть пустым"
msgid "Cannot receive DNS checks result" msgid "Cannot receive checks result"
msgstr "Не удалось получить результаты проверки DNS" msgstr "Не удалось получить результаты проверки"
msgid "Cannot receive nftables checks result" msgid "Checking, please wait"
msgstr "Не удалось получить результаты проверки nftables" msgstr "Проверяем, пожалуйста подождите"
msgid "Cannot receive Sing-box checks result" msgid "checks"
msgstr "Не удалось получить результаты проверки Sing-box" msgstr "проверки"
msgid "Checking dns, please wait" msgid "Checks failed"
msgstr "Проверка dns, пожалуйста подождите" msgstr "Проверки не выполнены"
msgid "Checking FakeIP, please wait" msgid "Checks passed"
msgstr "Проверка FakeIP, пожалуйста подождите" msgstr "Проверки пройдены"
msgid "Checking nftables, please wait"
msgstr "Проверка nftables, пожалуйста подождите"
msgid "Checking sing-box, please wait"
msgstr "Проверка sing-box, пожалуйста подождите"
msgid "CIDR must be between 0 and 32" msgid "CIDR must be between 0 and 32"
msgstr "CIDR должен быть между 0 и 32" msgstr "CIDR должен быть между 0 и 32"
@@ -143,12 +143,6 @@ msgstr "Отключить QUIC протокол для улучшения со
msgid "Disabled" msgid "Disabled"
msgstr "Отключено" msgstr "Отключено"
msgid "DNS checks"
msgstr "DNS проверки"
msgid "DNS checks passed"
msgstr "DNS проверки успешно завершены"
msgid "DNS on router" msgid "DNS on router"
msgstr "DNS на роутере" msgstr "DNS на роутере"
@@ -170,6 +164,9 @@ msgstr "DNS-сервер"
msgid "DNS server address cannot be empty" msgid "DNS server address cannot be empty"
msgstr "Адрес DNS-сервера не может быть пустым" msgstr "Адрес DNS-сервера не может быть пустым"
msgid "Do not panic, everything can be fixed, just..."
msgstr "Не паникуйте, всё можно исправить, просто..."
msgid "Domain Resolver" msgid "Domain Resolver"
msgstr "Резолвер доменов" msgstr "Резолвер доменов"
@@ -188,9 +185,6 @@ msgstr "Скачивать списки через Proxy/VPN"
msgid "Download Lists via specific proxy section" msgid "Download Lists via specific proxy section"
msgstr "Скачивать списки через выбранную секцию" msgstr "Скачивать списки через выбранную секцию"
msgid "Downloading all lists via main Proxy/VPN"
msgstr "Загрузка всех списков через основной прокси/VPN"
msgid "Downloading all lists via specific Proxy/VPN" msgid "Downloading all lists via specific Proxy/VPN"
msgstr "Загрузка всех списков через указанный прокси/VPN" msgstr "Загрузка всех списков через указанный прокси/VPN"
@@ -215,6 +209,9 @@ msgstr "Включить смешанный прокси-сервер, разр
msgid "Enable YACD" msgid "Enable YACD"
msgstr "Включить YACD" msgstr "Включить YACD"
msgid "Enable YACD WAN Access"
msgstr "Включить доступ YACD WAN"
msgid "Enter complete outbound configuration in JSON format" msgid "Enter complete outbound configuration in JSON format"
msgstr "Введите полную конфигурацию исходящего соединения в формате JSON" msgstr "Введите полную конфигурацию исходящего соединения в формате JSON"
@@ -227,6 +224,18 @@ msgstr "Введите доменные имена без протоколов,
msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" 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-адреса" 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" msgid "Exclude NTP"
msgstr "Исключить NTP" msgstr "Исключить NTP"
@@ -236,17 +245,8 @@ msgstr "Исключите трафик протокола NTP из туннел
msgid "Failed to copy!" msgid "Failed to copy!"
msgstr "Не удалось скопировать!" msgstr "Не удалось скопировать!"
msgid "FakeIP checks" msgid "Failed to execute!"
msgstr "Проверка FakeIP" msgstr "Не удалось выполнить!"
msgid "FakeIP checks failed"
msgstr "Проверки FakeIP не пройдены"
msgid "FakeIP checks partially passed"
msgstr "Проверка FakeIP частично пройдена"
msgid "FakeIP checks passed"
msgstr "Проверки FakeIP пройдены"
msgid "Fastest" msgid "Fastest"
msgstr "Самый быстрый" msgstr "Самый быстрый"
@@ -365,6 +365,9 @@ msgstr "Неверный URL VLESS: ошибка разбора"
msgid "IP address 0.0.0.0 is not allowed" msgid "IP address 0.0.0.0 is not allowed"
msgstr "IP-адрес 0.0.0.0 не допускается" msgstr "IP-адрес 0.0.0.0 не допускается"
msgid "Issues detected"
msgstr "Обнаружены проблемы"
msgid "Latest" msgid "Latest"
msgstr "Последняя" msgstr "Последняя"
@@ -389,24 +392,21 @@ msgstr "Порт смешанного прокси"
msgid "Monitored Interfaces" msgid "Monitored Interfaces"
msgstr "Наблюдаемые интерфейсы" msgstr "Наблюдаемые интерфейсы"
msgid "Must be a number in the range of 50 - 1000"
msgstr "Должно быть числом от 50 до 1000"
msgid "Network Interface" msgid "Network Interface"
msgstr "Сетевой интерфейс" msgstr "Сетевой интерфейс"
msgid "Nftables checks"
msgstr "Проверки Nftables"
msgid "Nftables checks partially passed"
msgstr "Проверки Nftables частично пройдена"
msgid "Nftables checks passed"
msgstr "Nftables проверки успешно завершены"
msgid "No other marking rules found" msgid "No other marking rules found"
msgstr "Другие правила маркировки не найдены" msgstr "Другие правила маркировки не найдены"
msgid "Not implement yet" msgid "Not implement yet"
msgstr "Ещё не реализовано" msgstr "Ещё не реализовано"
msgid "Not responding"
msgstr "Не отвечает"
msgid "Not running" msgid "Not running"
msgstr "Не запущено" msgstr "Не запущено"
@@ -419,9 +419,6 @@ msgstr "Конфигурация Outbound"
msgid "Outbound Configuration" msgid "Outbound Configuration"
msgstr "Конфигурация исходящего соединения" msgstr "Конфигурация исходящего соединения"
msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields"
msgstr "JSON должен содержать поля \"type\", \"server\" и \"server_port\""
msgid "Outdated" msgid "Outdated"
msgstr "Устаревшая" msgstr "Устаревшая"
@@ -440,6 +437,9 @@ msgstr "Путь должен содержать хотя бы одну дире
msgid "Path must end with cache.db" msgid "Path must end with cache.db"
msgstr "Путь должен заканчиваться на cache.db" msgstr "Путь должен заканчиваться на cache.db"
msgid "Pending"
msgstr "Ожидает запуска"
msgid "Podkop" msgid "Podkop"
msgstr "Podkop" msgstr "Podkop"
@@ -458,17 +458,14 @@ msgstr "Прокси-трафик не маршрутизируется чере
msgid "Proxy traffic is routed via FakeIP" msgid "Proxy traffic is routed via FakeIP"
msgstr "Прокси-трафик направляется через FakeIP" msgstr "Прокси-трафик направляется через FakeIP"
msgid "Queued"
msgstr "В очереди"
msgid "Regional options cannot be used together" msgid "Regional options cannot be used together"
msgstr "Нельзя использовать несколько региональных опций одновременно" msgstr "Нельзя использовать несколько региональных опций одновременно"
msgid "Remote Domain Lists" msgid "Remote Domain Lists"
msgstr "Удалённые списки доменов" msgstr "Внешние списки доменов"
msgid "Remote Subnet Lists" msgid "Remote Subnet Lists"
msgstr "Удалённые списки подсетей" msgstr "Внешние списки подсетей"
msgid "Restart podkop" msgid "Restart podkop"
msgstr "Перезапустить Podkop" msgstr "Перезапустить Podkop"
@@ -506,6 +503,9 @@ msgstr "Запустить диагностику"
msgid "Russia inside restrictions" msgid "Russia inside restrictions"
msgstr "Ограничения Russia inside" msgstr "Ограничения Russia inside"
msgid "Secret key for authenticating remote access to YACD when WAN access is enabled."
msgstr "Секретный ключ для аутентификации удаленного доступа к YACD при включенном доступе через WAN."
msgid "Sections" msgid "Sections"
msgstr "Секции" msgstr "Секции"
@@ -569,12 +569,6 @@ msgstr "Sing-box"
msgid "Sing-box autostart disabled" msgid "Sing-box autostart disabled"
msgstr "Автостарт sing-box отключен" msgstr "Автостарт sing-box отключен"
msgid "Sing-box checks"
msgstr "Sing-box проверки"
msgid "Sing-box checks passed"
msgstr "Sing-box проверки успешно завершены"
msgid "Sing-box installed" msgid "Sing-box installed"
msgstr "Sing-box установлен" msgstr "Sing-box установлен"
@@ -587,8 +581,8 @@ msgstr "Процесс sing-box запущен"
msgid "Sing-box service exist" msgid "Sing-box service exist"
msgstr "Сервис sing-box существует" msgstr "Сервис sing-box существует"
msgid "Sing-box version >= 1.12.4" msgid "Sing-box version is compatible (newer than 1.12.4)"
msgstr "Версия sing-box >= 1.12.4" msgstr "Версия Sing-box совместима (новее 1.12.4)"
msgid "Source Network Interface" msgid "Source Network Interface"
msgstr "Сетевой интерфейс источника" msgstr "Сетевой интерфейс источника"
@@ -600,10 +594,10 @@ msgid "Specify local IP addresses or subnets whose traffic will always be routed
msgstr "Укажите локальные IP-адреса или подсети, трафик которых всегда будет направляться через настроенный маршрут." msgstr "Укажите локальные IP-адреса или подсети, трафик которых всегда будет направляться через настроенный маршрут."
msgid "Specify remote URLs to download and use domain lists" msgid "Specify remote URLs to download and use domain lists"
msgstr "Укажите удаленные URL-адреса для загрузки и использования списков доменов." msgstr "Укажите URL-адреса для загрузки и использования списков доменов."
msgid "Specify remote URLs to download and use subnet lists" msgid "Specify remote URLs to download and use subnet lists"
msgstr "Укажите удаленные URL-адреса для загрузки и использования списков подсетей." msgstr "Укажите URL-адреса для загрузки и использования списков подсетей."
msgid "Specify the path to the list file located on the router filesystem" msgid "Specify the path to the list file located on the router filesystem"
msgstr "Укажите путь к файлу списка, расположенному в файловой системе маршрутизатора." msgstr "Укажите путь к файлу списка, расположенному в файловой системе маршрутизатора."
@@ -620,11 +614,14 @@ msgstr "Успешно скопировано!"
msgid "System info" msgid "System info"
msgstr "Системная информация" msgstr "Системная информация"
msgid "System information"
msgstr "Системная информация"
msgid "Table exist" msgid "Table exist"
msgstr "Таблица существует" msgstr "Таблица существует"
msgid "Test latency" msgid "Test latency"
msgstr "Измерить задержки" msgstr "Тестирование задержки"
msgid "Text List" msgid "Text List"
msgstr "Текстовый список" msgstr "Текстовый список"
@@ -635,6 +632,15 @@ msgstr "Текстовый список (через запятую, пробел
msgid "The DNS server used to look up the IP address of an upstream DNS server" msgid "The DNS server used to look up the IP address of an upstream DNS server"
msgstr "DNS-сервер, используемый для поиска IP-адреса вышестоящего DNS-сервера" 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)" msgid "Time in seconds for DNS record caching (default: 60)"
msgstr "Время в секундах для кэширования DNS записей (по умолчанию: 60)" msgstr "Время в секундах для кэширования DNS записей (по умолчанию: 60)"
@@ -644,6 +650,9 @@ msgstr "Трафик"
msgid "Traffic Total" msgid "Traffic Total"
msgstr "Всего трафика" msgstr "Всего трафика"
msgid "Troubleshooting"
msgstr "Устранение неполадок"
msgid "TTL must be a positive number" msgid "TTL must be a positive number"
msgstr "TTL должно быть положительным числом" msgstr "TTL должно быть положительным числом"
@@ -674,9 +683,18 @@ msgstr "URL должен использовать один из следующи
msgid "URLTest" msgid "URLTest"
msgstr "URLTest" msgstr "URLTest"
msgid "URLTest Check Interval"
msgstr "Интервал проверки URLTest"
msgid "URLTest Proxy Links" msgid "URLTest Proxy Links"
msgstr "Ссылки прокси для URLTest" msgstr "Ссылки прокси для URLTest"
msgid "URLTest Testing URL"
msgstr "URLTest ссылка для проверки"
msgid "URLTest Tolerance"
msgstr "URLTest допустимое отклонение"
msgid "User Domain List Type" msgid "User Domain List Type"
msgstr "Тип пользовательского списка доменов" msgstr "Тип пользовательского списка доменов"
@@ -704,11 +722,17 @@ msgstr "Ошибки валидации:"
msgid "View logs" msgid "View logs"
msgstr "Посмотреть логи" msgstr "Посмотреть логи"
msgid "Visit Wiki"
msgstr "Перейти в wiki"
msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgid "Warning: %s cannot be used together with %s. Previous selections have been removed."
msgstr "Предупреждение: %s нельзя использовать вместе с %s. Предыдущие варианты были удалены." msgstr "Предупреждение: %s нельзя использовать вместе с %s. Предыдущие варианты были удалены."
msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection." msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection."
msgstr "Предупреждение: Russia inside может быть использован только с %s. %s уже есть в Russia inside и будет удален из выбранных." msgstr "Предупреждение: Russia inside может быть использован только с %s. %s уже есть в Russia inside и будет удален из выбранных."
msgid "YACD Secret Key"
msgstr "Секретный ключ YACD"
msgid "You can select Output Network Interface, by default autodetect" msgid "You can select Output Network Interface, by default autodetect"
msgstr "Вы можете выбрать выходной сетевой интерфейс, по умолчанию он определяется автоматически." msgstr "Вы можете выбрать выходной сетевой интерфейс, по умолчанию он определяется автоматически."

View File

@@ -15,3 +15,4 @@ export * from './renderCircleCheckBigIcon24';
export * from './renderSquareChartGanttIcon24'; export * from './renderSquareChartGanttIcon24';
export * from './renderCogIcon24'; export * from './renderCogIcon24';
export * from './renderSearchIcon24'; export * from './renderSearchIcon24';
export * from './renderBookOpenTextIcon24';

View File

@@ -0,0 +1,28 @@
import { svgEl } from '../helpers';
export function renderBookOpenTextIcon24() {
const NS = 'http://www.w3.org/2000/svg';
return svgEl(
'svg',
{
xmlns: NS,
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
'stroke-width': '2',
'stroke-linecap': 'round',
'stroke-linejoin': 'round',
class: 'lucide lucide-book-open-text-icon lucide-book-open-text',
},
[
svgEl('path', { d: 'M12 7v14' }),
svgEl('path', { d: 'M16 12h2' }),
svgEl('path', { d: 'M16 8h2' }),
svgEl('path', {
d: 'M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z',
}),
svgEl('path', { d: 'M6 12h2' }),
svgEl('path', { d: 'M6 8h2' }),
],
);
}

View File

@@ -4,6 +4,9 @@
'require uci'; 'require uci';
'require ui'; 'require ui';
if (typeof structuredClone !== 'function')
globalThis.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));
export * from './validators'; export * from './validators';
export * from './helpers'; export * from './helpers';
export * from './podkop'; export * from './podkop';

View File

@@ -0,0 +1,9 @@
import { getConfigSections } from './getConfigSections';
export async function getClashApiSecret() {
const sections = await getConfigSections();
const settings = sections.find((section) => section['.type'] === 'settings');
return settings?.yacd_secret_key || '';
}

View File

@@ -1,7 +1,9 @@
import { getConfigSections } from './getConfigSections'; import { getConfigSections } from './getConfigSections';
import { getDashboardSections } from './getDashboardSections'; import { getDashboardSections } from './getDashboardSections';
import { getClashApiSecret } from './getClashApiSecret';
export const CustomPodkopMethods = { export const CustomPodkopMethods = {
getConfigSections, getConfigSections,
getDashboardSections, getDashboardSections,
getClashApiSecret,
}; };

View File

@@ -9,7 +9,7 @@ export async function callBaseMethod<T>(
const response = await executeShellCommand({ const response = await executeShellCommand({
command, command,
args: [method as string, ...args], args: [method as string, ...args],
timeout: 10000, timeout: 15000,
}); });
if (response.stdout) { if (response.stdout) {

View File

@@ -29,15 +29,15 @@ export const PodkopShellMethods = {
Podkop.AvailableClashAPIMethods.GET_PROXIES, Podkop.AvailableClashAPIMethods.GET_PROXIES,
]), ]),
getClashApiProxyLatency: async (tag: string) => getClashApiProxyLatency: async (tag: string) =>
callBaseMethod<unknown>(Podkop.AvailableMethods.CLASH_API, [ callBaseMethod<Podkop.GetClashApiProxyLatency>(
Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, Podkop.AvailableMethods.CLASH_API,
tag, [Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, tag, '5000'],
]), ),
getClashApiGroupLatency: async (tag: string) => getClashApiGroupLatency: async (tag: string) =>
callBaseMethod<unknown>(Podkop.AvailableMethods.CLASH_API, [ callBaseMethod<Podkop.GetClashApiGroupLatency>(
Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, Podkop.AvailableMethods.CLASH_API,
tag, [Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, tag, '10000'],
]), ),
setClashApiGroupProxy: async (group: string, proxy: string) => setClashApiGroupProxy: async (group: string, proxy: string) =>
callBaseMethod<unknown>(Podkop.AvailableMethods.CLASH_API, [ callBaseMethod<unknown>(Podkop.AvailableMethods.CLASH_API, [
Podkop.AvailableClashAPIMethods.SET_GROUP_PROXY, Podkop.AvailableClashAPIMethods.SET_GROUP_PROXY,

View File

@@ -8,6 +8,7 @@ import { CustomPodkopMethods, PodkopShellMethods } from '../../methods';
import { logger, socket, store, StoreType } from '../../services'; import { logger, socket, store, StoreType } from '../../services';
import { renderSections, renderWidget } from './partials'; import { renderSections, renderWidget } from './partials';
import { fetchServicesInfo } from '../../fetchers'; import { fetchServicesInfo } from '../../fetchers';
import { getClashApiSecret } from '../../methods/custom/getClashApiSecret';
// Fetchers // Fetchers
@@ -38,8 +39,10 @@ async function fetchDashboardSections() {
} }
async function connectToClashSockets() { async function connectToClashSockets() {
const clashApiSecret = await getClashApiSecret();
socket.subscribe( socket.subscribe(
`${getClashWsUrl()}/traffic?token=`, `${getClashWsUrl()}/traffic?token=${clashApiSecret}`,
(msg) => { (msg) => {
const parsedMsg = JSON.parse(msg); const parsedMsg = JSON.parse(msg);
@@ -68,7 +71,7 @@ async function connectToClashSockets() {
); );
socket.subscribe( socket.subscribe(
`${getClashWsUrl()}/connections?token=`, `${getClashWsUrl()}/connections?token=${clashApiSecret}`,
(msg) => { (msg) => {
const parsedMsg = JSON.parse(msg); const parsedMsg = JSON.parse(msg);

View File

@@ -1,8 +1,11 @@
import { getCheckTitle } from '../helpers/getCheckTitle';
export enum DIAGNOSTICS_CHECKS { export enum DIAGNOSTICS_CHECKS {
DNS = 'DNS', DNS = 'DNS',
SINGBOX = 'SINGBOX', SINGBOX = 'SINGBOX',
NFT = 'NFT', NFT = 'NFT',
FAKEIP = 'FAKEIP', FAKEIP = 'FAKEIP',
OUTBOUNDS = 'OUTBOUNDS',
} }
export const DIAGNOSTICS_CHECKS_MAP: Record< export const DIAGNOSTICS_CHECKS_MAP: Record<
@@ -11,22 +14,27 @@ export const DIAGNOSTICS_CHECKS_MAP: Record<
> = { > = {
[DIAGNOSTICS_CHECKS.DNS]: { [DIAGNOSTICS_CHECKS.DNS]: {
order: 1, order: 1,
title: _('DNS checks'), title: getCheckTitle('DNS'),
code: DIAGNOSTICS_CHECKS.DNS, code: DIAGNOSTICS_CHECKS.DNS,
}, },
[DIAGNOSTICS_CHECKS.SINGBOX]: { [DIAGNOSTICS_CHECKS.SINGBOX]: {
order: 2, order: 2,
title: _('Sing-box checks'), title: getCheckTitle('Sing-box'),
code: DIAGNOSTICS_CHECKS.SINGBOX, code: DIAGNOSTICS_CHECKS.SINGBOX,
}, },
[DIAGNOSTICS_CHECKS.NFT]: { [DIAGNOSTICS_CHECKS.NFT]: {
order: 3, order: 3,
title: _('Nftables checks'), title: getCheckTitle('Nftables'),
code: DIAGNOSTICS_CHECKS.NFT, code: DIAGNOSTICS_CHECKS.NFT,
}, },
[DIAGNOSTICS_CHECKS.FAKEIP]: { [DIAGNOSTICS_CHECKS.OUTBOUNDS]: {
order: 4, order: 4,
title: _('FakeIP checks'), title: getCheckTitle('Outbounds'),
code: DIAGNOSTICS_CHECKS.OUTBOUNDS,
},
[DIAGNOSTICS_CHECKS.FAKEIP]: {
order: 5,
title: getCheckTitle('FakeIP'),
code: DIAGNOSTICS_CHECKS.FAKEIP, code: DIAGNOSTICS_CHECKS.FAKEIP,
}, },
}; };

View File

@@ -3,6 +3,7 @@ import { DIAGNOSTICS_CHECKS_MAP } from './contstants';
import { PodkopShellMethods } from '../../../methods'; import { PodkopShellMethods } from '../../../methods';
import { IDiagnosticsChecksItem } from '../../../services'; import { IDiagnosticsChecksItem } from '../../../services';
import { updateCheckStore } from './updateCheckStore'; import { updateCheckStore } from './updateCheckStore';
import { getMeta } from '../helpers/getMeta';
export async function runDnsCheck() { export async function runDnsCheck() {
const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.DNS; const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.DNS;
@@ -11,7 +12,7 @@ export async function runDnsCheck() {
order, order,
code, code,
title, title,
description: _('Checking dns, please wait'), description: _('Checking, please wait'),
state: 'loading', state: 'loading',
items: [], items: [],
}); });
@@ -23,7 +24,7 @@ export async function runDnsCheck() {
order, order,
code, code,
title, title,
description: _('Cannot receive DNS checks result'), description: _('Cannot receive checks result'),
state: 'error', state: 'error',
items: [], items: [],
}); });
@@ -45,27 +46,19 @@ export async function runDnsCheck() {
Boolean(data.bootstrap_dns_status) || Boolean(data.bootstrap_dns_status) ||
Boolean(data.dns_status); Boolean(data.dns_status);
function getStatus() { const { state, description } = getMeta({ atLeastOneGood, allGood });
if (allGood) {
return 'success';
}
if (atLeastOneGood) {
return 'warning';
}
return 'error';
}
updateCheckStore({ updateCheckStore({
order, order,
code, code,
title, title,
description: _('DNS checks passed'), description,
state: getStatus(), state,
items: [ items: [
...insertIf<IDiagnosticsChecksItem>( ...insertIf<IDiagnosticsChecksItem>(
data.dns_type === 'doh' || data.dns_type === 'dot', data.dns_type === 'doh' ||
data.dns_type === 'dot' ||
!data.bootstrap_dns_status,
[ [
{ {
state: data.bootstrap_dns_status ? 'success' : 'error', state: data.bootstrap_dns_status ? 'success' : 'error',

View File

@@ -3,6 +3,7 @@ import { DIAGNOSTICS_CHECKS_MAP } from './contstants';
import { PodkopShellMethods, RemoteFakeIPMethods } from '../../../methods'; import { PodkopShellMethods, RemoteFakeIPMethods } from '../../../methods';
import { IDiagnosticsChecksItem } from '../../../services'; import { IDiagnosticsChecksItem } from '../../../services';
import { updateCheckStore } from './updateCheckStore'; import { updateCheckStore } from './updateCheckStore';
import { getMeta } from '../helpers/getMeta';
export async function runFakeIPCheck() { export async function runFakeIPCheck() {
const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.FAKEIP; const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.FAKEIP;
@@ -11,7 +12,7 @@ export async function runFakeIPCheck() {
order, order,
code, code,
title, title,
description: _('Checking FakeIP, please wait'), description: _('Checking, please wait'),
state: 'loading', state: 'loading',
items: [], items: [],
}); });
@@ -34,31 +35,7 @@ export async function runFakeIPCheck() {
const atLeastOneGood = const atLeastOneGood =
checks.router && checks.browserFakeIP && checks.differentIP; checks.router && checks.browserFakeIP && checks.differentIP;
function getMeta(): { const { state, description } = getMeta({ atLeastOneGood, allGood });
description: string;
state: 'loading' | 'warning' | 'success' | 'error' | 'skipped';
} {
if (allGood) {
return {
state: 'success',
description: _('FakeIP checks passed'),
};
}
if (atLeastOneGood) {
return {
state: 'warning',
description: _('FakeIP checks partially passed'),
};
}
return {
state: 'error',
description: _('FakeIP checks failed'),
};
}
const { state, description } = getMeta();
updateCheckStore({ updateCheckStore({
order, order,

View File

@@ -1,6 +1,7 @@
import { DIAGNOSTICS_CHECKS_MAP } from './contstants'; import { DIAGNOSTICS_CHECKS_MAP } from './contstants';
import { RemoteFakeIPMethods, PodkopShellMethods } from '../../../methods'; import { RemoteFakeIPMethods, PodkopShellMethods } from '../../../methods';
import { updateCheckStore } from './updateCheckStore'; import { updateCheckStore } from './updateCheckStore';
import { getMeta } from '../helpers/getMeta';
export async function runNftCheck() { export async function runNftCheck() {
const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.NFT; const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.NFT;
@@ -9,7 +10,7 @@ export async function runNftCheck() {
order, order,
code, code,
title, title,
description: _('Checking nftables, please wait'), description: _('Checking, please wait'),
state: 'loading', state: 'loading',
items: [], items: [],
}); });
@@ -24,7 +25,7 @@ export async function runNftCheck() {
order, order,
code, code,
title, title,
description: _('Cannot receive nftables checks result'), description: _('Cannot receive checks result'),
state: 'error', state: 'error',
items: [], items: [],
}); });
@@ -54,26 +55,14 @@ export async function runNftCheck() {
Boolean(data.rules_proxy_counters) || Boolean(data.rules_proxy_counters) ||
!data.rules_other_mark_exist; !data.rules_other_mark_exist;
function getStatus() { const { state, description } = getMeta({ atLeastOneGood, allGood });
if (allGood) {
return 'success';
}
if (atLeastOneGood) {
return 'warning';
}
return 'error';
}
updateCheckStore({ updateCheckStore({
order, order,
code, code,
title, title,
description: allGood description,
? _('Nftables checks passed') state,
: _('Nftables checks partially passed'),
state: getStatus(),
items: [ items: [
{ {
state: data.table_exist ? 'success' : 'error', state: data.table_exist ? 'success' : 'error',

View File

@@ -0,0 +1,132 @@
import { DIAGNOSTICS_CHECKS_MAP } from './contstants';
import { PodkopShellMethods } from '../../../methods';
import { updateCheckStore } from './updateCheckStore';
import { getMeta } from '../helpers/getMeta';
import { getDashboardSections } from '../../../methods/custom/getDashboardSections';
import { IDiagnosticsChecksItem } from '../../../services';
export async function runSectionsCheck() {
const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS;
updateCheckStore({
order,
code,
title,
description: _('Checking, please wait'),
state: 'loading',
items: [],
});
const sections = await getDashboardSections();
if (!sections.success) {
updateCheckStore({
order,
code,
title,
description: _('Cannot receive checks result'),
state: 'error',
items: [],
});
throw new Error('Sections checks failed');
}
const items = (await Promise.all(
sections.data.map(async (section) => {
async function getLatency() {
if (section.withTagSelect) {
const latencyGroup = await PodkopShellMethods.getClashApiGroupLatency(
section.code,
);
const selectedOutbound = section.outbounds.find(
(item) => item.selected,
);
const isUrlTest = selectedOutbound?.type === 'URLTest';
const success = latencyGroup.success && !latencyGroup.data.message;
if (success) {
if (isUrlTest) {
const latency = Object.values(latencyGroup.data)
.map((item) => (item ? `${item}ms` : 'n/a'))
.join(' / ');
return {
success: true,
latency: `[${_('Fastest')}] ${latency}`,
};
}
const selectedProxyDelay =
latencyGroup.data?.[selectedOutbound?.code ?? ''];
if (selectedProxyDelay) {
return {
success: true,
latency: `[${selectedOutbound?.displayName ?? ''}] ${selectedProxyDelay}ms`,
};
}
return {
success: false,
latency: `[${selectedOutbound?.displayName ?? ''}] ${_('Not responding')}`,
};
}
return {
success: false,
latency: _('Not responding'),
};
}
const latencyProxy = await PodkopShellMethods.getClashApiProxyLatency(
section.code,
);
const success = latencyProxy.success && !latencyProxy.data.message;
if (success) {
return {
success: true,
latency: `${latencyProxy.data.delay} ms`,
};
}
return {
success: false,
latency: _('Not responding'),
};
}
const { latency, success } = await getLatency();
return {
state: success ? 'success' : 'error',
key: section.displayName,
value: latency,
};
}),
)) as Array<IDiagnosticsChecksItem>;
const allGood = items.every((item) => item.state === 'success');
const atLeastOneGood = items.some((item) => item.state === 'success');
const { state, description } = getMeta({ atLeastOneGood, allGood });
updateCheckStore({
order,
code,
title,
description,
state,
items,
});
if (!atLeastOneGood) {
throw new Error('Sections checks failed');
}
}

View File

@@ -1,6 +1,7 @@
import { DIAGNOSTICS_CHECKS_MAP } from './contstants'; import { DIAGNOSTICS_CHECKS_MAP } from './contstants';
import { PodkopShellMethods } from '../../../methods'; import { PodkopShellMethods } from '../../../methods';
import { updateCheckStore } from './updateCheckStore'; import { updateCheckStore } from './updateCheckStore';
import { getMeta } from '../helpers/getMeta';
export async function runSingBoxCheck() { export async function runSingBoxCheck() {
const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.SINGBOX; const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.SINGBOX;
@@ -9,7 +10,7 @@ export async function runSingBoxCheck() {
order, order,
code, code,
title, title,
description: _('Checking sing-box, please wait'), description: _('Checking, please wait'),
state: 'loading', state: 'loading',
items: [], items: [],
}); });
@@ -21,7 +22,7 @@ export async function runSingBoxCheck() {
order, order,
code, code,
title, title,
description: _('Cannot receive Sing-box checks result'), description: _('Cannot receive checks result'),
state: 'error', state: 'error',
items: [], items: [],
}); });
@@ -47,24 +48,14 @@ export async function runSingBoxCheck() {
Boolean(data.sing_box_process_running) || Boolean(data.sing_box_process_running) ||
Boolean(data.sing_box_ports_listening); Boolean(data.sing_box_ports_listening);
function getStatus() { const { state, description } = getMeta({ atLeastOneGood, allGood });
if (allGood) {
return 'success';
}
if (atLeastOneGood) {
return 'warning';
}
return 'error';
}
updateCheckStore({ updateCheckStore({
order, order,
code, code,
title, title,
description: _('Sing-box checks passed'), description,
state: getStatus(), state,
items: [ items: [
{ {
state: data.sing_box_installed ? 'success' : 'error', state: data.sing_box_installed ? 'success' : 'error',
@@ -73,7 +64,7 @@ export async function runSingBoxCheck() {
}, },
{ {
state: data.sing_box_version_ok ? 'success' : 'error', 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: '', value: '',
}, },
{ {

View File

@@ -72,6 +72,14 @@ export const initialDiagnosticStore: Pick<
items: [], items: [],
state: 'skipped', state: 'skipped',
}, },
{
code: DIAGNOSTICS_CHECKS.OUTBOUNDS,
title: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.title,
order: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.order,
description: _('Not running'),
items: [],
state: 'skipped',
},
{ {
code: DIAGNOSTICS_CHECKS.FAKEIP, code: DIAGNOSTICS_CHECKS.FAKEIP,
title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title, title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title,
@@ -92,7 +100,7 @@ export const loadingDiagnosticsChecksStore: Pick<
code: DIAGNOSTICS_CHECKS.DNS, code: DIAGNOSTICS_CHECKS.DNS,
title: DIAGNOSTICS_CHECKS_MAP.DNS.title, title: DIAGNOSTICS_CHECKS_MAP.DNS.title,
order: DIAGNOSTICS_CHECKS_MAP.DNS.order, order: DIAGNOSTICS_CHECKS_MAP.DNS.order,
description: _('Queued'), description: _('Pending'),
items: [], items: [],
state: 'skipped', state: 'skipped',
}, },
@@ -100,7 +108,7 @@ export const loadingDiagnosticsChecksStore: Pick<
code: DIAGNOSTICS_CHECKS.SINGBOX, code: DIAGNOSTICS_CHECKS.SINGBOX,
title: DIAGNOSTICS_CHECKS_MAP.SINGBOX.title, title: DIAGNOSTICS_CHECKS_MAP.SINGBOX.title,
order: DIAGNOSTICS_CHECKS_MAP.SINGBOX.order, order: DIAGNOSTICS_CHECKS_MAP.SINGBOX.order,
description: _('Queued'), description: _('Pending'),
items: [], items: [],
state: 'skipped', state: 'skipped',
}, },
@@ -108,7 +116,15 @@ export const loadingDiagnosticsChecksStore: Pick<
code: DIAGNOSTICS_CHECKS.NFT, code: DIAGNOSTICS_CHECKS.NFT,
title: DIAGNOSTICS_CHECKS_MAP.NFT.title, title: DIAGNOSTICS_CHECKS_MAP.NFT.title,
order: DIAGNOSTICS_CHECKS_MAP.NFT.order, order: DIAGNOSTICS_CHECKS_MAP.NFT.order,
description: _('Queued'), description: _('Pending'),
items: [],
state: 'skipped',
},
{
code: DIAGNOSTICS_CHECKS.OUTBOUNDS,
title: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.title,
order: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.order,
description: _('Pending'),
items: [], items: [],
state: 'skipped', state: 'skipped',
}, },
@@ -116,7 +132,7 @@ export const loadingDiagnosticsChecksStore: Pick<
code: DIAGNOSTICS_CHECKS.FAKEIP, code: DIAGNOSTICS_CHECKS.FAKEIP,
title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title, title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title,
order: DIAGNOSTICS_CHECKS_MAP.FAKEIP.order, order: DIAGNOSTICS_CHECKS_MAP.FAKEIP.order,
description: _('Queued'), description: _('Pending'),
items: [], items: [],
state: 'skipped', state: 'skipped',
}, },

View File

@@ -0,0 +1,3 @@
export function getCheckTitle(name: string) {
return `${name} ${_('checks')}`;
}

View File

@@ -0,0 +1,28 @@
interface IGetMetaProps {
allGood: boolean;
atLeastOneGood: boolean;
}
export function getMeta({ allGood, atLeastOneGood }: IGetMetaProps): {
description: string;
state: 'loading' | 'warning' | 'success' | 'error' | 'skipped';
} {
if (allGood) {
return {
state: 'success',
description: _('Checks passed'),
};
}
if (atLeastOneGood) {
return {
state: 'warning',
description: _('Issues detected'),
};
}
return {
state: 'error',
description: _('Checks failed'),
};
}

View File

@@ -16,6 +16,10 @@ import { PodkopShellMethods } from '../../methods';
import { fetchServicesInfo } from '../../fetchers'; import { fetchServicesInfo } from '../../fetchers';
import { normalizeCompiledVersion } from '../../../helpers/normalizeCompiledVersion'; import { normalizeCompiledVersion } from '../../../helpers/normalizeCompiledVersion';
import { renderModal } from '../../../partials'; import { renderModal } from '../../../partials';
import { PODKOP_LUCI_APP_VERSION } from '../../../constants';
import { showToast } from '../../../helpers/showToast';
import { renderWikiDisclaimer } from './partials/renderWikiDisclaimer';
import { runSectionsCheck } from './checks/runSectionsCheck';
async function fetchSystemInfo() { async function fetchSystemInfo() {
const systemInfo = await PodkopShellMethods.getSystemInfo(); const systemInfo = await PodkopShellMethods.getSystemInfo();
@@ -218,9 +222,13 @@ async function handleShowGlobalCheck() {
_('Global check'), _('Global check'),
renderModal(globalCheck.data as string, 'global_check'), renderModal(globalCheck.data as string, 'global_check'),
); );
} else {
logger.error('[DIAGNOSTIC]', 'handleShowGlobalCheck - e', globalCheck);
showToast(_('Failed to execute!'), 'error');
} }
} catch (e) { } catch (e) {
logger.error('[DIAGNOSTIC]', 'handleShowGlobalCheck - e', e); logger.error('[DIAGNOSTIC]', 'handleShowGlobalCheck - e', e);
showToast(_('Failed to execute!'), 'error');
} finally { } finally {
store.set({ store.set({
diagnosticsActions: { diagnosticsActions: {
@@ -248,9 +256,13 @@ async function handleViewLogs() {
_('View logs'), _('View logs'),
renderModal(viewLogs.data as string, 'view_logs'), renderModal(viewLogs.data as string, 'view_logs'),
); );
} else {
logger.error('[DIAGNOSTIC]', 'handleViewLogs - e', viewLogs);
showToast(_('Failed to execute!'), 'error');
} }
} catch (e) { } catch (e) {
logger.error('[DIAGNOSTIC]', 'handleViewLogs - e', e); logger.error('[DIAGNOSTIC]', 'handleViewLogs - e', e);
showToast(_('Failed to execute!'), 'error');
} finally { } finally {
store.set({ store.set({
diagnosticsActions: { diagnosticsActions: {
@@ -278,9 +290,17 @@ async function handleShowSingBoxConfig() {
_('Show sing-box config'), _('Show sing-box config'),
renderModal(showSingBoxConfig.data as string, 'show_sing_box_config'), renderModal(showSingBoxConfig.data as string, 'show_sing_box_config'),
); );
} else {
logger.error(
'[DIAGNOSTIC]',
'handleShowSingBoxConfig - e',
showSingBoxConfig,
);
showToast(_('Failed to execute!'), 'error');
} }
} catch (e) { } catch (e) {
logger.error('[DIAGNOSTIC]', 'handleShowSingBoxConfig - e', e); logger.error('[DIAGNOSTIC]', 'handleShowSingBoxConfig - e', e);
showToast(_('Failed to execute!'), 'error');
} finally { } finally {
store.set({ store.set({
diagnosticsActions: { diagnosticsActions: {
@@ -291,6 +311,30 @@ async function handleShowSingBoxConfig() {
} }
} }
function renderWikiDisclaimerWidget() {
const diagnosticsChecks = store.get().diagnosticsChecks;
function getWikiKind() {
const allResults = diagnosticsChecks.map((check) => check.state);
if (allResults.includes('error')) {
return 'error';
}
if (allResults.includes('warning')) {
return 'warning';
}
return 'default';
}
const container = document.getElementById('pdk_diagnostic-page-wiki');
return preserveScrollForPage(() => {
container!.replaceChildren(renderWikiDisclaimer(getWikiKind()));
});
}
function renderDiagnosticAvailableActionsWidget() { function renderDiagnosticAvailableActionsWidget() {
const diagnosticsActions = store.get().diagnosticsActions; const diagnosticsActions = store.get().diagnosticsActions;
const servicesInfoWidget = store.get().servicesInfoWidget; const servicesInfoWidget = store.get().servicesInfoWidget;
@@ -371,9 +415,9 @@ function renderDiagnosticSystemInfoWidget() {
function getPodkopVersionRow(): IRenderSystemInfoRow { function getPodkopVersionRow(): IRenderSystemInfoRow {
const loading = diagnosticsSystemInfo.loading; const loading = diagnosticsSystemInfo.loading;
const unknown = diagnosticsSystemInfo.podkop_version === _('unknown'); const unknown = diagnosticsSystemInfo.podkop_version === _('unknown');
const hasActualVersion = Boolean( const hasActualVersion =
diagnosticsSystemInfo.podkop_latest_version, Boolean(diagnosticsSystemInfo.podkop_latest_version) &&
); diagnosticsSystemInfo.podkop_latest_version !== 'unknown';
const version = normalizeCompiledVersion( const version = normalizeCompiledVersion(
diagnosticsSystemInfo.podkop_version, diagnosticsSystemInfo.podkop_version,
); );
@@ -386,7 +430,12 @@ function renderDiagnosticSystemInfoWidget() {
}; };
} }
if (version !== diagnosticsSystemInfo.podkop_latest_version) { if (version !== `v${diagnosticsSystemInfo.podkop_latest_version}`) {
logger.debug(
'[DIAGNOSTIC]',
'diagnosticsSystemInfo',
diagnosticsSystemInfo,
);
return { return {
key: 'Podkop', key: 'Podkop',
value: version, value: version,
@@ -412,7 +461,7 @@ function renderDiagnosticSystemInfoWidget() {
getPodkopVersionRow(), getPodkopVersionRow(),
{ {
key: 'Luci App', key: 'Luci App',
value: normalizeCompiledVersion(diagnosticsSystemInfo.luci_app_version), value: normalizeCompiledVersion(PODKOP_LUCI_APP_VERSION),
}, },
{ {
key: 'Sing-box', key: 'Sing-box',
@@ -441,6 +490,7 @@ async function onStoreUpdate(
) { ) {
if (diff.diagnosticsChecks) { if (diff.diagnosticsChecks) {
renderDiagnosticsChecks(); renderDiagnosticsChecks();
renderWikiDisclaimerWidget();
} }
if (diff.diagnosticsRunAction) { if (diff.diagnosticsRunAction) {
@@ -469,6 +519,8 @@ async function runChecks() {
await runNftCheck(); await runNftCheck();
await runSectionsCheck();
await runFakeIPCheck(); await runFakeIPCheck();
} catch (e) { } catch (e) {
logger.error('[DIAGNOSTIC]', 'runChecks - e', e); logger.error('[DIAGNOSTIC]', 'runChecks - e', e);
@@ -496,6 +548,9 @@ function onPageMount() {
// Initial system info render // Initial system info render
renderDiagnosticSystemInfoWidget(); renderDiagnosticSystemInfoWidget();
// Initial Wiki disclaimer render
renderWikiDisclaimerWidget();
// Initial services info fetch // Initial services info fetch
fetchServicesInfo(); fetchServicesInfo();

View File

@@ -40,7 +40,7 @@ export function renderAvailableActions({
showSingBoxConfig, showSingBoxConfig,
}: IRenderAvailableActionsProps) { }: IRenderAvailableActionsProps) {
return E('div', { class: 'pdk_diagnostic-page__right-bar__actions' }, [ return E('div', { class: 'pdk_diagnostic-page__right-bar__actions' }, [
E('b', {}, 'Available actions'), E('b', {}, _('Available actions')),
...insertIf(restart.visible, [ ...insertIf(restart.visible, [
renderButton({ renderButton({
classNames: ['cbi-button-apply'], classNames: ['cbi-button-apply'],

View File

@@ -18,7 +18,7 @@ export function renderSystemInfo({ items }: IRenderSystemInfoProps) {
E( E(
'b', 'b',
{ class: 'pdk_diagnostic-page__right-bar__system-info__title' }, { class: 'pdk_diagnostic-page__right-bar__system-info__title' },
'System information', _('System information'),
), ),
...items.map((item) => { ...items.map((item) => {
const tagClass = [ const tagClass = [

View File

@@ -0,0 +1,40 @@
import { renderBookOpenTextIcon24 } from '../../../../icons';
import { renderButton } from '../../../../partials';
import { insertIf } from '../../../../helpers';
export function renderWikiDisclaimer(kind: 'default' | 'error' | 'warning') {
const iconWrap = E('span', {
class: 'pdk_diagnostic-page__right-bar__wiki__icon',
});
iconWrap.appendChild(renderBookOpenTextIcon24());
const className = [
'pdk_diagnostic-page__right-bar__wiki',
...insertIf(kind === 'error', [
'pdk_diagnostic-page__right-bar__wiki--error',
]),
...insertIf(kind === 'warning', [
'pdk_diagnostic-page__right-bar__wiki--warning',
]),
].join(' ');
return E('div', { class: className }, [
E('div', { class: 'pdk_diagnostic-page__right-bar__wiki__content' }, [
iconWrap,
E('div', { class: 'pdk_diagnostic-page__right-bar__wiki__texts' }, [
E('b', {}, _('Troubleshooting')),
E('div', {}, _('Do not panic, everything can be fixed, just...')),
]),
]),
renderButton({
classNames: ['cbi-button-save'],
text: _('Visit Wiki'),
onClick: () =>
window.open(
'https://podkop.net/docs/troubleshooting/?utm_source=podkop',
'_blank',
'noopener,noreferrer',
),
}),
]);
}

View File

@@ -8,6 +8,7 @@ export function render() {
}), }),
]), ]),
E('div', { class: 'pdk_diagnostic-page__right-bar' }, [ E('div', { class: 'pdk_diagnostic-page__right-bar' }, [
E('div', { id: 'pdk_diagnostic-page-wiki' }),
E('div', { id: 'pdk_diagnostic-page-actions' }), E('div', { id: 'pdk_diagnostic-page-actions' }),
E('div', { id: 'pdk_diagnostic-page-system-info' }), E('div', { id: 'pdk_diagnostic-page-system-info' }),
]), ]),

View File

@@ -28,6 +28,31 @@ export const styles = `
grid-row-gap: 10px; grid-row-gap: 10px;
} }
.pdk_diagnostic-page__right-bar__wiki {
border: 2px var(--background-color-low, lightgray) solid;
border-radius: 4px;
padding: 10px;
display: grid;
grid-template-columns: auto;
grid-row-gap: 10px;
}
.pdk_diagnostic-page__right-bar__wiki--warning {
border: 2px var(--warn-color-medium, orange) solid;
}
.pdk_diagnostic-page__right-bar__wiki--error {
border: 2px var(--error-color-medium, red) solid;
}
.pdk_diagnostic-page__right-bar__wiki__content {
display: grid;
grid-template-columns: 1fr 5fr;
grid-column-gap: 10px;
}
.pdk_diagnostic-page__right-bar__wiki__texts {}
.pdk_diagnostic-page__right-bar__actions { .pdk_diagnostic-page__right-bar__actions {
border: 2px var(--background-color-low, lightgray) solid; border: 2px var(--background-color-low, lightgray) solid;
border-radius: 4px; border-radius: 4px;

View File

@@ -126,6 +126,7 @@ export namespace Podkop {
export type ConfigSection = ConfigBaseSection & { export type ConfigSection = ConfigBaseSection & {
'.name': string; '.name': string;
'.type': 'settings' | 'section'; '.type': 'settings' | 'section';
yacd_secret_key?: string;
}; };
export interface MethodSuccessResponse<T> { export interface MethodSuccessResponse<T> {
@@ -196,4 +197,11 @@ export namespace Podkop {
openwrt_version: string; openwrt_version: string;
device_model: string; device_model: string;
} }
export interface GetClashApiProxyLatency {
delay: number;
message?: string;
}
export type GetClashApiGroupLatency = Record<string, number>;
} }

View File

@@ -3,7 +3,18 @@ import { validateDNS } from '../validateDns.js';
import { invalidIPs, validIPs } from './validateIp.test'; import { invalidIPs, validIPs } from './validateIp.test';
import { invalidDomains, validDomains } from './validateDomain.test'; import { invalidDomains, validDomains } from './validateDomain.test';
const validDns = [...validIPs, ...validDomains]; export const additionalValidDns = [
['Google DNS (port 53)', '8.8.8.8:53'],
['Google DNS (port 5353)', '8.8.8.8:5353'],
['Cloudflare DNS (port 853)', '1.1.1.1:853'],
['Cloudflare domain (port 853)', 'cloudflare-dns.com:853'],
['DoH IP', '1.1.1.1/dns-query'],
['DoH IP with port 443', '1.1.1.1:443/dns-query'],
['DoH domain', 'cloudflare-dns.com/dns-query'],
['DoH domain with port 443', 'cloudflare-dns.com:443/dns-query'],
];
const validDns = [...validIPs, ...validDomains, ...additionalValidDns];
const invalidDns = [...invalidIPs, ...invalidDomains]; const invalidDns = [...invalidIPs, ...invalidDomains];

View File

@@ -16,6 +16,7 @@ const invalidUrls = [
['Unsupported protocol (ftp)', 'ftp://example.com'], ['Unsupported protocol (ftp)', 'ftp://example.com'],
['Unsupported protocol (ws)', 'ws://example.com'], ['Unsupported protocol (ws)', 'ws://example.com'],
['Empty string', ''], ['Empty string', ''],
['Without tld', 'https://google'],
]; ];
describe('validateUrl', () => { describe('validateUrl', () => {

View File

@@ -7,11 +7,14 @@ export function validateDNS(value: string): ValidationResult {
return { valid: false, message: _('DNS server address cannot be empty') }; return { valid: false, message: _('DNS server address cannot be empty') };
} }
if (validateIPV4(value).valid) { const cleanedValueWithoutPort = value.replace(/:(\d+)(?=\/|$)/, '');
const cleanedIpWithoutPath = cleanedValueWithoutPort.split('/')[0];
if (validateIPV4(cleanedIpWithoutPath).valid) {
return { valid: true, message: _('Valid') }; return { valid: true, message: _('Valid') };
} }
if (validateDomain(value).valid) { if (validateDomain(cleanedValueWithoutPort).valid) {
return { valid: true, message: _('Valid') }; return { valid: true, message: _('Valid') };
} }

View File

@@ -1,18 +1,8 @@
import { ValidationResult } from './types'; import { ValidationResult } from './types';
// TODO refactor current validation and add tests
export function validateOutboundJson(value: string): ValidationResult { export function validateOutboundJson(value: string): ValidationResult {
try { try {
const parsed = JSON.parse(value); JSON.parse(value);
if (!parsed.type || !parsed.server || !parsed.server_port) {
return {
valid: false,
message: _(
'Outbound JSON must contain at least "type", "server" and "server_port" fields',
),
};
}
return { valid: true, message: _('Valid') }; return { valid: true, message: _('Valid') };
} catch { } catch {

View File

@@ -6,20 +6,22 @@ import { validateSocksUrl } from './validateSocksUrl';
// TODO refactor current validation and add tests // TODO refactor current validation and add tests
export function validateProxyUrl(url: string): ValidationResult { export function validateProxyUrl(url: string): ValidationResult {
if (url.startsWith('ss://')) { const trimmedUrl = url.trim();
return validateShadowsocksUrl(url);
if (trimmedUrl.startsWith('ss://')) {
return validateShadowsocksUrl(trimmedUrl);
} }
if (url.startsWith('vless://')) { if (trimmedUrl.startsWith('vless://')) {
return validateVlessUrl(url); return validateVlessUrl(trimmedUrl);
} }
if (url.startsWith('trojan://')) { if (trimmedUrl.startsWith('trojan://')) {
return validateTrojanUrl(url); return validateTrojanUrl(trimmedUrl);
} }
if (/^socks(4|4a|5):\/\//.test(url)) { if (/^socks(4|4a|5):\/\//.test(trimmedUrl)) {
return validateSocksUrl(url); return validateSocksUrl(trimmedUrl);
} }
return { return {

View File

@@ -2,19 +2,31 @@ import { ValidationResult } from './types';
export function validateUrl( export function validateUrl(
url: string, url: string,
protocols: string[] = ['http:', 'https:'], protocols = ['http:', 'https:'],
): ValidationResult { ): ValidationResult {
try { if (!url.length) {
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) {
return { valid: false, message: _('Invalid URL format') }; 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') };
} }

View File

@@ -43,7 +43,8 @@ export function validateVlessUrl(url: string): ValidationResult {
if (!port) if (!port)
return { valid: false, message: 'Invalid VLESS URL: missing port' }; return { valid: false, message: 'Invalid VLESS URL: missing port' };
const portNum = Number(port); const cleanedPort = port.replace('/', '');
const portNum = Number(cleanedPort);
if (!Number.isInteger(portNum) || portNum < 1 || portNum > 65535) if (!Number.isInteger(portNum) || portNum < 1 || portNum > 65535)
return { return {
valid: false, valid: false,

View File

@@ -240,7 +240,7 @@ check_system() {
exit 1 exit 1
fi fi
Check version # Check version
if command -v podkop > /dev/null 2>&1; then if command -v podkop > /dev/null 2>&1; then
local version local version
version=$(/usr/bin/podkop show_version 2> /dev/null) version=$(/usr/bin/podkop show_version 2> /dev/null)

View File

@@ -40,10 +40,12 @@ function validateDNS(value) {
if (!value) { if (!value) {
return { valid: false, message: _("DNS server address cannot be empty") }; return { valid: false, message: _("DNS server address cannot be empty") };
} }
if (validateIPV4(value).valid) { const cleanedValueWithoutPort = value.replace(/:(\d+)(?=\/|$)/, "");
const cleanedIpWithoutPath = cleanedValueWithoutPort.split("/")[0];
if (validateIPV4(cleanedIpWithoutPath).valid) {
return { valid: true, message: _("Valid") }; return { valid: true, message: _("Valid") };
} }
if (validateDomain(value).valid) { if (validateDomain(cleanedValueWithoutPort).valid) {
return { valid: true, message: _("Valid") }; return { valid: true, message: _("Valid") };
} }
return { return {
@@ -56,18 +58,22 @@ function validateDNS(value) {
// src/validators/validateUrl.ts // src/validators/validateUrl.ts
function validateUrl(url, protocols = ["http:", "https:"]) { function validateUrl(url, protocols = ["http:", "https:"]) {
try { if (!url.length) {
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) {
return { valid: false, message: _("Invalid URL format") }; 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 // src/validators/validatePath.ts
@@ -259,7 +265,8 @@ function validateVlessUrl(url) {
return { valid: false, message: "Invalid VLESS URL: missing hostname" }; return { valid: false, message: "Invalid VLESS URL: missing hostname" };
if (!port) if (!port)
return { valid: false, message: "Invalid VLESS URL: missing port" }; return { valid: false, message: "Invalid VLESS URL: missing port" };
const portNum = Number(port); const cleanedPort = port.replace("/", "");
const portNum = Number(cleanedPort);
if (!Number.isInteger(portNum) || portNum < 1 || portNum > 65535) if (!Number.isInteger(portNum) || portNum < 1 || portNum > 65535)
return { return {
valid: false, valid: false,
@@ -320,15 +327,7 @@ function validateVlessUrl(url) {
// src/validators/validateOutboundJson.ts // src/validators/validateOutboundJson.ts
function validateOutboundJson(value) { function validateOutboundJson(value) {
try { try {
const parsed = JSON.parse(value); JSON.parse(value);
if (!parsed.type || !parsed.server || !parsed.server_port) {
return {
valid: false,
message: _(
'Outbound JSON must contain at least "type", "server" and "server_port" fields'
)
};
}
return { valid: true, message: _("Valid") }; return { valid: true, message: _("Valid") };
} catch { } catch {
return { valid: false, message: _("Invalid JSON format") }; return { valid: false, message: _("Invalid JSON format") };
@@ -451,17 +450,18 @@ function validateSocksUrl(url) {
// src/validators/validateProxyUrl.ts // src/validators/validateProxyUrl.ts
function validateProxyUrl(url) { function validateProxyUrl(url) {
if (url.startsWith("ss://")) { const trimmedUrl = url.trim();
return validateShadowsocksUrl(url); if (trimmedUrl.startsWith("ss://")) {
return validateShadowsocksUrl(trimmedUrl);
} }
if (url.startsWith("vless://")) { if (trimmedUrl.startsWith("vless://")) {
return validateVlessUrl(url); return validateVlessUrl(trimmedUrl);
} }
if (url.startsWith("trojan://")) { if (trimmedUrl.startsWith("trojan://")) {
return validateTrojanUrl(url); return validateTrojanUrl(trimmedUrl);
} }
if (/^socks(4|4a|5):\/\//.test(url)) { if (/^socks(4|4a|5):\/\//.test(trimmedUrl)) {
return validateSocksUrl(url); return validateSocksUrl(trimmedUrl);
} }
return { return {
valid: false, valid: false,
@@ -486,7 +486,7 @@ async function callBaseMethod(method, args = [], command = "/usr/bin/podkop") {
const response = await executeShellCommand({ const response = await executeShellCommand({
command, command,
args: [method, ...args], args: [method, ...args],
timeout: 1e4 timeout: 15e3
}); });
if (response.stdout) { if (response.stdout) {
try { try {
@@ -559,14 +559,14 @@ var PodkopShellMethods = {
getClashApiProxies: async () => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [ getClashApiProxies: async () => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [
Podkop.AvailableClashAPIMethods.GET_PROXIES Podkop.AvailableClashAPIMethods.GET_PROXIES
]), ]),
getClashApiProxyLatency: async (tag) => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [ getClashApiProxyLatency: async (tag) => callBaseMethod(
Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, Podkop.AvailableMethods.CLASH_API,
tag [Podkop.AvailableClashAPIMethods.GET_PROXY_LATENCY, tag, "5000"]
]), ),
getClashApiGroupLatency: async (tag) => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [ getClashApiGroupLatency: async (tag) => callBaseMethod(
Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, Podkop.AvailableMethods.CLASH_API,
tag [Podkop.AvailableClashAPIMethods.GET_GROUP_LATENCY, tag, "10000"]
]), ),
setClashApiGroupProxy: async (group, proxy) => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [ setClashApiGroupProxy: async (group, proxy) => callBaseMethod(Podkop.AvailableMethods.CLASH_API, [
Podkop.AvailableClashAPIMethods.SET_GROUP_PROXY, Podkop.AvailableClashAPIMethods.SET_GROUP_PROXY,
group, group,
@@ -731,10 +731,18 @@ async function getDashboardSections() {
}; };
} }
// src/podkop/methods/custom/getClashApiSecret.ts
async function getClashApiSecret() {
const sections = await getConfigSections();
const settings = sections.find((section) => section[".type"] === "settings");
return settings?.yacd_secret_key || "";
}
// src/podkop/methods/custom/index.ts // src/podkop/methods/custom/index.ts
var CustomPodkopMethods = { var CustomPodkopMethods = {
getConfigSections, getConfigSections,
getDashboardSections getDashboardSections,
getClashApiSecret
}; };
// src/constants.ts // src/constants.ts
@@ -978,26 +986,36 @@ var TabService = class _TabService {
}; };
var TabServiceInstance = TabService.getInstance(); var TabServiceInstance = TabService.getInstance();
// src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts
function getCheckTitle(name) {
return `${name} ${_("checks")}`;
}
// src/podkop/tabs/diagnostic/checks/contstants.ts // src/podkop/tabs/diagnostic/checks/contstants.ts
var DIAGNOSTICS_CHECKS_MAP = { var DIAGNOSTICS_CHECKS_MAP = {
["DNS" /* DNS */]: { ["DNS" /* DNS */]: {
order: 1, order: 1,
title: _("DNS checks"), title: getCheckTitle("DNS"),
code: "DNS" /* DNS */ code: "DNS" /* DNS */
}, },
["SINGBOX" /* SINGBOX */]: { ["SINGBOX" /* SINGBOX */]: {
order: 2, order: 2,
title: _("Sing-box checks"), title: getCheckTitle("Sing-box"),
code: "SINGBOX" /* SINGBOX */ code: "SINGBOX" /* SINGBOX */
}, },
["NFT" /* NFT */]: { ["NFT" /* NFT */]: {
order: 3, order: 3,
title: _("Nftables checks"), title: getCheckTitle("Nftables"),
code: "NFT" /* NFT */ code: "NFT" /* NFT */
}, },
["FAKEIP" /* FAKEIP */]: { ["OUTBOUNDS" /* OUTBOUNDS */]: {
order: 4, order: 4,
title: _("FakeIP checks"), title: getCheckTitle("Outbounds"),
code: "OUTBOUNDS" /* OUTBOUNDS */
},
["FAKEIP" /* FAKEIP */]: {
order: 5,
title: getCheckTitle("FakeIP"),
code: "FAKEIP" /* FAKEIP */ code: "FAKEIP" /* FAKEIP */
} }
}; };
@@ -1065,6 +1083,14 @@ var initialDiagnosticStore = {
items: [], items: [],
state: "skipped" state: "skipped"
}, },
{
code: "OUTBOUNDS" /* OUTBOUNDS */,
title: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.title,
order: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.order,
description: _("Not running"),
items: [],
state: "skipped"
},
{ {
code: "FAKEIP" /* FAKEIP */, code: "FAKEIP" /* FAKEIP */,
title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title, title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title,
@@ -1081,7 +1107,7 @@ var loadingDiagnosticsChecksStore = {
code: "DNS" /* DNS */, code: "DNS" /* DNS */,
title: DIAGNOSTICS_CHECKS_MAP.DNS.title, title: DIAGNOSTICS_CHECKS_MAP.DNS.title,
order: DIAGNOSTICS_CHECKS_MAP.DNS.order, order: DIAGNOSTICS_CHECKS_MAP.DNS.order,
description: _("Queued"), description: _("Pending"),
items: [], items: [],
state: "skipped" state: "skipped"
}, },
@@ -1089,7 +1115,7 @@ var loadingDiagnosticsChecksStore = {
code: "SINGBOX" /* SINGBOX */, code: "SINGBOX" /* SINGBOX */,
title: DIAGNOSTICS_CHECKS_MAP.SINGBOX.title, title: DIAGNOSTICS_CHECKS_MAP.SINGBOX.title,
order: DIAGNOSTICS_CHECKS_MAP.SINGBOX.order, order: DIAGNOSTICS_CHECKS_MAP.SINGBOX.order,
description: _("Queued"), description: _("Pending"),
items: [], items: [],
state: "skipped" state: "skipped"
}, },
@@ -1097,7 +1123,15 @@ var loadingDiagnosticsChecksStore = {
code: "NFT" /* NFT */, code: "NFT" /* NFT */,
title: DIAGNOSTICS_CHECKS_MAP.NFT.title, title: DIAGNOSTICS_CHECKS_MAP.NFT.title,
order: DIAGNOSTICS_CHECKS_MAP.NFT.order, order: DIAGNOSTICS_CHECKS_MAP.NFT.order,
description: _("Queued"), description: _("Pending"),
items: [],
state: "skipped"
},
{
code: "OUTBOUNDS" /* OUTBOUNDS */,
title: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.title,
order: DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS.order,
description: _("Pending"),
items: [], items: [],
state: "skipped" state: "skipped"
}, },
@@ -1105,7 +1139,7 @@ var loadingDiagnosticsChecksStore = {
code: "FAKEIP" /* FAKEIP */, code: "FAKEIP" /* FAKEIP */,
title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title, title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title,
order: DIAGNOSTICS_CHECKS_MAP.FAKEIP.order, order: DIAGNOSTICS_CHECKS_MAP.FAKEIP.order,
description: _("Queued"), description: _("Pending"),
items: [], items: [],
state: "skipped" state: "skipped"
} }
@@ -1850,8 +1884,9 @@ async function fetchDashboardSections() {
}); });
} }
async function connectToClashSockets() { async function connectToClashSockets() {
const clashApiSecret = await getClashApiSecret();
socket.subscribe( socket.subscribe(
`${getClashWsUrl()}/traffic?token=`, `${getClashWsUrl()}/traffic?token=${clashApiSecret}`,
(msg) => { (msg) => {
const parsedMsg = JSON.parse(msg); const parsedMsg = JSON.parse(msg);
store.set({ store.set({
@@ -1878,7 +1913,7 @@ async function connectToClashSockets() {
} }
); );
socket.subscribe( socket.subscribe(
`${getClashWsUrl()}/connections?token=`, `${getClashWsUrl()}/connections?token=${clashApiSecret}`,
(msg) => { (msg) => {
const parsedMsg = JSON.parse(msg); const parsedMsg = JSON.parse(msg);
store.set({ store.set({
@@ -2335,6 +2370,7 @@ function render2() {
}) })
]), ]),
E("div", { class: "pdk_diagnostic-page__right-bar" }, [ E("div", { class: "pdk_diagnostic-page__right-bar" }, [
E("div", { id: "pdk_diagnostic-page-wiki" }),
E("div", { id: "pdk_diagnostic-page-actions" }), E("div", { id: "pdk_diagnostic-page-actions" }),
E("div", { id: "pdk_diagnostic-page-system-info" }) E("div", { id: "pdk_diagnostic-page-system-info" })
]) ])
@@ -2355,6 +2391,26 @@ function updateCheckStore(check, minified) {
}); });
} }
// src/podkop/tabs/diagnostic/helpers/getMeta.ts
function getMeta({ allGood, atLeastOneGood }) {
if (allGood) {
return {
state: "success",
description: _("Checks passed")
};
}
if (atLeastOneGood) {
return {
state: "warning",
description: _("Issues detected")
};
}
return {
state: "error",
description: _("Checks failed")
};
}
// src/podkop/tabs/diagnostic/checks/runDnsCheck.ts // src/podkop/tabs/diagnostic/checks/runDnsCheck.ts
async function runDnsCheck() { async function runDnsCheck() {
const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.DNS; const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.DNS;
@@ -2362,7 +2418,7 @@ async function runDnsCheck() {
order, order,
code, code,
title, title,
description: _("Checking dns, please wait"), description: _("Checking, please wait"),
state: "loading", state: "loading",
items: [] items: []
}); });
@@ -2372,7 +2428,7 @@ async function runDnsCheck() {
order, order,
code, code,
title, title,
description: _("Cannot receive DNS checks result"), description: _("Cannot receive checks result"),
state: "error", state: "error",
items: [] items: []
}); });
@@ -2381,24 +2437,16 @@ async function runDnsCheck() {
const data = dnsChecks.data; const data = dnsChecks.data;
const allGood = Boolean(data.dns_on_router) && Boolean(data.dhcp_config_status) && Boolean(data.bootstrap_dns_status) && Boolean(data.dns_status); const allGood = Boolean(data.dns_on_router) && Boolean(data.dhcp_config_status) && Boolean(data.bootstrap_dns_status) && Boolean(data.dns_status);
const atLeastOneGood = Boolean(data.dns_on_router) || Boolean(data.dhcp_config_status) || Boolean(data.bootstrap_dns_status) || Boolean(data.dns_status); const atLeastOneGood = Boolean(data.dns_on_router) || Boolean(data.dhcp_config_status) || Boolean(data.bootstrap_dns_status) || Boolean(data.dns_status);
function getStatus() { const { state, description } = getMeta({ atLeastOneGood, allGood });
if (allGood) {
return "success";
}
if (atLeastOneGood) {
return "warning";
}
return "error";
}
updateCheckStore({ updateCheckStore({
order, order,
code, code,
title, title,
description: _("DNS checks passed"), description,
state: getStatus(), state,
items: [ items: [
...insertIf( ...insertIf(
data.dns_type === "doh" || data.dns_type === "dot", data.dns_type === "doh" || data.dns_type === "dot" || !data.bootstrap_dns_status,
[ [
{ {
state: data.bootstrap_dns_status ? "success" : "error", state: data.bootstrap_dns_status ? "success" : "error",
@@ -2436,7 +2484,7 @@ async function runSingBoxCheck() {
order, order,
code, code,
title, title,
description: _("Checking sing-box, please wait"), description: _("Checking, please wait"),
state: "loading", state: "loading",
items: [] items: []
}); });
@@ -2446,7 +2494,7 @@ async function runSingBoxCheck() {
order, order,
code, code,
title, title,
description: _("Cannot receive Sing-box checks result"), description: _("Cannot receive checks result"),
state: "error", state: "error",
items: [] items: []
}); });
@@ -2455,21 +2503,13 @@ async function runSingBoxCheck() {
const data = singBoxChecks.data; const data = singBoxChecks.data;
const allGood = Boolean(data.sing_box_installed) && Boolean(data.sing_box_version_ok) && Boolean(data.sing_box_service_exist) && Boolean(data.sing_box_autostart_disabled) && Boolean(data.sing_box_process_running) && Boolean(data.sing_box_ports_listening); const allGood = Boolean(data.sing_box_installed) && Boolean(data.sing_box_version_ok) && Boolean(data.sing_box_service_exist) && Boolean(data.sing_box_autostart_disabled) && Boolean(data.sing_box_process_running) && Boolean(data.sing_box_ports_listening);
const atLeastOneGood = Boolean(data.sing_box_installed) || Boolean(data.sing_box_version_ok) || Boolean(data.sing_box_service_exist) || Boolean(data.sing_box_autostart_disabled) || Boolean(data.sing_box_process_running) || Boolean(data.sing_box_ports_listening); const atLeastOneGood = Boolean(data.sing_box_installed) || Boolean(data.sing_box_version_ok) || Boolean(data.sing_box_service_exist) || Boolean(data.sing_box_autostart_disabled) || Boolean(data.sing_box_process_running) || Boolean(data.sing_box_ports_listening);
function getStatus() { const { state, description } = getMeta({ atLeastOneGood, allGood });
if (allGood) {
return "success";
}
if (atLeastOneGood) {
return "warning";
}
return "error";
}
updateCheckStore({ updateCheckStore({
order, order,
code, code,
title, title,
description: _("Sing-box checks passed"), description,
state: getStatus(), state,
items: [ items: [
{ {
state: data.sing_box_installed ? "success" : "error", state: data.sing_box_installed ? "success" : "error",
@@ -2478,7 +2518,7 @@ async function runSingBoxCheck() {
}, },
{ {
state: data.sing_box_version_ok ? "success" : "error", 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: "" value: ""
}, },
{ {
@@ -2515,7 +2555,7 @@ async function runNftCheck() {
order, order,
code, code,
title, title,
description: _("Checking nftables, please wait"), description: _("Checking, please wait"),
state: "loading", state: "loading",
items: [] items: []
}); });
@@ -2527,7 +2567,7 @@ async function runNftCheck() {
order, order,
code, code,
title, title,
description: _("Cannot receive nftables checks result"), description: _("Cannot receive checks result"),
state: "error", state: "error",
items: [] items: []
}); });
@@ -2536,21 +2576,13 @@ async function runNftCheck() {
const data = nftablesChecks.data; const data = nftablesChecks.data;
const allGood = Boolean(data.table_exist) && Boolean(data.rules_mangle_exist) && Boolean(data.rules_mangle_counters) && Boolean(data.rules_mangle_output_exist) && Boolean(data.rules_mangle_output_counters) && Boolean(data.rules_proxy_exist) && Boolean(data.rules_proxy_counters) && !data.rules_other_mark_exist; const allGood = Boolean(data.table_exist) && Boolean(data.rules_mangle_exist) && Boolean(data.rules_mangle_counters) && Boolean(data.rules_mangle_output_exist) && Boolean(data.rules_mangle_output_counters) && Boolean(data.rules_proxy_exist) && Boolean(data.rules_proxy_counters) && !data.rules_other_mark_exist;
const atLeastOneGood = Boolean(data.table_exist) || Boolean(data.rules_mangle_exist) || Boolean(data.rules_mangle_counters) || Boolean(data.rules_mangle_output_exist) || Boolean(data.rules_mangle_output_counters) || Boolean(data.rules_proxy_exist) || Boolean(data.rules_proxy_counters) || !data.rules_other_mark_exist; const atLeastOneGood = Boolean(data.table_exist) || Boolean(data.rules_mangle_exist) || Boolean(data.rules_mangle_counters) || Boolean(data.rules_mangle_output_exist) || Boolean(data.rules_mangle_output_counters) || Boolean(data.rules_proxy_exist) || Boolean(data.rules_proxy_counters) || !data.rules_other_mark_exist;
function getStatus() { const { state, description } = getMeta({ atLeastOneGood, allGood });
if (allGood) {
return "success";
}
if (atLeastOneGood) {
return "warning";
}
return "error";
}
updateCheckStore({ updateCheckStore({
order, order,
code, code,
title, title,
description: allGood ? _("Nftables checks passed") : _("Nftables checks partially passed"), description,
state: getStatus(), state,
items: [ items: [
{ {
state: data.table_exist ? "success" : "error", state: data.table_exist ? "success" : "error",
@@ -2606,7 +2638,7 @@ async function runFakeIPCheck() {
order, order,
code, code,
title, title,
description: _("Checking FakeIP, please wait"), description: _("Checking, please wait"),
state: "loading", state: "loading",
items: [] items: []
}); });
@@ -2620,25 +2652,7 @@ async function runFakeIPCheck() {
}; };
const allGood = checks.router || checks.browserFakeIP || checks.differentIP; const allGood = checks.router || checks.browserFakeIP || checks.differentIP;
const atLeastOneGood = checks.router && checks.browserFakeIP && checks.differentIP; const atLeastOneGood = checks.router && checks.browserFakeIP && checks.differentIP;
function getMeta() { const { state, description } = getMeta({ atLeastOneGood, allGood });
if (allGood) {
return {
state: "success",
description: _("FakeIP checks passed")
};
}
if (atLeastOneGood) {
return {
state: "warning",
description: _("FakeIP checks partially passed")
};
}
return {
state: "error",
description: _("FakeIP checks failed")
};
}
const { state, description } = getMeta();
updateCheckStore({ updateCheckStore({
order, order,
code, code,
@@ -3211,6 +3225,34 @@ function renderSearchIcon24() {
); );
} }
// src/icons/renderBookOpenTextIcon24.ts
function renderBookOpenTextIcon24() {
const NS = "http://www.w3.org/2000/svg";
return svgEl(
"svg",
{
xmlns: NS,
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
"stroke-width": "2",
"stroke-linecap": "round",
"stroke-linejoin": "round",
class: "lucide lucide-book-open-text-icon lucide-book-open-text"
},
[
svgEl("path", { d: "M12 7v14" }),
svgEl("path", { d: "M16 12h2" }),
svgEl("path", { d: "M16 8h2" }),
svgEl("path", {
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"
}),
svgEl("path", { d: "M6 12h2" }),
svgEl("path", { d: "M6 8h2" })
]
);
}
// src/partials/button/renderButton.ts // src/partials/button/renderButton.ts
function renderButton({ function renderButton({
classNames = [], classNames = [],
@@ -3341,7 +3383,7 @@ function renderAvailableActions({
showSingBoxConfig showSingBoxConfig
}) { }) {
return E("div", { class: "pdk_diagnostic-page__right-bar__actions" }, [ return E("div", { class: "pdk_diagnostic-page__right-bar__actions" }, [
E("b", {}, "Available actions"), E("b", {}, _("Available actions")),
...insertIf(restart.visible, [ ...insertIf(restart.visible, [
renderButton({ renderButton({
classNames: ["cbi-button-apply"], classNames: ["cbi-button-apply"],
@@ -3599,7 +3641,7 @@ function renderSystemInfo({ items }) {
E( E(
"b", "b",
{ class: "pdk_diagnostic-page__right-bar__system-info__title" }, { class: "pdk_diagnostic-page__right-bar__system-info__title" },
"System information" _("System information")
), ),
...items.map((item) => { ...items.map((item) => {
const tagClass = [ const tagClass = [
@@ -3634,6 +3676,140 @@ function normalizeCompiledVersion(version) {
return version; return version;
} }
// src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts
function renderWikiDisclaimer(kind) {
const iconWrap = E("span", {
class: "pdk_diagnostic-page__right-bar__wiki__icon"
});
iconWrap.appendChild(renderBookOpenTextIcon24());
const className = [
"pdk_diagnostic-page__right-bar__wiki",
...insertIf(kind === "error", [
"pdk_diagnostic-page__right-bar__wiki--error"
]),
...insertIf(kind === "warning", [
"pdk_diagnostic-page__right-bar__wiki--warning"
])
].join(" ");
return E("div", { class: className }, [
E("div", { class: "pdk_diagnostic-page__right-bar__wiki__content" }, [
iconWrap,
E("div", { class: "pdk_diagnostic-page__right-bar__wiki__texts" }, [
E("b", {}, _("Troubleshooting")),
E("div", {}, _("Do not panic, everything can be fixed, just..."))
])
]),
renderButton({
classNames: ["cbi-button-save"],
text: _("Visit Wiki"),
onClick: () => window.open(
"https://podkop.net/docs/troubleshooting/?utm_source=podkop",
"_blank",
"noopener,noreferrer"
)
})
]);
}
// src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts
async function runSectionsCheck() {
const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.OUTBOUNDS;
updateCheckStore({
order,
code,
title,
description: _("Checking, please wait"),
state: "loading",
items: []
});
const sections = await getDashboardSections();
if (!sections.success) {
updateCheckStore({
order,
code,
title,
description: _("Cannot receive checks result"),
state: "error",
items: []
});
throw new Error("Sections checks failed");
}
const items = await Promise.all(
sections.data.map(async (section) => {
async function getLatency() {
if (section.withTagSelect) {
const latencyGroup = await PodkopShellMethods.getClashApiGroupLatency(
section.code
);
const selectedOutbound = section.outbounds.find(
(item) => item.selected
);
const isUrlTest = selectedOutbound?.type === "URLTest";
const success3 = latencyGroup.success && !latencyGroup.data.message;
if (success3) {
if (isUrlTest) {
const latency2 = Object.values(latencyGroup.data).map((item) => item ? `${item}ms` : "n/a").join(" / ");
return {
success: true,
latency: `[${_("Fastest")}] ${latency2}`
};
}
const selectedProxyDelay = latencyGroup.data?.[selectedOutbound?.code ?? ""];
if (selectedProxyDelay) {
return {
success: true,
latency: `[${selectedOutbound?.displayName ?? ""}] ${selectedProxyDelay}ms`
};
}
return {
success: false,
latency: `[${selectedOutbound?.displayName ?? ""}] ${_("Not responding")}`
};
}
return {
success: false,
latency: _("Not responding")
};
}
const latencyProxy = await PodkopShellMethods.getClashApiProxyLatency(
section.code
);
const success2 = latencyProxy.success && !latencyProxy.data.message;
if (success2) {
return {
success: true,
latency: `${latencyProxy.data.delay} ms`
};
}
return {
success: false,
latency: _("Not responding")
};
}
const { latency, success } = await getLatency();
return {
state: success ? "success" : "error",
key: section.displayName,
value: latency
};
})
);
const allGood = items.every((item) => item.state === "success");
const atLeastOneGood = items.some((item) => item.state === "success");
const { state, description } = getMeta({ atLeastOneGood, allGood });
updateCheckStore({
order,
code,
title,
description,
state,
items
});
if (!atLeastOneGood) {
throw new Error("Sections checks failed");
}
}
// src/podkop/tabs/diagnostic/initController.ts // src/podkop/tabs/diagnostic/initController.ts
async function fetchSystemInfo() { async function fetchSystemInfo() {
const systemInfo = await PodkopShellMethods.getSystemInfo(); const systemInfo = await PodkopShellMethods.getSystemInfo();
@@ -3813,9 +3989,13 @@ async function handleShowGlobalCheck() {
_("Global check"), _("Global check"),
renderModal(globalCheck.data, "global_check") renderModal(globalCheck.data, "global_check")
); );
} else {
logger.error("[DIAGNOSTIC]", "handleShowGlobalCheck - e", globalCheck);
showToast(_("Failed to execute!"), "error");
} }
} catch (e) { } catch (e) {
logger.error("[DIAGNOSTIC]", "handleShowGlobalCheck - e", e); logger.error("[DIAGNOSTIC]", "handleShowGlobalCheck - e", e);
showToast(_("Failed to execute!"), "error");
} finally { } finally {
store.set({ store.set({
diagnosticsActions: { diagnosticsActions: {
@@ -3840,9 +4020,13 @@ async function handleViewLogs() {
_("View logs"), _("View logs"),
renderModal(viewLogs.data, "view_logs") renderModal(viewLogs.data, "view_logs")
); );
} else {
logger.error("[DIAGNOSTIC]", "handleViewLogs - e", viewLogs);
showToast(_("Failed to execute!"), "error");
} }
} catch (e) { } catch (e) {
logger.error("[DIAGNOSTIC]", "handleViewLogs - e", e); logger.error("[DIAGNOSTIC]", "handleViewLogs - e", e);
showToast(_("Failed to execute!"), "error");
} finally { } finally {
store.set({ store.set({
diagnosticsActions: { diagnosticsActions: {
@@ -3867,9 +4051,17 @@ async function handleShowSingBoxConfig() {
_("Show sing-box config"), _("Show sing-box config"),
renderModal(showSingBoxConfig.data, "show_sing_box_config") renderModal(showSingBoxConfig.data, "show_sing_box_config")
); );
} else {
logger.error(
"[DIAGNOSTIC]",
"handleShowSingBoxConfig - e",
showSingBoxConfig
);
showToast(_("Failed to execute!"), "error");
} }
} catch (e) { } catch (e) {
logger.error("[DIAGNOSTIC]", "handleShowSingBoxConfig - e", e); logger.error("[DIAGNOSTIC]", "handleShowSingBoxConfig - e", e);
showToast(_("Failed to execute!"), "error");
} finally { } finally {
store.set({ store.set({
diagnosticsActions: { diagnosticsActions: {
@@ -3879,6 +4071,23 @@ async function handleShowSingBoxConfig() {
}); });
} }
} }
function renderWikiDisclaimerWidget() {
const diagnosticsChecks = store.get().diagnosticsChecks;
function getWikiKind() {
const allResults = diagnosticsChecks.map((check) => check.state);
if (allResults.includes("error")) {
return "error";
}
if (allResults.includes("warning")) {
return "warning";
}
return "default";
}
const container = document.getElementById("pdk_diagnostic-page-wiki");
return preserveScrollForPage(() => {
container.replaceChildren(renderWikiDisclaimer(getWikiKind()));
});
}
function renderDiagnosticAvailableActionsWidget() { function renderDiagnosticAvailableActionsWidget() {
const diagnosticsActions = store.get().diagnosticsActions; const diagnosticsActions = store.get().diagnosticsActions;
const servicesInfoWidget = store.get().servicesInfoWidget; const servicesInfoWidget = store.get().servicesInfoWidget;
@@ -3948,9 +4157,7 @@ function renderDiagnosticSystemInfoWidget() {
function getPodkopVersionRow() { function getPodkopVersionRow() {
const loading = diagnosticsSystemInfo.loading; const loading = diagnosticsSystemInfo.loading;
const unknown = diagnosticsSystemInfo.podkop_version === _("unknown"); const unknown = diagnosticsSystemInfo.podkop_version === _("unknown");
const hasActualVersion = Boolean( const hasActualVersion = Boolean(diagnosticsSystemInfo.podkop_latest_version) && diagnosticsSystemInfo.podkop_latest_version !== "unknown";
diagnosticsSystemInfo.podkop_latest_version
);
const version = normalizeCompiledVersion( const version = normalizeCompiledVersion(
diagnosticsSystemInfo.podkop_version diagnosticsSystemInfo.podkop_version
); );
@@ -3961,7 +4168,12 @@ function renderDiagnosticSystemInfoWidget() {
value: version value: version
}; };
} }
if (version !== diagnosticsSystemInfo.podkop_latest_version) { if (version !== `v${diagnosticsSystemInfo.podkop_latest_version}`) {
logger.debug(
"[DIAGNOSTIC]",
"diagnosticsSystemInfo",
diagnosticsSystemInfo
);
return { return {
key: "Podkop", key: "Podkop",
value: version, value: version,
@@ -3985,7 +4197,7 @@ function renderDiagnosticSystemInfoWidget() {
getPodkopVersionRow(), getPodkopVersionRow(),
{ {
key: "Luci App", key: "Luci App",
value: normalizeCompiledVersion(diagnosticsSystemInfo.luci_app_version) value: normalizeCompiledVersion(PODKOP_LUCI_APP_VERSION)
}, },
{ {
key: "Sing-box", key: "Sing-box",
@@ -4008,6 +4220,7 @@ function renderDiagnosticSystemInfoWidget() {
async function onStoreUpdate2(next, prev, diff) { async function onStoreUpdate2(next, prev, diff) {
if (diff.diagnosticsChecks) { if (diff.diagnosticsChecks) {
renderDiagnosticsChecks(); renderDiagnosticsChecks();
renderWikiDisclaimerWidget();
} }
if (diff.diagnosticsRunAction) { if (diff.diagnosticsRunAction) {
renderDiagnosticRunActionWidget(); renderDiagnosticRunActionWidget();
@@ -4028,6 +4241,7 @@ async function runChecks() {
await runDnsCheck(); await runDnsCheck();
await runSingBoxCheck(); await runSingBoxCheck();
await runNftCheck(); await runNftCheck();
await runSectionsCheck();
await runFakeIPCheck(); await runFakeIPCheck();
} catch (e) { } catch (e) {
logger.error("[DIAGNOSTIC]", "runChecks - e", e); logger.error("[DIAGNOSTIC]", "runChecks - e", e);
@@ -4042,6 +4256,7 @@ function onPageMount2() {
renderDiagnosticRunActionWidget(); renderDiagnosticRunActionWidget();
renderDiagnosticAvailableActionsWidget(); renderDiagnosticAvailableActionsWidget();
renderDiagnosticSystemInfoWidget(); renderDiagnosticSystemInfoWidget();
renderWikiDisclaimerWidget();
fetchServicesInfo(); fetchServicesInfo();
fetchSystemInfo(); fetchSystemInfo();
} }
@@ -4120,6 +4335,31 @@ var styles4 = `
grid-row-gap: 10px; grid-row-gap: 10px;
} }
.pdk_diagnostic-page__right-bar__wiki {
border: 2px var(--background-color-low, lightgray) solid;
border-radius: 4px;
padding: 10px;
display: grid;
grid-template-columns: auto;
grid-row-gap: 10px;
}
.pdk_diagnostic-page__right-bar__wiki--warning {
border: 2px var(--warn-color-medium, orange) solid;
}
.pdk_diagnostic-page__right-bar__wiki--error {
border: 2px var(--error-color-medium, red) solid;
}
.pdk_diagnostic-page__right-bar__wiki__content {
display: grid;
grid-template-columns: 1fr 5fr;
grid-column-gap: 10px;
}
.pdk_diagnostic-page__right-bar__wiki__texts {}
.pdk_diagnostic-page__right-bar__actions { .pdk_diagnostic-page__right-bar__actions {
border: 2px var(--background-color-low, lightgray) solid; border: 2px var(--background-color-low, lightgray) solid;
border-radius: 4px; border-radius: 4px;
@@ -4508,6 +4748,10 @@ function insertIf(condition, elements) {
function insertIfObj(condition, object) { function insertIfObj(condition, object) {
return condition ? object : {}; return condition ? object : {};
} }
// src/main.ts
if (typeof structuredClone !== "function")
globalThis.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));
return baseclass.extend({ return baseclass.extend({
ALLOWED_WITH_RUSSIA_INSIDE, ALLOWED_WITH_RUSSIA_INSIDE,
BOOTSTRAP_DNS_SERVER_OPTIONS, BOOTSTRAP_DNS_SERVER_OPTIONS,

View File

@@ -104,6 +104,70 @@ function createSectionContent(section) {
return validation.message; 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.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,
"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.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( o = section.option(
form.Flag, form.Flag,
"enable_udp_over_tcp", "enable_udp_over_tcp",
@@ -241,7 +305,7 @@ function createSectionContent(section) {
(v) => v === lastSelected || !main.REGIONAL_OPTIONS.includes(v), (v) => v === lastSelected || !main.REGIONAL_OPTIONS.includes(v),
); );
notifications.push( notifications.push(
E("p", { class: "alert-message warning" }, [ E("p", {}, [
E("strong", {}, _("Regional options cannot be used together")), E("strong", {}, _("Regional options cannot be used together")),
E("br"), E("br"),
_( _(
@@ -381,7 +445,7 @@ function createSectionContent(section) {
); );
o.value("disabled", _("Disabled")); o.value("disabled", _("Disabled"));
o.value("dynamic", _("Dynamic List")); o.value("dynamic", _("Dynamic List"));
o.value("text", _("Text List (comma/space/newline separated)")); o.value("text", _("Text List"));
o.default = "disabled"; o.default = "disabled";
o.rmempty = false; o.rmempty = false;

View File

@@ -240,6 +240,25 @@ function createSettingsContent(section) {
o.default = "0"; o.default = "0";
o.rmempty = false; o.rmempty = false;
o = section.option(
form.Flag,
"enable_yacd_wan_access",
_("Enable YACD WAN Access"),
_("Allows access to YACD from the WAN. Make sure to open the appropriate port in your firewall."),
);
o.depends("enable_yacd", "1");
o.default = "0";
o.rmempty = false;
o = section.option(
form.Value,
"yacd_secret_key",
_("YACD Secret Key"),
_("Secret key for authenticating remote access to YACD when WAN access is enabled."),
);
o.depends("enable_yacd_wan_access", "1");
o.rmempty = false;
o = section.option( o = section.option(
form.Flag, form.Flag,
"disable_quic", "disable_quic",
@@ -267,7 +286,7 @@ function createSettingsContent(section) {
form.Flag, form.Flag,
"download_lists_via_proxy", "download_lists_via_proxy",
_("Download Lists via Proxy/VPN"), _("Download Lists via Proxy/VPN"),
_("Downloading all lists via main Proxy/VPN"), _("Downloading all lists via specific Proxy/VPN"),
); );
o.default = "0"; o.default = "0";
o.rmempty = false; o.rmempty = false;

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PODKOP\n" "Project-Id-Version: PODKOP\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-21 23:02+0300\n" "POT-Creation-Date: 2025-11-06 16:19+0200\n"
"PO-Revision-Date: 2025-10-21 23:02+0300\n" "PO-Revision-Date: 2025-11-06 16:19+0200\n"
"Last-Translator: divocat\n" "Last-Translator: divocat\n"
"Language-Team: none\n" "Language-Team: none\n"
"Language: ru\n" "Language: ru\n"
@@ -35,6 +35,9 @@ msgstr "Активные соединения"
msgid "Additional marking rules found" msgid "Additional marking rules found"
msgstr "Найдены дополнительные правила маркировки" msgstr "Найдены дополнительные правила маркировки"
msgid "Allows access to YACD from the WAN. Make sure to open the appropriate port in your firewall."
msgstr "Обеспечивает доступ к YACD из WAN. Убедитесь, что в брандмауэре открыт соответствующий порт."
msgid "Applicable for SOCKS and Shadowsocks proxy" msgid "Applicable for SOCKS and Shadowsocks proxy"
msgstr "Применимо для SOCKS и Shadowsocks прокси" msgstr "Применимо для SOCKS и Shadowsocks прокси"
@@ -44,6 +47,9 @@ msgstr "Необходимо указать хотя бы один действ
msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed."
msgstr "Необходимо указать хотя бы одну действительную подсеть или IP. Только комментарии недопустимы." msgstr "Необходимо указать хотя бы одну действительную подсеть или IP. Только комментарии недопустимы."
msgid "Available actions"
msgstr "Доступные действия"
msgid "Bootsrap DNS" msgid "Bootsrap DNS"
msgstr "Bootstrap DNS" msgstr "Bootstrap DNS"
@@ -62,26 +68,20 @@ msgstr "Путь к файлу кэша"
msgid "Cache file path cannot be empty" msgid "Cache file path cannot be empty"
msgstr "Путь к файлу кэша не может быть пустым" msgstr "Путь к файлу кэша не может быть пустым"
msgid "Cannot receive DNS checks result" msgid "Cannot receive checks result"
msgstr "Не удалось получить результаты проверки DNS" msgstr "Не удалось получить результаты проверки"
msgid "Cannot receive nftables checks result" msgid "Checking, please wait"
msgstr "Не удалось получить результаты проверки nftables" msgstr "Проверяем, пожалуйста подождите"
msgid "Cannot receive Sing-box checks result" msgid "checks"
msgstr "Не удалось получить результаты проверки Sing-box" msgstr "проверки"
msgid "Checking dns, please wait" msgid "Checks failed"
msgstr "Проверка dns, пожалуйста подождите" msgstr "Проверки не выполнены"
msgid "Checking FakeIP, please wait" msgid "Checks passed"
msgstr "Проверка FakeIP, пожалуйста подождите" msgstr "Проверки пройдены"
msgid "Checking nftables, please wait"
msgstr "Проверка nftables, пожалуйста подождите"
msgid "Checking sing-box, please wait"
msgstr "Проверка sing-box, пожалуйста подождите"
msgid "CIDR must be between 0 and 32" msgid "CIDR must be between 0 and 32"
msgstr "CIDR должен быть между 0 и 32" msgstr "CIDR должен быть между 0 и 32"
@@ -143,12 +143,6 @@ msgstr "Отключить QUIC протокол для улучшения со
msgid "Disabled" msgid "Disabled"
msgstr "Отключено" msgstr "Отключено"
msgid "DNS checks"
msgstr "DNS проверки"
msgid "DNS checks passed"
msgstr "DNS проверки успешно завершены"
msgid "DNS on router" msgid "DNS on router"
msgstr "DNS на роутере" msgstr "DNS на роутере"
@@ -170,6 +164,9 @@ msgstr "DNS-сервер"
msgid "DNS server address cannot be empty" msgid "DNS server address cannot be empty"
msgstr "Адрес DNS-сервера не может быть пустым" msgstr "Адрес DNS-сервера не может быть пустым"
msgid "Do not panic, everything can be fixed, just..."
msgstr "Не паникуйте, всё можно исправить, просто..."
msgid "Domain Resolver" msgid "Domain Resolver"
msgstr "Резолвер доменов" msgstr "Резолвер доменов"
@@ -188,9 +185,6 @@ msgstr "Скачивать списки через Proxy/VPN"
msgid "Download Lists via specific proxy section" msgid "Download Lists via specific proxy section"
msgstr "Скачивать списки через выбранную секцию" msgstr "Скачивать списки через выбранную секцию"
msgid "Downloading all lists via main Proxy/VPN"
msgstr "Загрузка всех списков через основной прокси/VPN"
msgid "Downloading all lists via specific Proxy/VPN" msgid "Downloading all lists via specific Proxy/VPN"
msgstr "Загрузка всех списков через указанный прокси/VPN" msgstr "Загрузка всех списков через указанный прокси/VPN"
@@ -215,6 +209,9 @@ msgstr "Включить смешанный прокси-сервер, разр
msgid "Enable YACD" msgid "Enable YACD"
msgstr "Включить YACD" msgstr "Включить YACD"
msgid "Enable YACD WAN Access"
msgstr "Включить доступ YACD WAN"
msgid "Enter complete outbound configuration in JSON format" msgid "Enter complete outbound configuration in JSON format"
msgstr "Введите полную конфигурацию исходящего соединения в формате JSON" msgstr "Введите полную конфигурацию исходящего соединения в формате JSON"
@@ -227,6 +224,18 @@ msgstr "Введите доменные имена без протоколов,
msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" 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-адреса" 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" msgid "Exclude NTP"
msgstr "Исключить NTP" msgstr "Исключить NTP"
@@ -236,17 +245,8 @@ msgstr "Исключите трафик протокола NTP из туннел
msgid "Failed to copy!" msgid "Failed to copy!"
msgstr "Не удалось скопировать!" msgstr "Не удалось скопировать!"
msgid "FakeIP checks" msgid "Failed to execute!"
msgstr "Проверка FakeIP" msgstr "Не удалось выполнить!"
msgid "FakeIP checks failed"
msgstr "Проверки FakeIP не пройдены"
msgid "FakeIP checks partially passed"
msgstr "Проверка FakeIP частично пройдена"
msgid "FakeIP checks passed"
msgstr "Проверки FakeIP пройдены"
msgid "Fastest" msgid "Fastest"
msgstr "Самый быстрый" msgstr "Самый быстрый"
@@ -365,6 +365,9 @@ msgstr "Неверный URL VLESS: ошибка разбора"
msgid "IP address 0.0.0.0 is not allowed" msgid "IP address 0.0.0.0 is not allowed"
msgstr "IP-адрес 0.0.0.0 не допускается" msgstr "IP-адрес 0.0.0.0 не допускается"
msgid "Issues detected"
msgstr "Обнаружены проблемы"
msgid "Latest" msgid "Latest"
msgstr "Последняя" msgstr "Последняя"
@@ -389,24 +392,21 @@ msgstr "Порт смешанного прокси"
msgid "Monitored Interfaces" msgid "Monitored Interfaces"
msgstr "Наблюдаемые интерфейсы" msgstr "Наблюдаемые интерфейсы"
msgid "Must be a number in the range of 50 - 1000"
msgstr "Должно быть числом от 50 до 1000"
msgid "Network Interface" msgid "Network Interface"
msgstr "Сетевой интерфейс" msgstr "Сетевой интерфейс"
msgid "Nftables checks"
msgstr "Проверки Nftables"
msgid "Nftables checks partially passed"
msgstr "Проверки Nftables частично пройдена"
msgid "Nftables checks passed"
msgstr "Nftables проверки успешно завершены"
msgid "No other marking rules found" msgid "No other marking rules found"
msgstr "Другие правила маркировки не найдены" msgstr "Другие правила маркировки не найдены"
msgid "Not implement yet" msgid "Not implement yet"
msgstr "Ещё не реализовано" msgstr "Ещё не реализовано"
msgid "Not responding"
msgstr "Не отвечает"
msgid "Not running" msgid "Not running"
msgstr "Не запущено" msgstr "Не запущено"
@@ -419,9 +419,6 @@ msgstr "Конфигурация Outbound"
msgid "Outbound Configuration" msgid "Outbound Configuration"
msgstr "Конфигурация исходящего соединения" msgstr "Конфигурация исходящего соединения"
msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields"
msgstr "JSON должен содержать поля \"type\", \"server\" и \"server_port\""
msgid "Outdated" msgid "Outdated"
msgstr "Устаревшая" msgstr "Устаревшая"
@@ -440,6 +437,9 @@ msgstr "Путь должен содержать хотя бы одну дире
msgid "Path must end with cache.db" msgid "Path must end with cache.db"
msgstr "Путь должен заканчиваться на cache.db" msgstr "Путь должен заканчиваться на cache.db"
msgid "Pending"
msgstr "Ожидает запуска"
msgid "Podkop" msgid "Podkop"
msgstr "Podkop" msgstr "Podkop"
@@ -458,17 +458,14 @@ msgstr "Прокси-трафик не маршрутизируется чере
msgid "Proxy traffic is routed via FakeIP" msgid "Proxy traffic is routed via FakeIP"
msgstr "Прокси-трафик направляется через FakeIP" msgstr "Прокси-трафик направляется через FakeIP"
msgid "Queued"
msgstr "В очереди"
msgid "Regional options cannot be used together" msgid "Regional options cannot be used together"
msgstr "Нельзя использовать несколько региональных опций одновременно" msgstr "Нельзя использовать несколько региональных опций одновременно"
msgid "Remote Domain Lists" msgid "Remote Domain Lists"
msgstr "Удалённые списки доменов" msgstr "Внешние списки доменов"
msgid "Remote Subnet Lists" msgid "Remote Subnet Lists"
msgstr "Удалённые списки подсетей" msgstr "Внешние списки подсетей"
msgid "Restart podkop" msgid "Restart podkop"
msgstr "Перезапустить Podkop" msgstr "Перезапустить Podkop"
@@ -506,6 +503,9 @@ msgstr "Запустить диагностику"
msgid "Russia inside restrictions" msgid "Russia inside restrictions"
msgstr "Ограничения Russia inside" msgstr "Ограничения Russia inside"
msgid "Secret key for authenticating remote access to YACD when WAN access is enabled."
msgstr "Секретный ключ для аутентификации удаленного доступа к YACD при включенном доступе через WAN."
msgid "Sections" msgid "Sections"
msgstr "Секции" msgstr "Секции"
@@ -569,12 +569,6 @@ msgstr "Sing-box"
msgid "Sing-box autostart disabled" msgid "Sing-box autostart disabled"
msgstr "Автостарт sing-box отключен" msgstr "Автостарт sing-box отключен"
msgid "Sing-box checks"
msgstr "Sing-box проверки"
msgid "Sing-box checks passed"
msgstr "Sing-box проверки успешно завершены"
msgid "Sing-box installed" msgid "Sing-box installed"
msgstr "Sing-box установлен" msgstr "Sing-box установлен"
@@ -587,8 +581,8 @@ msgstr "Процесс sing-box запущен"
msgid "Sing-box service exist" msgid "Sing-box service exist"
msgstr "Сервис sing-box существует" msgstr "Сервис sing-box существует"
msgid "Sing-box version >= 1.12.4" msgid "Sing-box version is compatible (newer than 1.12.4)"
msgstr "Версия sing-box >= 1.12.4" msgstr "Версия Sing-box совместима (новее 1.12.4)"
msgid "Source Network Interface" msgid "Source Network Interface"
msgstr "Сетевой интерфейс источника" msgstr "Сетевой интерфейс источника"
@@ -600,10 +594,10 @@ msgid "Specify local IP addresses or subnets whose traffic will always be routed
msgstr "Укажите локальные IP-адреса или подсети, трафик которых всегда будет направляться через настроенный маршрут." msgstr "Укажите локальные IP-адреса или подсети, трафик которых всегда будет направляться через настроенный маршрут."
msgid "Specify remote URLs to download and use domain lists" msgid "Specify remote URLs to download and use domain lists"
msgstr "Укажите удаленные URL-адреса для загрузки и использования списков доменов." msgstr "Укажите URL-адреса для загрузки и использования списков доменов."
msgid "Specify remote URLs to download and use subnet lists" msgid "Specify remote URLs to download and use subnet lists"
msgstr "Укажите удаленные URL-адреса для загрузки и использования списков подсетей." msgstr "Укажите URL-адреса для загрузки и использования списков подсетей."
msgid "Specify the path to the list file located on the router filesystem" msgid "Specify the path to the list file located on the router filesystem"
msgstr "Укажите путь к файлу списка, расположенному в файловой системе маршрутизатора." msgstr "Укажите путь к файлу списка, расположенному в файловой системе маршрутизатора."
@@ -620,11 +614,14 @@ msgstr "Успешно скопировано!"
msgid "System info" msgid "System info"
msgstr "Системная информация" msgstr "Системная информация"
msgid "System information"
msgstr "Системная информация"
msgid "Table exist" msgid "Table exist"
msgstr "Таблица существует" msgstr "Таблица существует"
msgid "Test latency" msgid "Test latency"
msgstr "Измерить задержки" msgstr "Тестирование задержки"
msgid "Text List" msgid "Text List"
msgstr "Текстовый список" msgstr "Текстовый список"
@@ -635,6 +632,15 @@ msgstr "Текстовый список (через запятую, пробел
msgid "The DNS server used to look up the IP address of an upstream DNS server" msgid "The DNS server used to look up the IP address of an upstream DNS server"
msgstr "DNS-сервер, используемый для поиска IP-адреса вышестоящего DNS-сервера" 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)" msgid "Time in seconds for DNS record caching (default: 60)"
msgstr "Время в секундах для кэширования DNS записей (по умолчанию: 60)" msgstr "Время в секундах для кэширования DNS записей (по умолчанию: 60)"
@@ -644,6 +650,9 @@ msgstr "Трафик"
msgid "Traffic Total" msgid "Traffic Total"
msgstr "Всего трафика" msgstr "Всего трафика"
msgid "Troubleshooting"
msgstr "Устранение неполадок"
msgid "TTL must be a positive number" msgid "TTL must be a positive number"
msgstr "TTL должно быть положительным числом" msgstr "TTL должно быть положительным числом"
@@ -674,9 +683,18 @@ msgstr "URL должен использовать один из следующи
msgid "URLTest" msgid "URLTest"
msgstr "URLTest" msgstr "URLTest"
msgid "URLTest Check Interval"
msgstr "Интервал проверки URLTest"
msgid "URLTest Proxy Links" msgid "URLTest Proxy Links"
msgstr "Ссылки прокси для URLTest" msgstr "Ссылки прокси для URLTest"
msgid "URLTest Testing URL"
msgstr "URLTest ссылка для проверки"
msgid "URLTest Tolerance"
msgstr "URLTest допустимое отклонение"
msgid "User Domain List Type" msgid "User Domain List Type"
msgstr "Тип пользовательского списка доменов" msgstr "Тип пользовательского списка доменов"
@@ -704,11 +722,17 @@ msgstr "Ошибки валидации:"
msgid "View logs" msgid "View logs"
msgstr "Посмотреть логи" msgstr "Посмотреть логи"
msgid "Visit Wiki"
msgstr "Перейти в wiki"
msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgid "Warning: %s cannot be used together with %s. Previous selections have been removed."
msgstr "Предупреждение: %s нельзя использовать вместе с %s. Предыдущие варианты были удалены." msgstr "Предупреждение: %s нельзя использовать вместе с %s. Предыдущие варианты были удалены."
msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection." msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection."
msgstr "Предупреждение: Russia inside может быть использован только с %s. %s уже есть в Russia inside и будет удален из выбранных." msgstr "Предупреждение: Russia inside может быть использован только с %s. %s уже есть в Russia inside и будет удален из выбранных."
msgid "YACD Secret Key"
msgstr "Секретный ключ YACD"
msgid "You can select Output Network Interface, by default autodetect" msgid "You can select Output Network Interface, by default autodetect"
msgstr "Вы можете выбрать выходной сетевой интерфейс, по умолчанию он определяется автоматически." msgstr "Вы можете выбрать выходной сетевой интерфейс, по умолчанию он определяется автоматически."

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PODKOP\n" "Project-Id-Version: PODKOP\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-21 20:02+0300\n" "POT-Creation-Date: 2025-11-06 14:19+0200\n"
"PO-Revision-Date: 2025-10-21 20:02+0300\n" "PO-Revision-Date: 2025-11-06 14:19+0200\n"
"Last-Translator: divocat <divocatt@gmail.com>\n" "Last-Translator: divocat <divocatt@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
@@ -36,23 +36,31 @@ msgstr ""
msgid "Active Connections" msgid "Active Connections"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:117 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:106
msgid "Additional marking rules found" msgid "Additional marking rules found"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:111 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:247
msgid "Allows access to YACD from the WAN. Make sure to open the appropriate port in your firewall."
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:175
msgid "Applicable for SOCKS and Shadowsocks proxy" msgid "Applicable for SOCKS and Shadowsocks proxy"
msgstr "" 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." msgid "At least one valid domain must be specified. Comments-only content is not allowed."
msgstr "" 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." msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed."
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:43
msgid "Available actions"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:65
msgid "Bootsrap DNS" msgid "Bootsrap DNS"
msgstr "" msgstr ""
@@ -60,48 +68,47 @@ msgstr ""
msgid "Bootstrap DNS server" msgid "Bootstrap DNS server"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:81 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:58
msgid "Browser is not using FakeIP" msgid "Browser is not using FakeIP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:80 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57
msgid "Browser is using FakeIP correctly" msgid "Browser is using FakeIP correctly"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:322 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:348
msgid "Cache File Path" msgid "Cache File Path"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:336 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:362
msgid "Cache file path cannot be empty" msgid "Cache file path cannot be empty"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:26 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:27
msgid "Cannot receive DNS checks result" #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:28
#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:27
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:25
msgid "Cannot receive checks result"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:27 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:15
msgid "Cannot receive nftables checks result" #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:15
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:13
#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:15
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:13
msgid "Checking, please wait"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:24 #: src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts:2
msgid "Cannot receive Sing-box checks result" msgid "checks"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:14 #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:26
msgid "Checking dns, please wait" msgid "Checks failed"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:14 #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13
msgid "Checking FakeIP, please wait" msgid "Checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:12
msgid "Checking nftables, please wait"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:12
msgid "Checking sing-box, please wait"
msgstr "" msgstr ""
#: src/validators/validateSubnet.ts:33 #: src/validators/validateSubnet.ts:33
@@ -112,11 +119,11 @@ msgstr ""
msgid "Close" msgid "Close"
msgstr "" 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" msgid "Community Lists"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:309 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:335
msgid "Config File Path" msgid "Config File Path"
msgstr "" msgstr ""
@@ -152,15 +159,15 @@ msgstr ""
msgid "Dashboard currently unavailable" msgid "Dashboard currently unavailable"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:215 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222
msgid "Delay in milliseconds before reloading podkop after interface UP" msgid "Delay in milliseconds before reloading podkop after interface UP"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:229
msgid "Delay value cannot be empty" msgid "Delay value cannot be empty"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:89 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:82
msgid "DHCP has DNS server" msgid "DHCP has DNS server"
msgstr "" msgstr ""
@@ -172,42 +179,34 @@ msgstr ""
msgid "Disable autostart" msgid "Disable autostart"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:239 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:265
msgid "Disable QUIC" msgid "Disable QUIC"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:240 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:266
msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming" msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:302 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:366
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:382 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:446
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:14 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:77
msgid "DNS checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:64
msgid "DNS checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:84
msgid "DNS on router" msgid "DNS on router"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:15
msgid "DNS over HTTPS (DoH)" msgid "DNS over HTTPS (DoH)"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:16
msgid "DNS over TLS (DoT)" msgid "DNS over TLS (DoT)"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:12
msgid "DNS Protocol Type" msgid "DNS Protocol Type"
msgstr "" msgstr ""
@@ -216,7 +215,7 @@ msgstr ""
msgid "DNS Rewrite TTL" msgid "DNS Rewrite TTL"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:24
msgid "DNS Server" msgid "DNS Server"
msgstr "" msgstr ""
@@ -225,11 +224,15 @@ msgstr ""
msgid "DNS server address cannot be empty" msgid "DNS server address cannot be empty"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:166 #: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:26
msgid "Do not panic, everything can be fixed, just..."
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:230
msgid "Domain Resolver" msgid "Domain Resolver"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:300 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:326
msgid "Dont Touch My DHCP!" msgid "Dont Touch My DHCP!"
msgstr "" msgstr ""
@@ -242,24 +245,21 @@ msgstr ""
msgid "Download" msgid "Download"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:262 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:288
msgid "Download Lists via Proxy/VPN" msgid "Download Lists via Proxy/VPN"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:271 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:297
msgid "Download Lists via specific proxy section" msgid "Download Lists via specific proxy section"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:263 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:289
msgid "Downloading all lists via main Proxy/VPN" #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:298
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:272
msgid "Downloading all lists via specific Proxy/VPN" msgid "Downloading all lists via specific Proxy/VPN"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:303 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:367
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:383 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:447
msgid "Dynamic List" msgid "Dynamic List"
msgstr "" msgstr ""
@@ -267,11 +267,11 @@ msgstr ""
msgid "Enable autostart" msgid "Enable autostart"
msgstr "" 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" msgid "Enable built-in DNS resolver for domains handled by this section"
msgstr "" 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" msgid "Enable Mixed Proxy"
msgstr "" msgstr ""
@@ -279,35 +279,55 @@ msgstr ""
msgid "Enable Output Network Interface" msgid "Enable Output Network Interface"
msgstr "" 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" msgid "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:230 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:237
msgid "Enable YACD" msgid "Enable YACD"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:246
msgid "Enable YACD WAN Access"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:65 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:65
msgid "Enter complete outbound configuration in JSON format" msgid "Enter complete outbound configuration in JSON format"
msgstr "" 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 //" msgid "Enter domain names separated by commas, spaces, or newlines. You can add comments using //"
msgstr "" 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" msgid "Enter domain names without protocols, e.g. example.com or sub.example.com"
msgstr "" 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" msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:358 #: ../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:384
msgid "Exclude NTP" msgid "Exclude NTP"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:359 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:385
msgid "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN" msgid "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN"
msgstr "" msgstr ""
@@ -315,27 +335,21 @@ msgstr ""
msgid "Failed to copy!" msgid "Failed to copy!"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:29 #: src/podkop/tabs/diagnostic/initController.ts:227
msgid "FakeIP checks" #: src/podkop/tabs/diagnostic/initController.ts:231
msgstr "" #: src/podkop/tabs/diagnostic/initController.ts:261
#: src/podkop/tabs/diagnostic/initController.ts:265
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57 #: src/podkop/tabs/diagnostic/initController.ts:299
msgid "FakeIP checks failed" #: src/podkop/tabs/diagnostic/initController.ts:303
msgstr "" msgid "Failed to execute!"
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51
msgid "FakeIP checks partially passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:44
msgid "FakeIP checks passed"
msgstr "" msgstr ""
#: src/podkop/methods/custom/getDashboardSections.ts:117 #: src/podkop/methods/custom/getDashboardSections.ts:117
#: src/podkop/tabs/diagnostic/checks/runSectionsCheck.ts:59
msgid "Fastest" msgid "Fastest"
msgstr "" 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" msgid "Fully Routed IPs"
msgstr "" msgstr ""
@@ -343,7 +357,7 @@ msgstr ""
msgid "Get global check" msgid "Get global check"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:218 #: src/podkop/tabs/diagnostic/initController.ts:222
msgid "Global check" msgid "Global check"
msgstr "" msgstr ""
@@ -351,19 +365,19 @@ msgstr ""
msgid "HTTP error" msgid "HTTP error"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:182 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:189
msgid "Interface Monitoring" msgid "Interface Monitoring"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:214 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:221
msgid "Interface Monitoring Delay" msgid "Interface Monitoring Delay"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:183 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:190
msgid "Interface monitoring for Bad WAN" msgid "Interface monitoring for Bad WAN"
msgstr "" msgstr ""
#: src/validators/validateDns.ts:20 #: src/validators/validateDns.ts:23
msgid "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH" msgid "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH"
msgstr "" msgstr ""
@@ -380,7 +394,7 @@ msgstr ""
msgid "Invalid IP address" msgid "Invalid IP address"
msgstr "" msgstr ""
#: src/validators/validateOutboundJson.ts:19 #: src/validators/validateOutboundJson.ts:9
msgid "Invalid JSON format" msgid "Invalid JSON format"
msgstr "" msgstr ""
@@ -476,11 +490,12 @@ msgstr ""
msgid "Invalid Trojan URL: parsing failed" msgid "Invalid Trojan URL: parsing failed"
msgstr "" msgstr ""
#: src/validators/validateUrl.ts:18 #: src/validators/validateUrl.ts:8
#: src/validators/validateUrl.ts:31
msgid "Invalid URL format" msgid "Invalid URL format"
msgstr "" msgstr ""
#: src/validators/validateVlessUrl.ts:109 #: src/validators/validateVlessUrl.ts:110
msgid "Invalid VLESS URL: parsing failed" msgid "Invalid VLESS URL: parsing failed"
msgstr "" msgstr ""
@@ -488,23 +503,27 @@ msgstr ""
msgid "IP address 0.0.0.0 is not allowed" msgid "IP address 0.0.0.0 is not allowed"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:404 #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20
msgid "Issues detected"
msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:453
msgid "Latest" msgid "Latest"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:250 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:276
msgid "List Update Frequency" msgid "List Update Frequency"
msgstr "" 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" msgid "Local Domain Lists"
msgstr "" 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" msgid "Local Subnet Lists"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:79 #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72
msgid "Main DNS" msgid "Main DNS"
msgstr "" msgstr ""
@@ -512,31 +531,23 @@ msgstr ""
msgid "Memory Usage" msgid "Memory Usage"
msgstr "" 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" msgid "Mixed Proxy Port"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:191 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:198
msgid "Monitored Interfaces" msgid "Monitored Interfaces"
msgstr "" 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" msgid "Network Interface"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:24 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105
msgid "Nftables checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:75
msgid "Nftables checks partially passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74
msgid "Nftables checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:116
msgid "No other marking rules found" msgid "No other marking rules found"
msgstr "" msgstr ""
@@ -544,10 +555,17 @@ msgstr ""
msgid "Not implement yet" msgid "Not implement yet"
msgstr "" msgstr ""
#: 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 ""
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:55 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:55
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:63 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:63
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:71 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:71
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:79 #: src/podkop/tabs/diagnostic/diagnostic.store.ts:79
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:87
msgid "Not running" msgid "Not running"
msgstr "" msgstr ""
@@ -563,11 +581,7 @@ msgstr ""
msgid "Outbound Configuration" msgid "Outbound Configuration"
msgstr "" msgstr ""
#: src/validators/validateOutboundJson.ts:11 #: src/podkop/tabs/diagnostic/initController.ts:443
msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields"
msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:394
msgid "Outdated" msgid "Outdated"
msgstr "" msgstr ""
@@ -579,18 +593,26 @@ msgstr ""
msgid "Path cannot be empty" msgid "Path cannot be empty"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:340 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:366
msgid "Path must be absolute (start with /)" msgid "Path must be absolute (start with /)"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:349 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:375
msgid "Path must contain at least one directory (like /tmp/cache.db)" msgid "Path must contain at least one directory (like /tmp/cache.db)"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:344 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:370
msgid "Path must end with cache.db" msgid "Path must end with cache.db"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:127
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:135
msgid "Pending"
msgstr ""
#: src/podkop/tabs/dashboard/initController.ts:340 #: src/podkop/tabs/dashboard/initController.ts:340
msgid "Podkop" msgid "Podkop"
msgstr "" msgstr ""
@@ -599,7 +621,7 @@ msgstr ""
msgid "Podkop Settings" msgid "Podkop Settings"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:301 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:327
msgid "Podkop will not modify your DHCP configuration" msgid "Podkop will not modify your DHCP configuration"
msgstr "" msgstr ""
@@ -607,30 +629,23 @@ msgstr ""
msgid "Proxy Configuration URL" msgid "Proxy Configuration URL"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:89 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:66
msgid "Proxy traffic is not routed via FakeIP" msgid "Proxy traffic is not routed via FakeIP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:88 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:65
msgid "Proxy traffic is routed via FakeIP" msgid "Proxy traffic is routed via FakeIP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:95 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:309
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111
#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119
msgid "Queued"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245
msgid "Regional options cannot be used together" msgid "Regional options cannot be used together"
msgstr "" 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" msgid "Remote Domain Lists"
msgstr "" 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" msgid "Remote Subnet Lists"
msgstr "" msgstr ""
@@ -638,39 +653,39 @@ msgstr ""
msgid "Restart podkop" msgid "Restart podkop"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:74 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51
msgid "Router DNS is not routed through sing-box" msgid "Router DNS is not routed through sing-box"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:73 #: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:50
msgid "Router DNS is routed through sing-box" msgid "Router DNS is routed through sing-box"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:369 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:395
msgid "Routing Excluded IPs" msgid "Routing Excluded IPs"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:90 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:79
msgid "Rules mangle counters" msgid "Rules mangle counters"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:85 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74
msgid "Rules mangle exist" msgid "Rules mangle exist"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:100 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:89
msgid "Rules mangle output counters" msgid "Rules mangle output counters"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:95 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:84
msgid "Rules mangle output exist" msgid "Rules mangle output exist"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:110 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:99
msgid "Rules proxy counters" msgid "Rules proxy counters"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105 #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:94
msgid "Rules proxy exist" msgid "Rules proxy exist"
msgstr "" msgstr ""
@@ -678,15 +693,19 @@ msgstr ""
msgid "Run Diagnostic" msgid "Run Diagnostic"
msgstr "" 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" msgid "Russia inside restrictions"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:257
msgid "Secret key for authenticating remote access to YACD when WAN access is enabled."
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:36 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:36
msgid "Sections" msgid "Sections"
msgstr "" 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" msgid "Select a predefined list for routing"
msgstr "" msgstr ""
@@ -698,7 +717,7 @@ msgstr ""
msgid "Select DNS protocol to use" msgid "Select DNS protocol to use"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:251 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:277
msgid "Select how often the domain or subnet lists are updated automatically" msgid "Select how often the domain or subnet lists are updated automatically"
msgstr "" msgstr ""
@@ -706,32 +725,32 @@ msgstr ""
msgid "Select how to configure the proxy" msgid "Select how to configure the proxy"
msgstr "" 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" msgid "Select network interface for VPN connection"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:25
msgid "Select or enter DNS server address" msgid "Select or enter DNS server address"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:323 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:349
msgid "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing" msgid "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:310 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:336
msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing" msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing"
msgstr "" 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" msgid "Select the DNS protocol type for the domain resolver"
msgstr "" 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" msgid "Select the list type for adding custom domains"
msgstr "" 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" msgid "Select the list type for adding custom subnets"
msgstr "" msgstr ""
@@ -743,7 +762,7 @@ msgstr ""
msgid "Select the network interface to which the traffic will originate" msgid "Select the network interface to which the traffic will originate"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:192 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:199
msgid "Select the WAN interfaces to be monitored" msgid "Select the WAN interfaces to be monitored"
msgstr "" msgstr ""
@@ -755,7 +774,7 @@ msgstr ""
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:278 #: src/podkop/tabs/diagnostic/initController.ts:290
#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116
msgid "Show sing-box config" msgid "Show sing-box config"
msgstr "" msgstr ""
@@ -764,60 +783,52 @@ msgstr ""
msgid "Sing-box" msgid "Sing-box"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:86 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:77
msgid "Sing-box autostart disabled" msgid "Sing-box autostart disabled"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/contstants.ts:19 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:62
msgid "Sing-box checks"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:66
msgid "Sing-box checks passed"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:71
msgid "Sing-box installed" msgid "Sing-box installed"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:96 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:87
msgid "Sing-box listening ports" msgid "Sing-box listening ports"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:91 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:82
msgid "Sing-box process running" msgid "Sing-box process running"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:81 #: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:72
msgid "Sing-box service exist" msgid "Sing-box service exist"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:76 #: 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 "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:89 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:89
msgid "Source Network Interface" msgid "Source Network Interface"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:370 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:396
msgid "Specify a local IP address to be excluded from routing" msgid "Specify a local IP address to be excluded from routing"
msgstr "" 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" msgid "Specify local IP addresses or subnets whose traffic will always be routed through the configured route"
msgstr "" 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" msgid "Specify remote URLs to download and use domain lists"
msgstr "" 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" msgid "Specify remote URLs to download and use subnet lists"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:459 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:523
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:482 #: ../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" msgid "Specify the path to the list file located on the router filesystem"
msgstr "" msgstr ""
@@ -837,7 +848,11 @@ msgstr ""
msgid "System info" msgid "System info"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:80 #: src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts:21
msgid "System information"
msgstr ""
#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:69
msgid "Table exist" msgid "Table exist"
msgstr "" msgstr ""
@@ -845,11 +860,11 @@ msgstr ""
msgid "Test latency" msgid "Test latency"
msgstr "" 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" msgid "Text List"
msgstr "" 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)" msgid "Text List (comma/space/newline separated)"
msgstr "" msgstr ""
@@ -857,6 +872,18 @@ msgstr ""
msgid "The DNS server used to look up the IP address of an upstream DNS server" msgid "The DNS server used to look up the IP address of an upstream DNS server"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:69
msgid "Time in seconds for DNS record caching (default: 60)" msgid "Time in seconds for DNS record caching (default: 60)"
msgstr "" msgstr ""
@@ -869,6 +896,10 @@ msgstr ""
msgid "Traffic Total" msgid "Traffic Total"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:25
msgid "Troubleshooting"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:80 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:80
msgid "TTL must be a positive number" msgid "TTL must be a positive number"
msgstr "" msgstr ""
@@ -877,22 +908,22 @@ msgstr ""
msgid "TTL value cannot be empty" msgid "TTL value cannot be empty"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:17
msgid "UDP (Unprotected DNS)" msgid "UDP (Unprotected DNS)"
msgstr "" 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" msgid "UDP over TCP"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:34
#: src/podkop/tabs/diagnostic/initController.ts:35
#: src/podkop/tabs/diagnostic/initController.ts:36
#: src/podkop/tabs/diagnostic/initController.ts:37
#: src/podkop/tabs/diagnostic/initController.ts:38 #: src/podkop/tabs/diagnostic/initController.ts:38
#: src/podkop/tabs/diagnostic/initController.ts:39 #: src/podkop/tabs/diagnostic/initController.ts:39
#: src/podkop/tabs/diagnostic/initController.ts:373 #: src/podkop/tabs/diagnostic/initController.ts:40
#: src/podkop/tabs/diagnostic/initController.ts:41
#: src/podkop/tabs/diagnostic/initController.ts:42
#: src/podkop/tabs/diagnostic/initController.ts:43
#: src/podkop/tabs/diagnostic/initController.ts:417
msgid "unknown" msgid "unknown"
msgstr "" msgstr ""
@@ -905,11 +936,11 @@ msgstr ""
msgid "Uplink" msgid "Uplink"
msgstr "" msgstr ""
#: src/validators/validateProxyUrl.ts:27 #: src/validators/validateProxyUrl.ts:29
msgid "URL must start with vless://, ss://, trojan://, or socks4/5://" msgid "URL must start with vless://, ss://, trojan://, or socks4/5://"
msgstr "" msgstr ""
#: src/validators/validateUrl.ts:13 #: src/validators/validateUrl.ts:17
msgid "URL must use one of the following protocols:" msgid "URL must use one of the following protocols:"
msgstr "" msgstr ""
@@ -917,68 +948,88 @@ msgstr ""
msgid "URLTest" msgid "URLTest"
msgstr "" 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 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:87
msgid "URLTest Proxy Links" msgid "URLTest Proxy Links"
msgstr "" 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" msgid "User Domain List Type"
msgstr "" 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" msgid "User Domains"
msgstr "" 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" msgid "User Domains List"
msgstr "" 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" msgid "User Subnet List Type"
msgstr "" 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" msgid "User Subnets"
msgstr "" 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" msgid "User Subnets List"
msgstr "" msgstr ""
#: src/validators/validateDns.ts:11 #: src/validators/validateDns.ts:14
#: src/validators/validateDns.ts:15 #: src/validators/validateDns.ts:18
#: src/validators/validateDomain.ts:13 #: src/validators/validateDomain.ts:13
#: src/validators/validateDomain.ts:30 #: src/validators/validateDomain.ts:30
#: src/validators/validateIp.ts:8 #: src/validators/validateIp.ts:8
#: src/validators/validateOutboundJson.ts:17 #: src/validators/validateOutboundJson.ts:7
#: src/validators/validatePath.ts:16 #: src/validators/validatePath.ts:16
#: src/validators/validateShadowsocksUrl.ts:95 #: src/validators/validateShadowsocksUrl.ts:95
#: src/validators/validateSocksUrl.ts:80 #: src/validators/validateSocksUrl.ts:80
#: src/validators/validateSubnet.ts:38 #: src/validators/validateSubnet.ts:38
#: src/validators/validateTrojanUrl.ts:59 #: src/validators/validateTrojanUrl.ts:59
#: src/validators/validateUrl.ts:16 #: src/validators/validateUrl.ts:28
#: src/validators/validateVlessUrl.ts:107 #: src/validators/validateVlessUrl.ts:108
msgid "Valid" msgid "Valid"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:370 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:434
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:449 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:513
msgid "Validation errors:" msgid "Validation errors:"
msgstr "" msgstr ""
#: src/podkop/tabs/diagnostic/initController.ts:248 #: src/podkop/tabs/diagnostic/initController.ts:256
#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107
msgid "View logs" msgid "View logs"
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:247 #: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:31
msgid "Visit Wiki"
msgstr ""
#: ../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." msgid "Warning: %s cannot be used together with %s. Previous selections have been removed."
msgstr "" 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." msgid "Warning: Russia inside can only be used with %s. %s already in Russia inside and have been removed from selection."
msgstr "" msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:256
msgid "YACD Secret Key"
msgstr ""
#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:127 #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:127
msgid "You can select Output Network Interface, by default autodetect" msgid "You can select Output Network Interface, by default autodetect"
msgstr "" msgstr ""

View File

@@ -14,7 +14,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/podkop define Package/podkop
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
DEPENDS:=+sing-box-tiny +curl +jq +kmod-nft-tproxy +coreutils-base64 +bind-dig DEPENDS:=+sing-box +curl +jq +kmod-nft-tproxy +coreutils-base64 +bind-dig
CONFLICTS:=https-dns-proxy nextdns luci-app-passwall luci-app-passwall2 CONFLICTS:=https-dns-proxy nextdns luci-app-passwall luci-app-passwall2
TITLE:=Domain routing app TITLE:=Domain routing app
URL:=https://podkop.net URL:=https://podkop.net

View File

@@ -18,6 +18,7 @@ check_required_file "$PODKOP_LIB/helpers.sh"
check_required_file "$PODKOP_LIB/sing_box_config_manager.sh" check_required_file "$PODKOP_LIB/sing_box_config_manager.sh"
check_required_file "$PODKOP_LIB/sing_box_config_facade.sh" check_required_file "$PODKOP_LIB/sing_box_config_facade.sh"
check_required_file "$PODKOP_LIB/logging.sh" check_required_file "$PODKOP_LIB/logging.sh"
check_required_file "$PODKOP_LIB/rulesets.sh"
. /lib/config/uci.sh . /lib/config/uci.sh
. /lib/functions.sh . /lib/functions.sh
. "$PODKOP_LIB/constants.sh" . "$PODKOP_LIB/constants.sh"
@@ -26,6 +27,7 @@ check_required_file "$PODKOP_LIB/logging.sh"
. "$PODKOP_LIB/sing_box_config_manager.sh" . "$PODKOP_LIB/sing_box_config_manager.sh"
. "$PODKOP_LIB/sing_box_config_facade.sh" . "$PODKOP_LIB/sing_box_config_facade.sh"
. "$PODKOP_LIB/logging.sh" . "$PODKOP_LIB/logging.sh"
. "$PODKOP_LIB/rulesets.sh"
config_load "$PODKOP_CONFIG" config_load "$PODKOP_CONFIG"
@@ -123,36 +125,19 @@ start_main() {
# base # base
route_table_rule_mark route_table_rule_mark
create_nft_table create_nft_rules
sing_box_uci sing_box_configure_service
# sing-box # sing-box
sing_box_init_config sing_box_init_config
config_foreach add_cron_job "section" config_foreach add_cron_job "section"
/etc/init.d/sing-box start /etc/init.d/sing-box start
local exclude_ntp
config_get_bool exclude_ntp "settings" "exclude_ntp" "0"
if [ "$exclude_ntp" -eq 1 ]; then
log "NTP traffic exclude for proxy"
nft insert rule inet "$NFT_TABLE_NAME" mangle udp dport 123 return
fi
log "Nice" log "Nice"
list_update & list_update &
echo $! > /var/run/podkop_list_update.pid echo $! > /var/run/podkop_list_update.pid
} }
start() {
start_main
config_get_bool dont_touch_dhcp "settings" "dont_touch_dhcp" 0
if [ "$dont_touch_dhcp" -eq 0 ]; then
dnsmasq_add_resolver
fi
uci_set "podkop" "settings" "shutdown_correctly" 0
uci commit "podkop" && config_load "$PODKOP_CONFIG"
}
stop_main() { stop_main() {
log "Stopping the podkop" log "Stopping the podkop"
@@ -188,13 +173,27 @@ stop_main() {
/etc/init.d/sing-box stop /etc/init.d/sing-box stop
} }
start() {
start_main
config_get_bool dont_touch_dhcp "settings" "dont_touch_dhcp" 0
if [ "$dont_touch_dhcp" -eq 0 ]; then
dnsmasq_configure
fi
uci_set "podkop" "settings" "shutdown_correctly" 0
uci commit "podkop" && config_load "$PODKOP_CONFIG"
}
stop() { stop() {
local dont_touch_dhcp local dont_touch_dhcp
config_get_bool dont_touch_dhcp "settings" "dont_touch_dhcp" 0 config_get_bool dont_touch_dhcp "settings" "dont_touch_dhcp" 0
if [ "$dont_touch_dhcp" -eq 0 ]; then if [ "$dont_touch_dhcp" -eq 0 ]; then
dnsmasq_restore dnsmasq_restore
fi fi
stop_main stop_main
uci_set "podkop" "settings" "shutdown_correctly" 1 uci_set "podkop" "settings" "shutdown_correctly" 1
uci commit "podkop" && config_load "$PODKOP_CONFIG" uci commit "podkop" && config_load "$PODKOP_CONFIG"
} }
@@ -279,7 +278,7 @@ nft_init_interfaces_set() {
done done
} }
create_nft_table() { create_nft_rules() {
log "Create nft table" log "Create nft table"
nft_create_table "$NFT_TABLE_NAME" nft_create_table "$NFT_TABLE_NAME"
@@ -327,6 +326,13 @@ create_nft_table() {
nft add rule inet "$NFT_TABLE_NAME" mangle_output ip daddr "@$NFT_COMMON_SET_NAME" meta l4proto udp meta mark set 0x105 counter nft add rule inet "$NFT_TABLE_NAME" mangle_output ip daddr "@$NFT_COMMON_SET_NAME" meta l4proto udp meta mark set 0x105 counter
nft add rule inet "$NFT_TABLE_NAME" mangle_output ip daddr "$SB_FAKEIP_INET4_RANGE" meta l4proto tcp meta mark set 0x105 counter nft add rule inet "$NFT_TABLE_NAME" mangle_output ip daddr "$SB_FAKEIP_INET4_RANGE" meta l4proto tcp meta mark set 0x105 counter
nft add rule inet "$NFT_TABLE_NAME" mangle_output ip daddr "$SB_FAKEIP_INET4_RANGE" meta l4proto tcp meta mark set 0x105 counter nft add rule inet "$NFT_TABLE_NAME" mangle_output ip daddr "$SB_FAKEIP_INET4_RANGE" meta l4proto tcp meta mark set 0x105 counter
local exclude_ntp
config_get_bool exclude_ntp "settings" "exclude_ntp" "0"
if [ "$exclude_ntp" -eq 1 ]; then
log "NTP traffic exclude for proxy"
nft insert rule inet "$NFT_TABLE_NAME" mangle udp dport 123 return
fi
} }
backup_dnsmasq_config_option() { backup_dnsmasq_config_option() {
@@ -340,7 +346,7 @@ backup_dnsmasq_config_option() {
fi fi
} }
dnsmasq_add_resolver() { dnsmasq_configure() {
local shutdown_correctly local shutdown_correctly
config_get shutdown_correctly "settings" "shutdown_correctly" config_get shutdown_correctly "settings" "shutdown_correctly"
if [ "$shutdown_correctly" -eq 0 ]; then if [ "$shutdown_correctly" -eq 0 ]; then
@@ -472,42 +478,55 @@ remove_cron_job() {
list_update() { list_update() {
echolog "🔄 Starting lists update..." echolog "🔄 Starting lists update..."
local nslookup_timeout=3
local nslookup_attempts=10
local curl_timeout=5
local curl_attempts=10
local curl_max_timeout=10
local delay=3
local i local i
for i in $(seq 1 60); do # DNS Check
if nslookup -timeout=1 openwrt.org > /dev/null 2>&1; then for i in $(seq 1 $nslookup_timeout); do
if nslookup -timeout=$nslookup_timeout openwrt.org > /dev/null 2>&1; then
echolog "✅ DNS check passed" echolog "✅ DNS check passed"
break break
fi fi
log "DNS is unavailable [$i/60]" echolog "DNS is unavailable [$i/$nslookup_attempts]"
sleep 3 sleep $delay
done done
if [ "$i" -eq 60 ]; then if [ "$i" -eq $nslookup_attempts ]; then
echolog "❌ DNS check failed after 60 attempts" echolog "❌ DNS check failed after $nslookup_attempts attempts"
return 1 return 1
fi fi
for i in $(seq 1 60); do # Github Check
config_get_bool download_lists_via_proxy "settings" "download_lists_via_proxy" "0" for i in $(seq 1 $curl_attempts); do
if [ "$download_lists_via_proxy" -eq 1 ]; then local service_proxy_address
if http_proxy="http://127.0.0.1:4534" https_proxy="http://127.0.0.1:4534" curl -s -m 3 https://github.com > /dev/null; then service_proxy_address="$(get_service_proxy_address)"
if [ -n "$http_proxy_address" ]; then
if curl -s -x "http://$service_proxy_address" -m $curl_timeout https://github.com > /dev/null; then
echolog "✅ GitHub connection check passed (via proxy)" echolog "✅ GitHub connection check passed (via proxy)"
break break
fi fi
else else
if curl -s -m 3 https://github.com > /dev/null; then if curl -s -m $curl_timeout https://github.com > /dev/null; then
echolog "✅ GitHub connection check passed" echolog "✅ GitHub connection check passed"
break break
fi fi
fi fi
echolog "GitHub is unavailable [$i/60]" echolog "GitHub is unavailable [$i/$curl_attempts] (max-timeout=$curl_timeout)"
sleep 3 if [ "$curl_timeout" -lt $curl_max_timeout ]; then
curl_timeout=$((curl_timeout + 1))
fi
sleep $delay
done done
if [ "$i" -eq 60 ]; then if [ "$i" -eq $curl_attempts ]; then
echolog "❌ GitHub connection check failed after 60 attempts" echolog "❌ GitHub connection check failed after $curl_attempts attempts"
return 1 return 1
fi fi
@@ -525,30 +544,30 @@ list_update() {
} }
# sing-box funcs # sing-box funcs
sing_box_configure_service() {
sing_box_uci() {
local sing_box_enabled sing_box_user sing_box_config_path sing_box_conffile local sing_box_enabled sing_box_user sing_box_config_path sing_box_conffile
sing_box_enabled=$(uci get "sing-box.main.enabled") sing_box_enabled="$(uci_get "sing-box" "main" "enabled")"
sing_box_user=$(uci get "sing-box.main.user") sing_box_user="$(uci_get "sing-box" "main" "user")"
if [ "$sing_box_enabled" -ne 1 ]; then if [ "$sing_box_enabled" -ne 1 ]; then
uci set "sing-box.main.enabled=1" uci_set "sing-box" "main" "enabled" 1
uci commit "sing-box" uci_commit "sing-box"
log "sing-box service has been enabled" log "sing-box service has been enabled"
fi fi
if [ "$sing_box_user" != "root" ]; then if [ "$sing_box_user" != "root" ]; then
uci set "sing-box.main.user=root" uci_set "sing-box" "main" "user" "root"
uci commit "sing-box" uci_commit "sing-box"
log "sing-box service user has been changed to root" log "sing-box service user has been changed to root"
fi fi
config_get sing_box_config_path "settings" "config_path" config_get sing_box_config_path "settings" "config_path"
sing_box_conffile=$(uci get "sing-box.main.conffile") sing_box_conffile="$(uci_get "sing-box" "main" "conffile")"
log "sing-box config path: $sing_box_config_path" "debug" log "sing-box config path: $sing_box_config_path" "debug"
log "sing-box service conffile: $sing_box_conffile" "debug" log "sing-box service conffile: $sing_box_conffile" "debug"
if [ "$sing_box_conffile" != "$sing_box_config_path" ]; then if [ "$sing_box_conffile" != "$sing_box_config_path" ]; then
uci set "sing-box.main.conffile=$sing_box_config_path" uci_set "sing-box" "main" "conffile" "$sing_box_config_path"
uci commit "sing-box" uci_commit "sing-box"
log "Configuration file path has been set to $sing_box_config_path" log "Configuration file path has been set to $sing_box_config_path"
fi fi
@@ -627,9 +646,12 @@ configure_outbound_handler() {
urltest) urltest)
log "Detected proxy configuration type: urltest" "debug" log "Detected proxy configuration type: urltest" "debug"
local urltest_proxy_links udp_over_tcp i urltest_tag selector_tag outbound_tag outbound_tags \ 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 urltest_proxy_links "$section" "urltest_proxy_links"
config_get udp_over_tcp "$section" "enable_udp_over_tcp" 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 if [ -z "$urltest_proxy_links" ]; then
log "URLTest proxy links is not set. Aborted." "fatal" log "URLTest proxy links is not set. Aborted." "fatal"
@@ -652,7 +674,8 @@ configure_outbound_handler() {
selector_tag="$(get_outbound_tag_by_section "$section")" selector_tag="$(get_outbound_tag_by_section "$section")"
urltest_outbounds="$(comma_string_to_json_array "$outbound_tags")" urltest_outbounds="$(comma_string_to_json_array "$outbound_tags")"
selector_outbounds="$(comma_string_to_json_array "$outbound_tags,$urltest_tag")" 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")" config="$(sing_box_cm_add_selector_outbound "$config" "$selector_tag" "$selector_outbounds" "$urltest_tag")"
;; ;;
*) *)
@@ -767,7 +790,7 @@ sing_box_configure_route() {
configure_common_reject_route_rule configure_common_reject_route_rule
local routing_excluded_ips local routing_excluded_ips
config_get_bool routing_excluded_ips "settings" "routing_excluded_ips" config_get routing_excluded_ips "settings" "routing_excluded_ips"
if [ -n "$routing_excluded_ips" ]; then if [ -n "$routing_excluded_ips" ]; then
rule_tag="$(gen_id)" rule_tag="$(gen_id)"
config=$(sing_box_cm_add_route_rule "$config" "$rule_tag" "$SB_TPROXY_INBOUND_TAG" "$SB_DIRECT_OUTBOUND_TAG") config=$(sing_box_cm_add_route_rule "$config" "$rule_tag" "$SB_TPROXY_INBOUND_TAG" "$SB_DIRECT_OUTBOUND_TAG")
@@ -861,66 +884,37 @@ configure_routing_for_section_lists() {
if [ "$user_domain_list_type" != "disabled" ]; then if [ "$user_domain_list_type" != "disabled" ]; then
log "Processing user domains routing rules for '$section' section" log "Processing user domains routing rules for '$section' section"
prepare_common_ruleset "$section" "domains" "$route_rule_tag" configure_user_domain_list "$section" "$route_rule_tag"
configure_user_domain_or_subnets_list "$section" "domains" "$route_rule_tag"
fi fi
if [ "$user_subnet_list_type" != "disabled" ]; then if [ "$user_subnet_list_type" != "disabled" ]; then
log "Processing user subnets routing rules for '$section' section" log "Processing user subnets routing rules for '$section' section"
prepare_common_ruleset "$section" "subnets" "$route_rule_tag" configure_user_subnet_list "$section" "$route_rule_tag"
configure_user_domain_or_subnets_list "$section" "subnets" "$route_rule_tag"
fi fi
if [ -n "$local_domain_lists" ]; then if [ -n "$local_domain_lists" ]; then
log "Processing local domains routing rules for '$section' section" log "Processing local domains routing rules for '$section' section"
configure_local_domain_or_subnet_lists "$section" "domains" "$route_rule_tag" configure_local_domain_lists "$section" "$route_rule_tag"
fi fi
if [ -n "$local_subnet_lists" ]; then if [ -n "$local_subnet_lists" ]; then
log "Processing local subnets routing rules for '$section' section" log "Processing local subnets routing rules for '$section' section"
configure_local_domain_or_subnet_lists "$section" "subnets" "$route_rule_tag" configure_local_subnet_lists "$section" "$route_rule_tag"
fi fi
if [ -n "$remote_domain_lists" ]; then if [ -n "$remote_domain_lists" ]; then
log "Processing remote domains routing rules for '$section' section" log "Processing remote domains routing rules for '$section' section"
prepare_common_ruleset "$section" "domains" "$route_rule_tag"
config_list_foreach "$section" "remote_domain_lists" configure_remote_domain_or_subnet_list_handler \ config_list_foreach "$section" "remote_domain_lists" configure_remote_domain_or_subnet_list_handler \
"domains" "$section" "$route_rule_tag" "domains" "$section" "$route_rule_tag"
fi fi
if [ -n "$remote_subnet_lists" ]; then if [ -n "$remote_subnet_lists" ]; then
log "Processing remote subnets routing rules for '$section' section" log "Processing remote subnets routing rules for '$section' section"
prepare_common_ruleset "$section" "subnets" "$route_rule_tag"
config_list_foreach "$section" "remote_subnet_lists" configure_remote_domain_or_subnet_list_handler \ config_list_foreach "$section" "remote_subnet_lists" configure_remote_domain_or_subnet_list_handler \
"subnets" "$section" "$route_rule_tag" "subnets" "$section" "$route_rule_tag"
fi fi
} }
prepare_common_ruleset() {
local section="$1"
local type="$2"
local route_rule_tag="$3"
log "Preparing a common $type ruleset for '$section' section" "debug"
ruleset_tag=$(get_ruleset_tag "$section" "common" "$type")
ruleset_filename="$ruleset_tag.json"
ruleset_filepath="$TMP_RULESET_FOLDER/$ruleset_filename"
if file_exists "$ruleset_filepath"; then
log "Ruleset $ruleset_filepath already exists. Skipping." "debug"
else
sing_box_cm_create_local_source_ruleset "$ruleset_filepath"
config=$(sing_box_cm_add_local_ruleset "$config" "$ruleset_tag" "source" "$ruleset_filepath")
config=$(sing_box_cm_patch_route_rule "$config" "$route_rule_tag" "rule_set" "$ruleset_tag")
case "$type" in
domains)
config=$(sing_box_cm_patch_dns_route_rule "$config" "$SB_FAKEIP_DNS_RULE_TAG" "rule_set" "$ruleset_tag")
;;
subnets) ;;
*) log "Unsupported remote rule set type: $type" "error" ;;
esac
fi
}
configure_community_list_handler() { configure_community_list_handler() {
local tag="$1" local tag="$1"
local section="$2" local section="$2"
@@ -938,99 +932,113 @@ configure_community_list_handler() {
config=$(sing_box_cm_patch_dns_route_rule "$config" "$SB_FAKEIP_DNS_RULE_TAG" "rule_set" "$ruleset_tag") config=$(sing_box_cm_patch_dns_route_rule "$config" "$SB_FAKEIP_DNS_RULE_TAG" "rule_set" "$ruleset_tag")
} }
configure_user_domain_or_subnets_list() { prepare_source_ruleset() {
local section="$1" local section="$1"
local type="$2" local name="$2"
local type="$3"
local route_rule_tag="$4"
local items ruleset_tag ruleset_filename ruleset_filepath json_array log "Preparing a $name $type rule set for '$section' section" "debug"
case "$type" in ruleset_tag=$(get_ruleset_tag "$section" "$name" "$type")
domains) ruleset_filepath="$TMP_RULESET_FOLDER/$ruleset_tag.json"
local user_domain_list_type create_source_rule_set "$ruleset_filepath"
config_get user_domain_list_type "$section" "user_domain_list_type" case $? in
case "$user_domain_list_type" in 0)
dynamic) config_get items "$section" "user_domains" ;; config=$(sing_box_cm_add_local_ruleset "$config" "$ruleset_tag" "source" "$ruleset_filepath")
text) config_get items "$section" "user_domains_text" ;; config=$(sing_box_cm_patch_route_rule "$config" "$route_rule_tag" "rule_set" "$ruleset_tag")
esac case "$type" in
;; domains)
subnets) config=$(sing_box_cm_patch_dns_route_rule "$config" "$SB_FAKEIP_DNS_RULE_TAG" "rule_set" "$ruleset_tag")
local user_subnet_list_type ;;
config_get user_subnet_list_type "$section" "user_subnet_list_type" subnets) ;;
case "$user_subnet_list_type" in *)
dynamic) config_get items "$section" "user_subnets" ;; log "Unsupported remote rule set type: $type" "error"
text) config_get items "$section" "user_subnets_text" ;; return 1
;;
esac esac
;; ;;
3) log "Source rule set $ruleset_filepath already exists, skipping." "debug" ;;
esac
}
configure_user_domain_list() {
local section="$1"
local route_rule_tag="$2"
prepare_source_ruleset "$section" "user" "domains" "$route_rule_tag"
local user_domain_list_type items json_array
config_get user_domain_list_type "$section" "user_domain_list_type"
case "$user_domain_list_type" in
dynamic) config_get items "$section" "user_domains" ;;
text) config_get items "$section" "user_domains_text" ;;
esac esac
ruleset_tag=$(get_ruleset_tag "$section" "common" "$type") items="$(parse_domain_or_subnet_string_to_commas_string "$items" "domains")"
ruleset_filename="$ruleset_tag.json"
ruleset_filepath="$TMP_RULESET_FOLDER/$ruleset_filename"
items="$(parse_domain_or_subnet_string_to_commas_string "$items" "$type")"
json_array="$(comma_string_to_json_array "$items")" json_array="$(comma_string_to_json_array "$items")"
case "$type" in patch_source_ruleset_rules "$ruleset_filepath" "domain_suffix" "$json_array"
domains) sing_box_cm_patch_local_source_ruleset_rules "$ruleset_filepath" "domain_suffix" "$json_array" ;;
subnets)
sing_box_cm_patch_local_source_ruleset_rules "$ruleset_filepath" "ip_cidr" "$json_array"
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME" "$items"
;;
esac
} }
configure_local_domain_or_subnet_lists() { configure_user_subnet_list() {
local section="$1" local section="$1"
local type="$2" local route_rule_tag="$2"
local route_rule_tag="$3"
local ruleset_tag ruleset_filename ruleset_filepath prepare_source_ruleset "$section" "user" "subnets" "$route_rule_tag"
ruleset_tag="$(get_ruleset_tag "$section" "local" "$type")"
ruleset_filename="$ruleset_tag.json"
ruleset_filepath="$TMP_RULESET_FOLDER/$ruleset_filename"
sing_box_cm_create_local_source_ruleset "$ruleset_filepath" local user_subnet_list_type items json_array
config=$(sing_box_cm_add_local_ruleset "$config" "$ruleset_tag" "source" "$ruleset_filepath") config_get user_subnet_list_type "$section" "user_subnet_list_type"
config=$(sing_box_cm_patch_route_rule "$config" "$route_rule_tag" "rule_set" "$ruleset_tag") case "$user_subnet_list_type" in
dynamic) config_get items "$section" "user_subnets" ;;
case "$type" in text) config_get items "$section" "user_subnets_text" ;;
domains)
config_list_foreach "$section" "local_domain_lists" import_local_domain_or_subnet_list "$type" \
"$section" "$ruleset_filepath"
config=$(sing_box_cm_patch_dns_route_rule "$config" "$SB_FAKEIP_DNS_RULE_TAG" "rule_set" "$ruleset_tag")
;;
subnets)
config_list_foreach "$section" "local_subnet_lists" import_local_domain_or_subnet_list "$type" \
"$section" "$ruleset_filepath"
;;
*) log "Unsupported local rule set type: $type" "error" ;;
esac esac
items="$(parse_domain_or_subnet_string_to_commas_string "$items" "subnets")"
json_array="$(comma_string_to_json_array "$items")"
patch_source_ruleset_rules "$ruleset_filepath" "ip_cidr" "$json_array"
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME" "$items"
} }
import_local_domain_or_subnet_list() { configure_local_domain_lists() {
local filepath="$1" local section="$1"
local type="$2" local route_rule_tag="$2"
local section="$3"
local ruleset_filepath="$4"
if ! file_exists "$filepath"; then prepare_source_ruleset "$section" "local" "domains" "$route_rule_tag"
log "File $filepath not found" "error"
config_list_foreach "$section" "local_domain_lists" import_local_domain_list_handler "$ruleset_filepath"
}
import_local_domain_list_handler() {
local local_domain_list_filepath="$1"
local ruleset_filepath="$2"
if ! file_exists "$local_domain_list_filepath"; then
log "Local domain list file $local_domain_list_filepath not found" "error"
return 1 return 1
fi fi
local items json_array import_plain_domain_list_to_local_source_ruleset_chunked "$local_domain_list_filepath" "$ruleset_filepath"
items="$(parse_domain_or_subnet_file_to_comma_string "$filepath" "$type")" }
if [ -z "$items" ]; then configure_local_subnet_lists() {
log "No valid $type found in $filepath" "warn" local section="$1"
return 0 local route_rule_tag="$2"
prepare_source_ruleset "$section" "local" "subnets" "$route_rule_tag"
config_list_foreach "$section" "local_subnet_lists" import_local_subnets_list_handler "$ruleset_filepath"
}
import_local_subnets_list_handler() {
local local_subnet_list_filepath="$1"
local ruleset_filepath="$2"
if ! file_exists "$local_subnet_list_filepath"; then
log "Local subnet list file $local_subnet_list_filepath not found" "error"
return 1
fi fi
json_array="$(comma_string_to_json_array "$items")" import_plain_subnet_list_to_local_source_ruleset_chunked "$local_subnet_list_filepath" "$ruleset_filepath"
case "$type" in nft_add_set_elements_from_file_chunked "$local_subnet_list_filepath" "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME"
domains) sing_box_cm_patch_local_source_ruleset_rules "$ruleset_filepath" "domain_suffix" "$json_array" ;;
subnets)
sing_box_cm_patch_local_source_ruleset_rules "$ruleset_filepath" "ip_cidr" "$json_array"
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME" "$items"
;;
esac
} }
configure_remote_domain_or_subnet_list_handler() { configure_remote_domain_or_subnet_list_handler() {
@@ -1041,9 +1049,10 @@ configure_remote_domain_or_subnet_list_handler() {
local file_extension local file_extension
file_extension=$(url_get_file_extension "$url") file_extension=$(url_get_file_extension "$url")
log "Detected file extension: '$file_extension'" "debug"
case "$file_extension" in case "$file_extension" in
json | srs) json | srs)
log "Detected file extension: '$file_extension' → proceeding with processing" "debug" log "Creating a remote $type ruleset from the source URL" "info"
local basename ruleset_tag format detour update_interval local basename ruleset_tag format detour update_interval
basename=$(url_get_basename "$url") basename=$(url_get_basename "$url")
ruleset_tag=$(get_ruleset_tag "$section" "$basename" "remote-$type") ruleset_tag=$(get_ruleset_tag "$section" "$basename" "remote-$type")
@@ -1062,7 +1071,7 @@ configure_remote_domain_or_subnet_list_handler() {
esac esac
;; ;;
*) *)
log "Detected file extension: '$file_extension' → no processing needed, managed on list_update" "debug" prepare_source_ruleset "$section" "remote" "$type" "$route_rule_tag"
;; ;;
esac esac
} }
@@ -1075,16 +1084,39 @@ sing_box_configure_experimental() {
config_get cache_file "settings" "cache_path" "/tmp/sing-box/cache.db" config_get cache_file "settings" "cache_path" "/tmp/sing-box/cache.db"
config=$(sing_box_cm_configure_cache_file "$config" true "$cache_file" true) config=$(sing_box_cm_configure_cache_file "$config" true "$cache_file" true)
local enable_yacd external_controller_ui
config_get_bool enable_yacd "settings" "enable_yacd" 0
log "Configuring Clash API" log "Configuring Clash API"
local enable_yacd enable_yacd_wan_access clash_api_controller_address
config_get_bool enable_yacd "settings" "enable_yacd" 0
config_get_bool enable_yacd_wan_access "settings" "enable_yacd_wan_access" 0
if [ "$enable_yacd" -eq 1 ] && [ "$enable_yacd_wan_access" -eq 1 ]; then
clash_api_controller_address="0.0.0.0"
else
clash_api_controller_address="$(get_service_listen_address)"
if [ -z "$clash_api_controller_address" ]; then
log "Could not determine the listening IP address for the Clash API controller. It will run only on localhost." "warn"
clash_api_controller_address="127.0.0.1"
fi
fi
if [ "$enable_yacd" -eq 1 ]; then if [ "$enable_yacd" -eq 1 ]; then
log "YACD is enabled, enabling Clash API with downloadable YACD" "debug" log "YACD is enabled, enabling Clash API with downloadable YACD" "debug"
local external_controller_ui="ui" local yacd_secret_key external_controller_ui
config=$(sing_box_cm_configure_clash_api "$config" "$SB_CLASH_API_CONTROLLER" "$external_controller_ui") config_get yacd_secret_key "settings" "yacd_secret_key"
external_controller_ui="ui"
config=$(
sing_box_cm_configure_clash_api \
"$config" \
"$clash_api_controller_address:$SB_CLASH_API_CONTROLLER_PORT" \
"$external_controller_ui" \
"$yacd_secret_key"
)
else else
log "YACD is disabled, enabling Clash API in online mode" "debug" log "YACD is disabled, enabling Clash API in online mode" "debug"
config=$(sing_box_cm_configure_clash_api "$config" "$SB_CLASH_API_CONTROLLER") config=$(
sing_box_cm_configure_clash_api "$config" "$clash_api_controller_address:$SB_CLASH_API_CONTROLLER_PORT"
)
fi fi
} }
@@ -1113,8 +1145,13 @@ sing_box_additional_inbounds() {
configure_section_mixed_proxy() { configure_section_mixed_proxy() {
local section="$1" local section="$1"
local mixed_inbound_enabled mixed_proxy_port mixed_inbound_tag mixed_outbound_tag local mixed_inbound_enabled mixed_proxy_port mixed_inbound_tag mixed_outbound_tag mixed_proxy_address
config_get_bool mixed_inbound_enabled "$section" "mixed_proxy_enabled" 0 config_get_bool mixed_inbound_enabled "$section" "mixed_proxy_enabled" 0
mixed_proxy_address="$(get_service_listen_address)"
if [ -z "$mixed_proxy_address" ]; then
log "Could not determine the listening IP address for the Mixed Proxy. The proxy will not be created." "warn"
return 1
fi
config_get mixed_proxy_port "$section" "mixed_proxy_port" config_get mixed_proxy_port "$section" "mixed_proxy_port"
if [ "$mixed_inbound_enabled" -eq 1 ]; then if [ "$mixed_inbound_enabled" -eq 1 ]; then
mixed_inbound_tag="$(get_inbound_tag_by_section "$section-mixed")" mixed_inbound_tag="$(get_inbound_tag_by_section "$section-mixed")"
@@ -1123,7 +1160,7 @@ configure_section_mixed_proxy() {
sing_box_cf_add_mixed_inbound_and_route_rule \ sing_box_cf_add_mixed_inbound_and_route_rule \
"$config" \ "$config" \
"$mixed_inbound_tag" \ "$mixed_inbound_tag" \
"$SB_MIXED_INBOUND_ADDRESS" \ "$mixed_proxy_address" \
"$mixed_proxy_port" \ "$mixed_proxy_port" \
"$mixed_outbound_tag" "$mixed_outbound_tag"
) )
@@ -1209,7 +1246,7 @@ import_community_service_subnet_list_handler() {
*) return 0 ;; *) return 0 ;;
esac esac
local tmpfile http_proxy_address subnets local tmpfile http_proxy_address
tmpfile=$(mktemp) tmpfile=$(mktemp)
http_proxy_address="$(get_service_proxy_address)" http_proxy_address="$(get_service_proxy_address)"
@@ -1220,14 +1257,13 @@ import_community_service_subnet_list_handler() {
return 1 return 1
fi fi
subnets="$(parse_domain_or_subnet_file_to_comma_string "$tmpfile" "subnets")"
rm -f "$tmpfile"
if [ "$service" = "discord" ]; then if [ "$service" = "discord" ]; then
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_DISCORD_SET_NAME" "$subnets" nft_add_set_elements_from_file_chunked "$tmpfile" "$NFT_TABLE_NAME" "$NFT_DISCORD_SET_NAME"
else else
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME" "$subnets" nft_add_set_elements_from_file_chunked "$tmpfile" "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME"
fi fi
rm -f "$tmpfile"
} }
import_domains_from_remote_domain_lists() { import_domains_from_remote_domain_lists() {
@@ -1248,17 +1284,41 @@ import_domains_from_remote_domain_list_handler() {
local file_extension local file_extension
file_extension=$(url_get_file_extension "$url") file_extension=$(url_get_file_extension "$url")
log "Detected file extension: '$file_extension'" "debug"
case "$file_extension" in case "$file_extension" in
json | srs) json | srs)
log "Detected file extension: '$file_extension' → no update needed, sing-box manages updates" "debug" log "No update needed - sing-box manages updates automatically."
;; ;;
*) *)
log "Detected file extension: '$file_extension' → proceeding with processing" "debug" log "Import domains from a remote plain-text list"
import_domains_or_subnets_from_remote_file "$url" "$section" "domains" import_domains_from_remote_plain_file "$url" "$section"
;; ;;
esac esac
} }
import_domains_from_remote_plain_file() {
local url="$1"
local section="$2"
local tmpfile http_proxy_address items json_array
tmpfile=$(mktemp)
http_proxy_address="$(get_service_proxy_address)"
download_to_file "$url" "$tmpfile" "$http_proxy_address"
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then
log "Download $url list failed" "error"
return 1
fi
convert_crlf_to_lf "$tmpfile"
ruleset_tag=$(get_ruleset_tag "$section" "remote" "domains")
ruleset_filepath="$TMP_RULESET_FOLDER/$ruleset_tag.json"
import_plain_domain_list_to_local_source_ruleset_chunked "$tmpfile" "$ruleset_filepath"
rm -f "$tmpfile"
}
import_subnets_from_remote_subnet_lists() { import_subnets_from_remote_subnet_lists() {
local section="$1" local section="$1"
local remote_subnet_lists local remote_subnet_lists
@@ -1277,81 +1337,46 @@ import_subnets_from_remote_subnet_list_handler() {
local file_extension local file_extension
file_extension="$(url_get_file_extension "$url")" file_extension="$(url_get_file_extension "$url")"
log "Detected file extension: '$file_extension'" "debug"
case "$file_extension" in case "$file_extension" in
json) json)
log "Detected file extension: '$file_extension' → proceeding with processing" "debug" log "Import subnets from a remote JSON list" "info"
import_subnets_from_remote_json_file "$url" import_subnets_from_remote_json_file "$url"
;; ;;
srs) srs)
log "Detected file extension: '$file_extension' → proceeding with processing" "debug" log "Import subnets from a remote SRS list" "info"
import_subnets_from_remote_srs_file "$url" import_subnets_from_remote_srs_file "$url"
;; ;;
*) *)
log "Detected file extension: '$file_extension' → proceeding with processing" "debug" log "Import subnets from a remote plain-text list" "info"
import_domains_or_subnets_from_remote_file "$url" "$section" "subnets" import_subnets_from_remote_plain_file "$url" "$section"
;;
esac
}
import_domains_or_subnets_from_remote_file() {
local url="$1"
local section="$2"
local type="$3"
local tmpfile http_proxy_address items json_array
tmpfile=$(mktemp)
http_proxy_address="$(get_service_proxy_address)"
download_to_file "$url" "$tmpfile" "$http_proxy_address"
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then
log "Download $url list failed" "error"
return 1
fi
items="$(parse_domain_or_subnet_file_to_comma_string "$tmpfile" "$type")"
rm -f "$tmpfile"
if [ -z "$items" ]; then
log "No valid $type found in $url" "warn"
return 0
fi
ruleset_tag=$(get_ruleset_tag "$section" "common" "$type")
ruleset_filename="$ruleset_tag.json"
ruleset_filepath="$TMP_RULESET_FOLDER/$ruleset_filename"
json_array="$(comma_string_to_json_array "$items")"
case "$type" in
domains) sing_box_cm_patch_local_source_ruleset_rules "$ruleset_filepath" "domain_suffix" "$json_array" ;;
subnets)
sing_box_cm_patch_local_source_ruleset_rules "$ruleset_filepath" "ip_cidr" "$json_array"
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME" "$items"
;; ;;
esac esac
} }
import_subnets_from_remote_json_file() { import_subnets_from_remote_json_file() {
local url="$1" local url="$1"
local tmpfile subnets http_proxy_address local json_tmpfile subnets_tmpfile http_proxy_address
tmpfile="$(mktemp)" json_tmpfile="$(mktemp)"
subnets_tmpfile="$(mktemp)"
http_proxy_address="$(get_service_proxy_address)" http_proxy_address="$(get_service_proxy_address)"
download_to_stream "$url" "$http_proxy_address" | jq -r '.rules[].ip_cidr[]?' > "$tmpfile" download_to_file "$url" "$json_tmpfile" "$http_proxy_address"
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then if [ $? -ne 0 ] || [ ! -s "$json_tmpfile" ]; then
log "Download $url list failed" "error" log "Download $url list failed" "error"
return 1 return 1
fi fi
subnets="$(parse_domain_or_subnet_file_to_comma_string "$tmpfile" "subnets")" extract_ip_cidr_from_json_ruleset_to_file "$json_tmpfile" "$subnets_tmpfile"
rm -f "$tmpfile" nft_add_set_elements_from_file_chunked "$subnets_tmpfile" "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME"
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME" "$subnets" rm -f "$json_tmpfile" "$subnets_tmpfile"
} }
import_subnets_from_remote_srs_file() { import_subnets_from_remote_srs_file() {
local url="$1" local url="$1"
local binary_tmpfile json_tmpfile subnets_tmpfile subnets http_proxy_address local binary_tmpfile json_tmpfile subnets_tmpfile http_proxy_address
binary_tmpfile="$(mktemp)" binary_tmpfile="$(mktemp)"
json_tmpfile="$(mktemp)" json_tmpfile="$(mktemp)"
subnets_tmpfile="$(mktemp)" subnets_tmpfile="$(mktemp)"
@@ -1364,15 +1389,39 @@ import_subnets_from_remote_srs_file() {
return 1 return 1
fi fi
if ! decompile_srs_file "$binary_tmpfile" "$json_tmpfile"; then if ! decompile_binary_ruleset "$binary_tmpfile" "$json_tmpfile"; then
log "Failed to decompile SRS file" "error" log "Failed to decompile binary rule set file" "error"
return 1 return 1
fi fi
jq -r '.rules[].ip_cidr[]' "$json_tmpfile" > "$subnets_tmpfile" extract_ip_cidr_from_json_ruleset_to_file "$json_tmpfile" "$subnets_tmpfile"
subnets="$(parse_domain_or_subnet_file_to_comma_string "$subnets_tmpfile" "subnets")" nft_add_set_elements_from_file_chunked "$subnets_tmpfile" "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME"
rm -f "$binary_tmpfile" "$json_tmpfile" "$subnets_tmpfile" rm -f "$binary_tmpfile" "$json_tmpfile" "$subnets_tmpfile"
nft_add_set_elements "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME" "$subnets" }
import_subnets_from_remote_plain_file() {
local url="$1"
local section="$2"
local tmpfile http_proxy_address items json_array
tmpfile=$(mktemp)
http_proxy_address="$(get_service_proxy_address)"
download_to_file "$url" "$tmpfile" "$http_proxy_address"
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then
log "Download $url list failed" "error"
return 1
fi
convert_crlf_to_lf "$tmpfile"
ruleset_tag=$(get_ruleset_tag "$section" "remote" "subnets")
ruleset_filepath="$TMP_RULESET_FOLDER/$ruleset_tag.json"
import_plain_subnet_list_to_local_source_ruleset_chunked "$tmpfile" "$ruleset_filepath"
nft_add_set_elements_from_file_chunked "$tmpfile" "$NFT_TABLE_NAME" "$NFT_COMMON_SET_NAME"
rm -f "$tmpfile"
} }
## Support functions ## Support functions
@@ -1455,6 +1504,23 @@ section_has_enabled_lists() {
fi fi
} }
get_service_listen_address() {
local service_listen_address
service_listen_address="$(uci_get "network" "lan" "ipaddr")"
if [ -z "$service_listen_address" ]; then
config_get service_listen_address "settings" "service_listen_address" # TODO(ampetelin): Remove after testing
fi
if [ -z "$service_listen_address" ]; then
log "Failed to determine the listening IP address. Please open an issue to report this problem: https://github.com/itdoginfo/podkop/issues" "error"
return 1
fi
echo "$service_listen_address"
}
## nftables ## nftables
nft_list_all_traffic_from_ip() { nft_list_all_traffic_from_ip() {
local ip="$1" local ip="$1"
@@ -1626,7 +1692,7 @@ check_logs() {
nolog "Logs not found" nolog "Logs not found"
return 1 return 1
fi fi
ы
# Find the last occurrence of "Starting podkop" # Find the last occurrence of "Starting podkop"
local start_line local start_line
start_line=$(echo "$logs" | grep -n "podkop.*Starting podkop" | tail -n 1 | cut -d: -f1) start_line=$(echo "$logs" | grep -n "podkop.*Starting podkop" | tail -n 1 | cut -d: -f1)
@@ -1684,16 +1750,11 @@ show_config() {
tmp_config=$(mktemp) tmp_config=$(mktemp)
sed -e 's/\(option proxy_string\).*/\1 '\''MASKED'\''/g' \ sed -e 's/\(option proxy_string\).*/\1 '\''MASKED'\''/g' \
-e 's/\(option outbound_json\).*/\1 '\''MASKED'\''/g' \ -e '/option outbound_json/,/^}/c\ option outbound_json '\''MASKED'\''' \
-e 's/\(option second_proxy_string\).*/\1 '\''MASKED'\''/g' \
-e 's/\(option second_outbound_json\).*/\1 '\''MASKED'\''/g' \
-e 's/\(vless:\/\/[^@]*@\)/vless:\/\/MASKED@/g' \
-e 's/\(ss:\/\/[^@]*@\)/ss:\/\/MASKED@/g' \
-e 's/\(pbk=[^&]*\)/pbk=MASKED/g' \
-e 's/\(sid=[^&]*\)/sid=MASKED/g' \
-e 's/\(option dns_server '\''[^'\'']*\.dns\.nextdns\.io'\''\)/option dns_server '\''MASKED.dns.nextdns.io'\''/g' \
-e "s|\(option dns_server 'dns\.nextdns\.io\)/[^']*|\1/MASKED|" \
-e 's/\(list urltest_proxy_links\).*/\1 '\''MASKED'\''/g' \ -e 's/\(list urltest_proxy_links\).*/\1 '\''MASKED'\''/g' \
-e "s@\\(option dns_server '[^/]*\\)/[^']*'@\\1/MASKED'@g" \
-e "s@\\(option domain_resolver_dns_server '[^/]*\\)/[^']*'@\\1/MASKED'@g" \
-e 's/\(option yacd_secret_key\).*/\1 '\''MASKED'\''/g' \
"$PODKOP_CONFIG" > "$tmp_config" "$PODKOP_CONFIG" > "$tmp_config"
cat "$tmp_config" cat "$tmp_config"
@@ -2073,13 +2134,28 @@ check_fakeip() {
####################################### #######################################
clash_api() { clash_api() {
local CLASH_URL="127.0.0.1:9090"
local TEST_URL="https://www.gstatic.com/generate_204"
local action="$1" local action="$1"
local clash_api_controller_address CLASH_URL TEST_URL
clash_api_controller_address="$(get_service_listen_address)"
if [ -z "$clash_api_controller_address" ]; then
clash_api_controller_address="127.0.0.1"
fi
CLASH_URL="$clash_api_controller_address:$SB_CLASH_API_CONTROLLER_PORT"
TEST_URL="https://www.gstatic.com/generate_204"
local enable_yacd_wan_access yacd_secret_key auth_header
config_get_bool enable_yacd_wan_access "settings" "enable_yacd_wan_access" 0
config_get yacd_secret_key "settings" "yacd_secret_key"
if [ "$enable_yacd_wan_access" -eq 1 ]; then
auth_header="Authorization: Bearer $yacd_secret_key"
else
auth_header=""
fi
case "$action" in case "$action" in
get_proxies) get_proxies)
curl -s "$CLASH_URL/proxies" | jq . curl -s --header "$auth_header" "$CLASH_URL/proxies" | jq .
;; ;;
get_proxy_latency) get_proxy_latency)
@@ -2092,6 +2168,7 @@ clash_api() {
fi fi
curl -G -s "$CLASH_URL/proxies/$proxy_tag/delay" \ curl -G -s "$CLASH_URL/proxies/$proxy_tag/delay" \
--header "$auth_header" \
--data-urlencode "url=$TEST_URL" \ --data-urlencode "url=$TEST_URL" \
--data-urlencode "timeout=$timeout" | jq . --data-urlencode "timeout=$timeout" | jq .
;; ;;
@@ -2106,6 +2183,7 @@ clash_api() {
fi fi
curl -G -s "$CLASH_URL/group/$group_tag/delay" \ curl -G -s "$CLASH_URL/group/$group_tag/delay" \
--header "$auth_header" \
--data-urlencode "url=$TEST_URL" \ --data-urlencode "url=$TEST_URL" \
--data-urlencode "timeout=$timeout" | jq . --data-urlencode "timeout=$timeout" | jq .
;; ;;
@@ -2120,8 +2198,11 @@ clash_api() {
fi fi
local response local response
response=$(curl -X PUT -s -w "\n%{http_code}" "$CLASH_URL/proxies/$group_tag" \ response=$(
--data-raw "{\"name\":\"$proxy_tag\"}") curl -X PUT -s -w "\n%{http_code}" "$CLASH_URL/proxies/$group_tag" \
--header "$auth_header" \
--data-raw "{\"name\":\"$proxy_tag\"}"
)
local http_code local http_code
local body local body
@@ -2279,9 +2360,9 @@ global_check() {
fi fi
if [ "$sing_box_version_ok" -eq 1 ]; then 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 else
print_global "❌ Sing-box version >= 1.12.4" print_global "❌ Sing-box version is not compatible (older than 1.12.4)"
fi fi
if [ "$sing_box_service_exist" -eq 1 ]; then if [ "$sing_box_service_exist" -eq 1 ]; then

View File

@@ -38,7 +38,6 @@ SB_TPROXY_INBOUND_PORT=1602
SB_DNS_INBOUND_TAG="dns-in" SB_DNS_INBOUND_TAG="dns-in"
SB_DNS_INBOUND_ADDRESS="127.0.0.42" SB_DNS_INBOUND_ADDRESS="127.0.0.42"
SB_DNS_INBOUND_PORT=53 SB_DNS_INBOUND_PORT=53
SB_MIXED_INBOUND_ADDRESS="0.0.0.0" # TODO(ampetelin): maybe to determine address?
SB_SERVICE_MIXED_INBOUND_TAG="service-mixed-in" SB_SERVICE_MIXED_INBOUND_TAG="service-mixed-in"
SB_SERVICE_MIXED_INBOUND_ADDRESS="127.0.0.1" SB_SERVICE_MIXED_INBOUND_ADDRESS="127.0.0.1"
SB_SERVICE_MIXED_INBOUND_PORT=4534 SB_SERVICE_MIXED_INBOUND_PORT=4534
@@ -47,7 +46,7 @@ SB_DIRECT_OUTBOUND_TAG="direct-out"
# Route # Route
SB_REJECT_RULE_TAG="reject-rule-tag" SB_REJECT_RULE_TAG="reject-rule-tag"
# Experimental # Experimental
SB_CLASH_API_CONTROLLER="0.0.0.0:9090" SB_CLASH_API_CONTROLLER_PORT=9090
## Lists ## Lists
GITHUB_RAW_URL="https://raw.githubusercontent.com/itdoginfo/allow-domains/main" GITHUB_RAW_URL="https://raw.githubusercontent.com/itdoginfo/allow-domains/main"

View File

@@ -105,37 +105,6 @@ get_domain_resolver_tag() {
echo "$section-$postfix" echo "$section-$postfix"
} }
# Constructs and returns a ruleset tag using section, name, optional type, and a fixed postfix
get_ruleset_tag() {
local section="$1"
local name="$2"
local type="$3"
local postfix="ruleset"
if [ -n "$type" ]; then
echo "$section-$name-$type-$postfix"
else
echo "$section-$name-$postfix"
fi
}
# Determines the ruleset format based on the file extension (json → source, srs → binary)
get_ruleset_format_by_file_extension() {
local file_extension="$1"
local format
case "$file_extension" in
json) format="source" ;;
srs) format="binary" ;;
*)
log "Unsupported file extension: .$file_extension" "error"
return 1
;;
esac
echo "$format"
}
# Converts a comma-separated string into a JSON array string # Converts a comma-separated string into a JSON array string
comma_string_to_json_array() { comma_string_to_json_array() {
local input="$1" local input="$1"
@@ -268,25 +237,6 @@ migration_rename_config_key() {
fi fi
} }
# Download URL content directly
download_to_stream() {
local url="$1"
local http_proxy_address="$2"
local retries="${3:-3}"
local wait="${4:-2}"
for attempt in $(seq 1 "$retries"); do
if [ -n "$http_proxy_address" ]; then
http_proxy="http://$http_proxy_address" https_proxy="http://$http_proxy_address" wget -qO- "$url" | sed 's/\r$//' && break
else
wget -qO- "$url" | sed 's/\r$//' && break
fi
log "Attempt $attempt/$retries to download $url failed" "warn"
sleep "$wait"
done
}
# Download URL to file # Download URL to file
download_to_file() { download_to_file() {
local url="$1" local url="$1"
@@ -305,29 +255,17 @@ download_to_file() {
log "Attempt $attempt/$retries to download $url failed" "warn" log "Attempt $attempt/$retries to download $url failed" "warn"
sleep "$wait" sleep "$wait"
done done
if grep -q $'\r' "$filepath"; then
log "Downloaded file has Windows line endings (CRLF). Converting to Unix (LF)"
sed -i 's/\r$//' "$filepath"
fi
} }
# Decompiles a sing-box SRS binary file into a JSON ruleset file # Converts Windows-style line endings (CRLF) to Unix-style (LF)
decompile_srs_file() { convert_crlf_to_lf() {
local binary_filepath="$1" local filepath="$1"
local output_filepath="$2"
log "Decompiling $binary_filepath to $output_filepath" "debug" if grep -q $'\r' "$filepath"; then
log "File '$filepath' contains CRLF line endings. Converting to LF..." "debug"
if ! file_exists "$binary_filepath"; then local tmpfile
log "File $binary_filepath not found" "error" tmpfile=$(mktemp)
return 1 tr -d '\r' < "$filepath" > "$tmpfile" && mv "$tmpfile" "$filepath" || rm -f "$tmpfile"
fi
sing-box rule-set decompile "$binary_filepath" -o "$output_filepath"
if [[ $? -ne 0 ]]; then
log "Decompilation command failed for $binary_filepath" "error"
return 1
fi fi
} }

View File

@@ -28,3 +28,43 @@ nft_add_set_elements() {
nft add element inet "$table" "$set" "{ $elements }" nft add element inet "$table" "$set" "{ $elements }"
} }
nft_add_set_elements_from_file_chunked() {
local filepath="$1"
local nft_table_name="$2"
local nft_set_name="$3"
local chunk_size="${4:-5000}"
local array count
count=0
while IFS= read -r line; do
line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -z "$line" ] && continue
if ! is_ipv4 "$line" && ! is_ipv4_cidr "$line"; then
log "'$line' is not IPv4 or IPv4 CIDR" "debug"
continue
fi
if [ -z "$array" ]; then
array="$line"
else
array="$array,$line"
fi
count=$((count + 1))
if [ "$count" = "$chunk_size" ]; then
log "Adding $count elements to nft set $nft_set_name" "debug"
nft_add_set_elements "$nft_table_name" "$nft_set_name" "$array"
array=""
count=0
fi
done < "$filepath"
if [ -n "$array" ]; then
log "Adding $count elements to nft set $nft_set_name" "debug"
nft_add_set_elements "$nft_table_name" "$nft_set_name" "$array"
fi
}

View File

@@ -0,0 +1,180 @@
# Constructs and returns a ruleset tag using section, name, optional type, and a fixed postfix
get_ruleset_tag() {
local section="$1"
local name="$2"
local type="$3"
local postfix="ruleset"
if [ -n "$type" ]; then
echo "$section-$name-$type-$postfix"
else
echo "$section-$name-$postfix"
fi
}
# Creates a new ruleset JSON file if it doesn't already exist
create_source_rule_set() {
local ruleset_filepath="$1"
if file_exists "$ruleset_filepath"; then
return 3
fi
jq -n '{version: 3, rules: []}' > "$ruleset_filepath"
}
#######################################
# Patch a source ruleset JSON file for sing-box by appending a new ruleset object containing the provided key
# and value.
# Arguments:
# filepath: path to the JSON file to patch
# key: the ruleset key to insert (e.g., "ip_cidr")
# value: a JSON array of values to assign to the key
# Example:
# patch_source_ruleset_rules "/tmp/sing-box/ruleset.json" "ip_cidr" '["1.1.1.1","2.2.2.2"]'
#######################################
patch_source_ruleset_rules() {
local filepath="$1"
local key="$2"
local value="$3"
local tmpfile=$(mktemp)
jq --arg key "$key" --argjson value "$value" \
'( .rules | map(has($key)) | index(true) ) as $idx |
if $idx != null then
.rules[$idx][$key] = (.rules[$idx][$key] + $value | unique)
else
.rules += [{ ($key): $value }]
end' "$filepath" > "$tmpfile"
if [ $? -ne 0 ]; then
rm -f "$tmpfile"
return 1
fi
mv "$tmpfile" "$filepath"
}
# Imports a plain domain list into a ruleset in chunks, validating domains and appending them as domain_suffix rules
import_plain_domain_list_to_local_source_ruleset_chunked() {
local plain_list_filepath="$1"
local ruleset_filepath="$2"
local chunk_size="${3:-5000}"
local array count json_array
count=0
while IFS= read -r line; do
line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -z "$line" ] && continue
if ! is_domain_suffix "$line"; then
log "'$line' is not a valid domain" "debug"
continue
fi
if [ -z "$array" ]; then
array="$line"
else
array="$array,$line"
fi
count=$((count + 1))
if [ "$count" = "$chunk_size" ]; then
log "Adding $count elements to rule set at $ruleset_filepath" "debug"
json_array="$(comma_string_to_json_array "$array")"
patch_source_ruleset_rules "$ruleset_filepath" "domain_suffix" "$json_array"
array=""
count=0
fi
done < "$plain_list_filepath"
if [ -n "$array" ]; then
log "Adding $count elements to rule set at $ruleset_filepath" "debug"
json_array="$(comma_string_to_json_array "$array")"
patch_source_ruleset_rules "$ruleset_filepath" "domain_suffix" "$json_array"
fi
}
# Imports a plain IPv4/CIDR list into a ruleset in chunks, validating entries and appending them as ip_cidr rules
import_plain_subnet_list_to_local_source_ruleset_chunked() {
local plain_list_filepath="$1"
local ruleset_filepath="$2"
local chunk_size="${3:-5000}"
local array count json_array
count=0
while IFS= read -r line; do
line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -z "$line" ] && continue
if ! is_ipv4 "$line" && ! is_ipv4_cidr "$line"; then
log "'$line' is not IPv4 or IPv4 CIDR" "debug"
continue
fi
if [ -z "$array" ]; then
array="$line"
else
array="$array,$line"
fi
count=$((count + 1))
if [ "$count" = "$chunk_size" ]; then
log "Adding $count elements to ruleset at $ruleset_filepath" "debug"
json_array="$(comma_string_to_json_array "$array")"
patch_source_ruleset_rules "$ruleset_filepath" "ip_cidr" "$json_array"
array=""
count=0
fi
done < "$plain_list_filepath"
if [ -n "$array" ]; then
log "Adding $count elements to ruleset at $ruleset_filepath" "debug"
json_array="$(comma_string_to_json_array "$array")"
patch_source_ruleset_rules "$ruleset_filepath" "ip_cidr" "$json_array"
fi
}
# Determines the ruleset format based on the file extension (json → source, srs → binary)
get_ruleset_format_by_file_extension() {
local file_extension="$1"
local format
case "$file_extension" in
json) format="source" ;;
srs) format="binary" ;;
*)
log "Unsupported file extension: .$file_extension" "error"
return 1
;;
esac
echo "$format"
}
# Decompiles a sing-box SRS binary file into a JSON ruleset file
decompile_binary_ruleset() {
local binary_filepath="$1"
local output_filepath="$2"
log "Decompiling $binary_filepath to $output_filepath" "debug"
sing-box rule-set decompile "$binary_filepath" -o "$output_filepath"
if [[ $? -ne 0 ]]; then
log "Decompilation command failed for $binary_filepath" "error"
return 1
fi
}
# Extracts all ip_cidr entries from a JSON ruleset file and writes them to an output file.
extract_ip_cidr_from_json_ruleset_to_file() {
local json_file="$1"
local output_file="$2"
log "Extracting ip_cidr entries from $json_file to $output_file" "debug"
jq -r '.rules[].ip_cidr[]' "$json_file" > "$output_file"
}

View File

@@ -214,7 +214,12 @@ _add_outbound_transport() {
;; ;;
grpc) grpc)
# TODO(ampetelin): Add handling of optional gRPC parameters; example links are needed. # TODO(ampetelin): Add handling of optional gRPC parameters; example links are needed.
config=$(sing_box_cm_set_grpc_transport_for_outbound "$config" "$outbound_tag") local grpc_service_name
grpc_service_name=$(url_get_query_param "$url" "serviceName")
config=$(
sing_box_cm_set_grpc_transport_for_outbound "$config" "$outbound_tag" "$grpc_service_name"
)
;; ;;
*) *)
log "Unknown transport '$transport' detected." "error" log "Unknown transport '$transport' detected." "error"

View File

@@ -1339,9 +1339,10 @@ sing_box_cm_configure_cache_file() {
####################################### #######################################
# Configure the experimental clash_api section of a sing-box JSON configuration. # Configure the experimental clash_api section of a sing-box JSON configuration.
# Arguments: # Arguments:
# config: JSON configuration (string) # config: string, JSON configuration
# external_controller: API listening address; Clash API will be disabled if empty # external_controller: string, API listening address; Clash API will be disabled if empty
# external_ui: Optional path to static web resources to serve at http://{{external-controller}}/ui # external_ui: string, Optional path to static web resources to serve at http://{{external-controller}}/ui
# secret: string, Optional secret for the RESTful API Authenticate by specifying HTTP header
# Outputs: # Outputs:
# Writes updated JSON configuration to stdout # Writes updated JSON configuration to stdout
# Example: # Example:
@@ -1351,59 +1352,17 @@ sing_box_cm_configure_clash_api() {
local config="$1" local config="$1"
local external_controller="$2" local external_controller="$2"
local external_ui="$3" local external_ui="$3"
local secret="$4"
echo "$config" | jq \ echo "$config" | jq \
--arg external_controller "$external_controller" \ --arg external_controller "$external_controller" \
--arg external_ui "$external_ui" \ --arg external_ui "$external_ui" \
--arg secret "$secret" \
'.experimental.clash_api = { '.experimental.clash_api = {
external_controller: $external_controller, external_controller: $external_controller,
} }
+ (if $external_ui != "" then { external_ui: $external_ui } else {} end)' + (if $external_ui != "" then { external_ui: $external_ui } else {} end)
} + (if $secret != "" then { secret: $secret } else {} end)'
#######################################
# Create a local source ruleset JSON file for sing-box.
# Arguments:
# filepath: path to the JSON file to create
# Example:
# sing_box_cm_create_local_source_ruleset "/tmp/sing-box/ruleset.json"
#######################################
sing_box_cm_create_local_source_ruleset() {
local filepath="$1"
jq -n '{version: 3, rules: []}' > "$filepath"
}
#######################################
# Patch a local source ruleset JSON file for sing-box by adding unique! values to a given key.
# Arguments:
# filepath: path to the JSON file to patch
# key: the ruleset key to update (e.g., "ip_cidr")
# value: a JSON array of values to add to the key
# Example:
# sing_box_cm_patch_local_source_ruleset_rules "/tmp/sing-box/ruleset.json" "ip_cidr" '["1.1.1.1","2.2.2.2"]'
#######################################
sing_box_cm_patch_local_source_ruleset_rules() {
local filepath="$1"
local key="$2"
local value="$3"
value=$(_normalize_arg "$value")
local content
content="$(cat "$filepath")"
echo "$content" | jq \
--arg key "$key" \
--argjson value "$value" '
([.rules[]?[$key][]] | unique) as $existing
| ($value - $existing) as $value
| if ($value | length) > 0 then
.rules += [{($key): $value}]
else
.
end
' > "$filepath"
} }
####################################### #######################################