From 54ba53100d40912536de67789d8b1c0c47a8d1fc Mon Sep 17 00:00:00 2001 From: gitea-action Date: Sat, 9 Nov 2024 19:30:46 +0800 Subject: [PATCH] luci-app-openclash: sync upstream last commit: https://github.com/vernesong/OpenClash/commit/1d0e7442df768383a0ec6b155c226972e07becbb --- luci-app-openclash/Makefile | 17 +- .../luasrc/controller/openclash.lua | 8 +- .../luasrc/model/cbi/openclash/client.lua | 8 +- .../model/cbi/openclash/config-overwrite.lua | 74 +- .../model/cbi/openclash/config-subscribe.lua | 4 +- .../luasrc/model/cbi/openclash/config.lua | 6 +- .../model/cbi/openclash/custom-dns-edit.lua | 13 +- .../model/cbi/openclash/other-rules-edit.lua | 12 +- .../openclash/proxy-provider-file-manage.lua | 2 +- .../luasrc/model/cbi/openclash/servers.lua | 10 +- .../luasrc/model/cbi/openclash/settings.lua | 3 + .../luasrc/view/openclash/cfg_check.htm | 2 +- .../luasrc/view/openclash/config_editor.htm | 17 +- .../luasrc/view/openclash/log.htm | 8 +- .../luasrc/view/openclash/myip.htm | 4 +- .../luasrc/view/openclash/status.htm | 43 +- .../luasrc/view/openclash/toolbar_show.htm | 2 +- .../po/zh-cn/openclash.zh-cn.po | 117 +- luci-app-openclash/root/etc/config/openclash | 2 +- luci-app-openclash/root/etc/init.d/openclash | 780 +- .../root/etc/openclash/GeoSite.dat | 83018 ++++++++-------- .../openclash_custom_fallback_filter.yaml | 5 +- .../custom/openclash_custom_overwrite.sh | 35 +- .../custom/openclash_custom_sniffer.yaml | 41 + .../openclash_force_sniffing_domain.yaml | 6 - .../openclash_sniffing_domain_filter.yaml | 7 - .../openclash_sniffing_ports_filter.yaml | 12 - .../rule_provider/{OpenAI => AI Suite} | 23 +- .../root/etc/uci-defaults/luci-openclash | 30 +- .../root/usr/share/openclash/YAML.rb | 4 + .../root/usr/share/openclash/openclash.sh | 140 +- .../usr/share/openclash/openclash_core.sh | 3 +- .../usr/share/openclash/openclash_debug.sh | 17 +- .../usr/share/openclash/openclash_rule.sh | 18 +- .../usr/share/openclash/openclash_watchdog.sh | 322 +- .../root/usr/share/openclash/res/lhie1.yaml | 130 +- .../share/openclash/res/rule_providers.list | 2 +- .../root/usr/share/openclash/ruby.sh | 25 +- ...{Config-mfHMd71S.js => Config-CcYWVyqe.js} | 2 +- .../metacubexd/assets/Connections-C4lDijqW.js | 1 - .../metacubexd/assets/Connections-CVJiJJwm.js | 16 + .../metacubexd/assets/IconReload-C5Iuvpd-.js | 6 + .../ui/metacubexd/assets/Logs-KOUcZ2qF.js | 1 - .../ui/metacubexd/assets/Logs-LisT8FTz.js | 1 + .../ui/metacubexd/assets/Overview-De_zu9wR.js | 795 - .../ui/metacubexd/assets/Overview-DiEjGL5X.js | 797 + .../ui/metacubexd/assets/Proxies-A8q5R6Aj.js | 1 + .../ui/metacubexd/assets/Proxies-DgzLrzio.js | 1 - .../{Rules-DrUtyF7O.js => Rules-BskxbInP.js} | 6 +- .../{Setup-CqaOhgQf.js => Setup-e28eI3Pt.js} | 2 +- .../ui/metacubexd/assets/global-BCvoRSag.js | 1 - .../ui/metacubexd/assets/global-Cq-x4U7Q.js | 1 + .../ui/metacubexd/assets/index-DACeLBg-.js | 104 + .../ui/metacubexd/assets/index-DWMGWNy8.js | 28089 ------ ...{index-BVqcsp-M.css => index-D_QrDGkm.css} | 2 +- .../{index-6_sXLHMR.js => index-GtOz1sEE.js} | 32 +- .../share/openclash/ui/metacubexd/index.html | 4 +- .../usr/share/openclash/ui/metacubexd/sw.js | 2 +- .../root/usr/share/openclash/ui/yacd/CNAME | 2 +- .../openclash/ui/yacd/Twemoji_Mozilla.ttf | Bin 0 -> 1474284 bytes .../ui/yacd/apple-touch-icon-precomposed.png | Bin 3766 -> 48291 bytes .../ui/yacd/assets/BaseModal-56985af9.js | 1 + .../ui/yacd/assets/BaseModal-e9f180d4.css | 1 + .../ui/yacd/assets/Config-5a241eed.js | 1 - .../ui/yacd/assets/Config-7eb3f1bb.css | 1 + .../ui/yacd/assets/Config-cf41b8ef.css | 1 - .../ui/yacd/assets/Config-ecaa0a4f.js | 1 + .../ui/yacd/assets/Connections-2b49f1fb.css | 1 + .../ui/yacd/assets/Connections-47651ffc.js | 68 + .../ui/yacd/assets/Connections-a9e050f3.js | 22 - .../ui/yacd/assets/Connections-ddae4f70.css | 1 - .../openclash/ui/yacd/assets/Fab-440522cc.js | 1 + .../openclash/ui/yacd/assets/Fab-48def6bf.css | 1 + .../openclash/ui/yacd/assets/Fab-6279b0bb.js | 1 - .../openclash/ui/yacd/assets/Fab-a434d836.css | 1 - .../ui/yacd/assets/Input-48bd0688.js | 1 + .../ui/yacd/assets/Input-505b5fdb.css | 1 - .../ui/yacd/assets/Input-6985be35.js | 1 - .../ui/yacd/assets/Logs-4c263fad.css | 1 + .../ui/yacd/assets/Logs-5e5ee0ad.css | 1 - .../openclash/ui/yacd/assets/Logs-a4be0f66.js | 1 - .../openclash/ui/yacd/assets/Logs-bc8b5e4f.js | 1 + .../ui/yacd/assets/Modal-86bce5c3.css | 1 - .../ui/yacd/assets/Modal.module-c406ff95.js | 1 - .../ui/yacd/assets/Proxies-06b60f95.css | 1 + .../ui/yacd/assets/Proxies-40f80166.css | 1 - .../ui/yacd/assets/Proxies-420aa72b.js | 1 - .../ui/yacd/assets/Proxies-9f4548f7.js | 1 + .../ui/yacd/assets/Rules-04c64a3e.js | 1 - .../ui/yacd/assets/Rules-162ef666.css | 1 + .../ui/yacd/assets/Rules-e11cb70e.css | 1 - .../ui/yacd/assets/Rules-eeeb29ab.js | 1 + .../ui/yacd/assets/Select-07e025ab.css | 1 + .../ui/yacd/assets/Select-320ccd0b.js | 1 + .../ui/yacd/assets/Select-3de40504.css | 1 - .../ui/yacd/assets/Select-dda18c57.js | 1 - .../ui/yacd/assets/StyleGuide-255b125c.css | 1 - .../ui/yacd/assets/StyleGuide-409386d8.js | 1 - .../ui/yacd/assets/TextFilter-ced87fc6.css | 1 - .../ui/yacd/assets/TextFilter-ea8f9266.js | 1 - .../ui/yacd/assets/TextFitler-4cb78215.js | 1 + .../ui/yacd/assets/TextFitler-a112af1a.css | 1 + .../ui/yacd/assets/Toggle-4f572f6c.css | 1 - .../ui/yacd/assets/Toggle-cc905705.js | 1 - .../assets/TwemojiCountryFlags-9f04f144.woff2 | Bin 78292 -> 0 bytes .../yacd/assets/Twemoji_Mozilla-6d90152e.ttf | Bin 0 -> 1474284 bytes .../ui/yacd/assets/ZapAnimated-6c3cdb8c.css | 1 - .../ui/yacd/assets/ZapAnimated-d32c4141.js | 1 - .../ui/yacd/assets/chart-lib-6081a478.js | 16 + .../ui/yacd/assets/chart-lib-da3c73a9.js | 16 - .../openclash/ui/yacd/assets/en-89e30f54.js | 1 - .../openclash/ui/yacd/assets/en-f84bd3d3.js | 1 + .../ui/yacd/assets/index-08f400cf.js | 9 - .../ui/yacd/assets/index-4d07c048.js | 9 + .../ui/yacd/assets/index-64292e67.css | 1 + .../ui/yacd/assets/index-84fa0cb3.js | 1 + .../ui/yacd/assets/index-8cf47a1c.js | 147 - .../ui/yacd/assets/index-d26de9ee.js | 1 - .../ui/yacd/assets/index-d5e38ae4.css | 1 - .../ui/yacd/assets/index-fda592a8.js | 104 + .../ui/yacd/assets/index.esm-eb217302.js | 1 - .../ui/yacd/assets/index.modern-c58ff412.js | 7 - .../inter-latin-400-normal-3ea830d4.woff | Bin 0 -> 21420 bytes .../inter-latin-400-normal-e3982e96.woff | Bin 22132 -> 0 bytes .../inter-latin-800-normal-02e00891.woff | Bin 23308 -> 0 bytes .../inter-latin-800-normal-d08d7178.woff | Bin 0 -> 22712 bytes .../{logs-281e0071.js => logs-bfc558fc.js} | 4 +- .../objectWithoutPropertiesLoose-4f48578a.js | 1 + .../{play-85de9511.js => play-6087f197.js} | 2 +- ...roboto-mono-latin-400-normal-d5d7d67f.woff | Bin 15232 -> 0 bytes ...roboto-mono-latin-400-normal-dffdffa7.woff | Bin 0 -> 15160 bytes .../ui/yacd/assets/rotate-cw-36605368.js | 1 + .../ui/yacd/assets/useMutation-4610ee00.js | 1 - ...=> useRemainingViewPortHeight-d1c9b30b.js} | 2 +- .../openclash/ui/yacd/assets/vi-75c7db25.js | 1 + .../openclash/ui/yacd/assets/zh-019c0297.js | 1 - .../ui/yacd/assets/zh-cn-d82b820c.js | 1 + .../ui/yacd/assets/zh-tw-9cdfa61b.js | 1 + .../usr/share/openclash/ui/yacd/index.html | 14 +- .../root/usr/share/openclash/ui/yacd/logo.png | Bin 0 -> 81167 bytes .../openclash/ui/yacd/manifest.webmanifest | 2 +- .../root/usr/share/openclash/ui/yacd/sw.js | 1733 +- .../usr/share/openclash/ui/yacd/yacd-128.png | Bin 7703 -> 0 bytes .../usr/share/openclash/ui/yacd/yacd-64.png | Bin 3433 -> 0 bytes .../root/usr/share/openclash/ui/yacd/yacd.ico | Bin 5430 -> 181508 bytes .../root/usr/share/openclash/ui/yacd/yacd.png | Bin 0 -> 48291 bytes .../root/usr/share/openclash/yml_change.sh | 1004 +- .../usr/share/openclash/yml_groups_get.sh | 281 +- .../usr/share/openclash/yml_groups_name_ch.sh | 2 +- .../usr/share/openclash/yml_groups_set.sh | 15 +- .../usr/share/openclash/yml_proxys_get.sh | 2694 +- .../usr/share/openclash/yml_proxys_set.sh | 16 +- .../usr/share/openclash/yml_rules_change.sh | 1078 +- .../openclash/addon/edit/matchbrackets.js | 2 +- .../openclash/addon/fold/foldgutter.js | 6 + .../resources/openclash/addon/lint/lint.js | 13 +- .../resources/openclash/img/logo.png | Bin 14334 -> 12699 bytes .../resources/openclash/img/meta.png | Bin 12699 -> 0 bytes .../resources/openclash/lib/codemirror.js | 99 +- .../resources/openclash/mode/yaml/yaml.js | 2 +- 160 files changed, 47616 insertions(+), 74644 deletions(-) create mode 100644 luci-app-openclash/root/etc/openclash/custom/openclash_custom_sniffer.yaml delete mode 100644 luci-app-openclash/root/etc/openclash/custom/openclash_force_sniffing_domain.yaml delete mode 100644 luci-app-openclash/root/etc/openclash/custom/openclash_sniffing_domain_filter.yaml delete mode 100644 luci-app-openclash/root/etc/openclash/custom/openclash_sniffing_ports_filter.yaml rename luci-app-openclash/root/etc/openclash/rule_provider/{OpenAI => AI Suite} (58%) rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{Config-mfHMd71S.js => Config-CcYWVyqe.js} (80%) delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Connections-C4lDijqW.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Connections-CVJiJJwm.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/IconReload-C5Iuvpd-.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Logs-KOUcZ2qF.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Logs-LisT8FTz.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Overview-De_zu9wR.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Overview-DiEjGL5X.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Proxies-A8q5R6Aj.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Proxies-DgzLrzio.js rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{Rules-DrUtyF7O.js => Rules-BskxbInP.js} (72%) rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{Setup-CqaOhgQf.js => Setup-e28eI3Pt.js} (96%) delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/global-BCvoRSag.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/global-Cq-x4U7Q.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-DACeLBg-.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-DWMGWNy8.js rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{index-BVqcsp-M.css => index-D_QrDGkm.css} (64%) rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{index-6_sXLHMR.js => index-GtOz1sEE.js} (55%) create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/Twemoji_Mozilla.ttf create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/BaseModal-56985af9.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/BaseModal-e9f180d4.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Config-5a241eed.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Config-7eb3f1bb.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Config-cf41b8ef.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Config-ecaa0a4f.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-2b49f1fb.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-47651ffc.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-a9e050f3.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-ddae4f70.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Fab-440522cc.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Fab-48def6bf.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Fab-6279b0bb.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Fab-a434d836.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Input-48bd0688.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Input-505b5fdb.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Input-6985be35.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-4c263fad.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-5e5ee0ad.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-a4be0f66.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-bc8b5e4f.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Modal-86bce5c3.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Modal.module-c406ff95.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Proxies-06b60f95.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Proxies-40f80166.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Proxies-420aa72b.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Proxies-9f4548f7.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Rules-04c64a3e.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Rules-162ef666.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Rules-e11cb70e.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Rules-eeeb29ab.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Select-07e025ab.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Select-320ccd0b.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Select-3de40504.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Select-dda18c57.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/StyleGuide-255b125c.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/StyleGuide-409386d8.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/TextFilter-ced87fc6.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/TextFilter-ea8f9266.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/TextFitler-4cb78215.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/TextFitler-a112af1a.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Toggle-4f572f6c.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Toggle-cc905705.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/TwemojiCountryFlags-9f04f144.woff2 create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Twemoji_Mozilla-6d90152e.ttf delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/ZapAnimated-6c3cdb8c.css delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/ZapAnimated-d32c4141.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/chart-lib-6081a478.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/chart-lib-da3c73a9.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/en-89e30f54.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/en-f84bd3d3.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-08f400cf.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-4d07c048.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-64292e67.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-84fa0cb3.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-8cf47a1c.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-d26de9ee.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-d5e38ae4.css create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-fda592a8.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index.esm-eb217302.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index.modern-c58ff412.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/inter-latin-400-normal-3ea830d4.woff delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/inter-latin-400-normal-e3982e96.woff delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/inter-latin-800-normal-02e00891.woff create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/inter-latin-800-normal-d08d7178.woff rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{logs-281e0071.js => logs-bfc558fc.js} (86%) create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/objectWithoutPropertiesLoose-4f48578a.js rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{play-85de9511.js => play-6087f197.js} (80%) delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/roboto-mono-latin-400-normal-d5d7d67f.woff create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/roboto-mono-latin-400-normal-dffdffa7.woff create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/rotate-cw-36605368.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/useMutation-4610ee00.js rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{useRemainingViewPortHeight-b3800ff0.js => useRemainingViewPortHeight-d1c9b30b.js} (81%) create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/vi-75c7db25.js delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/zh-019c0297.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/zh-cn-d82b820c.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/zh-tw-9cdfa61b.js create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/logo.png delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/yacd-128.png delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/yacd-64.png create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/yacd.png delete mode 100644 luci-app-openclash/root/www/luci-static/resources/openclash/img/meta.png diff --git a/luci-app-openclash/Makefile b/luci-app-openclash/Makefile index 492b94875..1eb71bcd1 100644 --- a/luci-app-openclash/Makefile +++ b/luci-app-openclash/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-openclash -PKG_VERSION:=0.46.033 +PKG_VERSION:=0.46.050 PKG_RELEASE:=beta PKG_MAINTAINER:=vernesong @@ -27,6 +27,15 @@ define Package/$(PKG_NAME)/config config PACKAGE_iptables-mod-extra default y if ! PACKAGE_firewall4 + + config PACKAGE_dnsmasq_full_ipset + default y if ! PACKAGE_firewall4 + + config PACKAGE_dnsmasq_full_nftset + default y if PACKAGE_firewall4 + + config PACKAGE_ipset + default y if ! PACKAGE_firewall4 endef define Package/$(PKG_NAME) @@ -34,7 +43,7 @@ define Package/$(PKG_NAME) SUBMENU:=3. Applications TITLE:=LuCI support for clash PKGARCH:=all - DEPENDS:=+dnsmasq-full +coreutils +coreutils-nohup +bash +curl +ca-certificates +ipset +ip-full \ + DEPENDS:=+dnsmasq-full +coreutils +coreutils-nohup +bash +curl +ca-certificates +ip-full \ +libcap +libcap-bin +ruby +ruby-yaml +kmod-tun +unzip MAINTAINER:=vernesong endef @@ -64,9 +73,7 @@ define Build/Prepare cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_domain_dns.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_domain_dns.list" >/dev/null 2>&1 cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_domain_dns_policy.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_domain_dns_policy.list" >/dev/null 2>&1 cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_fallback_filter.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_fallback_filter.yaml" >/dev/null 2>&1 - cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_force_sniffing_domain.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_force_sniffing_domain.yaml" >/dev/null 2>&1 - cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_sniffing_domain_filter.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_sniffing_domain_filter.yaml" >/dev/null 2>&1 - cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_sniffing_ports_filter.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_sniffing_ports_filter.yaml" >/dev/null 2>&1 + cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_sniffer.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_sniffer.yaml" >/dev/null 2>&1 cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_localnetwork_ipv4.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_localnetwork_ipv4.list" >/dev/null 2>&1 cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_localnetwork_ipv6.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_localnetwork_ipv6.list" >/dev/null 2>&1 cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_chnroute_pass.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_chnroute_pass.list" >/dev/null 2>&1 diff --git a/luci-app-openclash/luasrc/controller/openclash.lua b/luci-app-openclash/luasrc/controller/openclash.lua index 429abaa85..d65ad4a43 100644 --- a/luci-app-openclash/luasrc/controller/openclash.lua +++ b/luci-app-openclash/luasrc/controller/openclash.lua @@ -830,15 +830,12 @@ end function action_toolbar_show_sys() local pid = luci.sys.exec("pidof clash |head -1 |tr -d '\n' 2>/dev/null") - local mem, cpu + local cpu if pid and pid ~= "" then - mem = tonumber(luci.sys.exec(string.format("cat /proc/%s/status 2>/dev/null |grep -w VmRSS |awk '{print $2}'", pid))) cpu = luci.sys.exec(string.format("top -b -n1 |grep -E '%s' 2>/dev/null |grep -v grep |awk '{for (i=1;i<=NF;i++) {if ($i ~ /clash/) break; else cpu=i}}; {print $cpu}' 2>/dev/null", pid)) - if mem and cpu then - mem = fs.filesize(mem*1024) or "0 KB" + if cpu then cpu = string.match(cpu, "%d+") or "0" else - mem = "0 KB" cpu = "0" end else @@ -846,7 +843,6 @@ function action_toolbar_show_sys() end luci.http.prepare_content("application/json") luci.http.write_json({ - mem = mem, cpu = cpu; }) end diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/client.lua b/luci-app-openclash/luasrc/model/cbi/openclash/client.lua index f2d2b271f..1893ddf44 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/client.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/client.lua @@ -53,9 +53,9 @@ for t,o in ipairs(fs.glob("/etc/openclash/config/*"))do e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",a.mtime) end if uci:get("openclash", "config", "config_path") and string.sub(uci:get("openclash", "config", "config_path"), 23, -1) == e[t].name then - e[t].state=translate("Enable") + e[t].state=translate("Enabled") else - e[t].state=translate("Disable") + e[t].state=translate("Disabled") end e[t].check=translate(config_check(o)) end @@ -75,7 +75,7 @@ if a then ck.template="openclash/cfg_check" sb.template="openclash/sub_info_show" - btnis=tb:option(Button,"switch",translate("Switch Config")) + btnis=tb:option(Button,"switch",translate("Switch")) btnis.template="openclash/other_button" btnis.render=function(o,t,a) if not e[t] then return false end @@ -172,4 +172,4 @@ if uci:get("openclash", "config", "dler_token") then return m, dler, form, s, ap, d else return m, form, s, ap, d -end \ No newline at end of file +end diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua b/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua index ab89f3a1a..72b13a915 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua @@ -33,7 +33,8 @@ if not lan_ip or lan_ip == "" then end m = Map("openclash", translate("Overwrite Settings")) m.pageaction = false -m.description = translate("Note: To restore the default configuration, try accessing:").." http://"..lan_ip.."/cgi-bin/luci/admin/services/openclash/restore" +m.description = translate("Note: To restore the default configuration, try accessing:").." http://"..lan_ip.."/cgi-bin/luci/admin/services/openclash/restore".. +"
"..font_green..translate("For More Useful Meta Core Functions Go Wiki")..": "..font_off..""..translate("https://wiki.metacubex.one/").."" s = m:section(TypedSection, "openclash") s.anonymous = true @@ -147,7 +148,7 @@ o = s:taboption("dns", Flag, "enable_custom_dns", font_red..bold_on..translate(" o.description = font_red..bold_on..translate("Set OpenClash Upstream DNS Resolve Server")..bold_off..font_off o.default = 0 -o = s:taboption("dns", Flag, "enable_respect_rules", font_red..bold_on..translate("Respect Rules")..bold_off..font_off) +o = s:taboption("dns", Flag, "enable_respect_rules", font_red..bold_on..translate("Respect Rules").."(respect-rules)"..bold_off..font_off) o.description = font_red..bold_on..translate("Whether or not The Connection to the DNS Server Follow the Rules in Config")..bold_off..font_off o.default = 0 @@ -292,14 +293,6 @@ o = s:taboption("meta", Flag, "enable_unified_delay", font_red..bold_on..transla o.description = font_red..bold_on..translate("Change The Delay Calculation Method To Remove Extra Delays Such as Handshaking")..bold_off..font_off o.default = "0" -o = s:taboption("meta", ListValue, "keep_alive_interval", font_red..bold_on..translate("TCP Keep-alive Interval(s)")..bold_off..font_off) -o.description = font_red..bold_on..translate("Change The TCP Keep-alive Interval, Selecting a Larger Value Avoids Abnormal Resource Consumption")..bold_off..font_off -o:value("0", translate("Disable")) -o:value("15") -o:value("1800") -o:value("3600") -o.default = "0" - o = s:taboption("meta", ListValue, "find_process_mode", translate("Enable Process Rule")) o.description = translate("Whether to Enable Process Rules, If You Are Not Sure, Please Choose off Which Useful in Router Environment") o:value("0", translate("Disable")) @@ -347,62 +340,21 @@ o.description = translate("Custom The Force and Skip Sniffing Doamin Lists") o.default = 0 o:depends("enable_meta_sniffer", "1") -sniffing_domain_force = s:taboption("meta", Value, "sniffing_domain_force") -sniffing_domain_force:depends("enable_meta_sniffer_custom", "1") -sniffing_domain_force.template = "cbi/tvalue" -sniffing_domain_force.description = translate("Will Override Dns Queries If Domains in The List") -sniffing_domain_force.rows = 20 -sniffing_domain_force.wrap = "off" +sniffer_custom = s:taboption("meta", Value, "sniffer_custom") +sniffer_custom:depends("enable_meta_sniffer_custom", "1") +sniffer_custom.template = "cbi/tvalue" +sniffer_custom.rows = 20 +sniffer_custom.wrap = "off" -function sniffing_domain_force.cfgvalue(self, section) - return NXFS.readfile("/etc/openclash/custom/openclash_force_sniffing_domain.yaml") or "" +function sniffer_custom.cfgvalue(self, section) + return NXFS.readfile("/etc/openclash/custom/openclash_custom_sniffer.yaml") or "" end -function sniffing_domain_force.write(self, section, value) +function sniffer_custom.write(self, section, value) if value then value = value:gsub("\r\n?", "\n") - local old_value = NXFS.readfile("/etc/openclash/custom/openclash_force_sniffing_domain.yaml") + local old_value = NXFS.readfile("/etc/openclash/custom/openclash_custom_sniffer.yaml") if value ~= old_value then - NXFS.writefile("/etc/openclash/custom/openclash_force_sniffing_domain.yaml", value) - end - end -end - -sniffing_port_filter = s:taboption("meta", Value, "sniffing_port_filter") -sniffing_port_filter:depends("enable_meta_sniffer_custom", "1") -sniffing_port_filter.template = "cbi/tvalue" -sniffing_port_filter.description = translate("Will Only Sniffing If Ports in The List") -sniffing_port_filter.rows = 20 -sniffing_port_filter.wrap = "off" - -function sniffing_port_filter.cfgvalue(self, section) - return NXFS.readfile("/etc/openclash/custom/openclash_sniffing_ports_filter.yaml") or "" -end -function sniffing_port_filter.write(self, section, value) - if value then - value = value:gsub("\r\n?", "\n") - local old_value = NXFS.readfile("/etc/openclash/custom/openclash_sniffing_ports_filter.yaml") - if value ~= old_value then - NXFS.writefile("/etc/openclash/custom/openclash_sniffing_ports_filter.yaml", value) - end - end -end - -sniffing_domain_filter = s:taboption("meta", Value, "sniffing_domain_filter") -sniffing_domain_filter:depends("enable_meta_sniffer_custom", "1") -sniffing_domain_filter.template = "cbi/tvalue" -sniffing_domain_filter.description = translate("Will Disable Sniffing If Domains(sni) in The List") -sniffing_domain_filter.rows = 20 -sniffing_domain_filter.wrap = "off" - -function sniffing_domain_filter.cfgvalue(self, section) - return NXFS.readfile("/etc/openclash/custom/openclash_sniffing_domain_filter.yaml") or "" -end -function sniffing_domain_filter.write(self, section, value) - if value then - value = value:gsub("\r\n?", "\n") - local old_value = NXFS.readfile("/etc/openclash/custom/openclash_sniffing_domain_filter.yaml") - if value ~= old_value then - NXFS.writefile("/etc/openclash/custom/openclash_sniffing_domain_filter.yaml", value) + NXFS.writefile("/etc/openclash/custom/openclash_custom_sniffer.yaml", value) end end end diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe.lua b/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe.lua index e8851f54c..83ec183e1 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe.lua @@ -121,7 +121,7 @@ o = a:option(Button, "Commit", " ") o.inputtitle = translate("Commit Settings") o.inputstyle = "apply" o.write = function() - fs.unlink("/tmp/Proxy_Group") + fs.unlink("/tmp/Proxy_Group") m.uci:commit("openclash") end @@ -129,7 +129,7 @@ o = a:option(Button, "Apply", " ") o.inputtitle = translate("Update Config") o.inputstyle = "apply" o.write = function() - fs.unlink("/tmp/Proxy_Group") + fs.unlink("/tmp/Proxy_Group") m.uci:set("openclash", "config", "enable", 1) m.uci:commit("openclash") uci:foreach("openclash", "config_subscribe", diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/config.lua b/luci-app-openclash/luasrc/model/cbi/openclash/config.lua index 8ad341719..0a682018a 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/config.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/config.lua @@ -177,9 +177,9 @@ else e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",a.mtime) end if uci:get("openclash", "config", "config_path") and string.sub(uci:get("openclash", "config", "config_path"), 23, -1) == e[t].name then - e[t].state=translate("Enable") + e[t].state=translate("Enabled") else - e[t].state=translate("Disable") + e[t].state=translate("Disabled") end e[t].size=fs.filesize(a.size) e[t].check=translate(config_check(o)) @@ -201,7 +201,7 @@ st.template="openclash/cfg_check" ck.template="openclash/cfg_check" sb.template="openclash/sub_info_show" -btnis=tb:option(Button,"switch",translate("Switch Config")) +btnis=tb:option(Button,"switch",translate("Switch")) btnis.template="openclash/other_button" btnis.render=function(o,t,a) if not e[t] then return false end diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/custom-dns-edit.lua b/luci-app-openclash/luasrc/model/cbi/openclash/custom-dns-edit.lua index 3e84bdacf..8e3399719 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/custom-dns-edit.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/custom-dns-edit.lua @@ -59,7 +59,7 @@ o.rempty = false ---- interface o = s:option(Value, "interface", translate("Specific Interface")) -o.description = translate("DNS Lookup Only Through The Specific Interface")..translate("(Only TUN Core)") +o.description = translate("DNS Lookup Only Through The Specific Interface") local interfaces = SYS.exec("ls -l /sys/class/net/ 2>/dev/null |awk '{print $9}' 2>/dev/null") for interface in string.gmatch(interfaces, "%S+") do o:value(interface) @@ -68,6 +68,11 @@ o:value("Disable", translate("Disable")) o.default = "Disable" o.rempty = false +---- direct-nameserver +o = s:option(Flag, "direct_nameserver", translate("Direct Nameserver"), translate("Use For Domain Need Direct")..translate("(Only Meta Core)")) +o.rmempty = false +o.default = o.disbled + ---- Node Domain Resolve o = s:option(Flag, "node_resolve", translate("Node Domain Resolve"), translate("Use For Node Domain Resolve")..translate("(Only Meta Core)")) o.rmempty = false @@ -79,6 +84,12 @@ o:depends("type", "https") o.rmempty = false o.default = o.disbled +---- Skip-cert-verify +o = s:option(Flag, "skip_cert_verify", translate("skip-cert-verify"), translate("skip-cert-verify")..translate("(Only Meta Core)")) +o:depends("type", "https") +o.rmempty = false +o.default = o.disbled + ---- ECS Subnet o = s:option(Value, "ecs_subnet", translate("ECS Subnet"),translate("Specify the ECS Subnet Address")..translate("(Only Meta Core)")) o:depends("type", "https") diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua b/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua index f4d23afc5..0de1378e1 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua @@ -227,7 +227,7 @@ end o:value("DIRECT") o:value("REJECT") -o = s:option(ListValue, "OpenAI", translate("OpenAI")) +o = s:option(ListValue, "AI_Suite", translate("AI Suite")) o:depends("rule_name", "lhie1") o.rmempty = true for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do @@ -407,7 +407,7 @@ o:value("REJECT") end local t = { - {Commit, Back} + {Commit, Back} } a = m:section(Table, t) @@ -415,16 +415,16 @@ o = a:option(Button,"Commit", " ") o.inputtitle = translate("Commit Settings") o.inputstyle = "apply" o.write = function() - m.uci:commit(openclash) - --luci.http.redirect(m.redirect) + m.uci:commit(openclash) + --luci.http.redirect(m.redirect) end o = a:option(Button,"Back", " ") o.inputtitle = translate("Back Settings") o.inputstyle = "reset" o.write = function() - m.uci:revert(openclash, sid) - luci.http.redirect(m.redirect) + m.uci:revert(openclash, sid) + luci.http.redirect(m.redirect) end m:append(Template("openclash/toolbar_show")) diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/proxy-provider-file-manage.lua b/luci-app-openclash/luasrc/model/cbi/openclash/proxy-provider-file-manage.lua index 9dd0d9c12..c73689c89 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/proxy-provider-file-manage.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/proxy-provider-file-manage.lua @@ -87,7 +87,7 @@ return r end local t = { - {Refresh, Create, Delete_all, Apply} + {Refresh, Create, Delete_all, Apply} } a = proxy_form:section(Table, t) diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua b/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua index 75cfebdbf..3e28e08f6 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua @@ -255,8 +255,6 @@ o = a:option(Button,"Load_Config", " ") o.inputtitle = translate("Read Config") o.inputstyle = "apply" o.write = function() - m.uci:set("openclash", "config", "enable", 0) - m.uci:commit("openclash") luci.sys.call("/usr/share/openclash/yml_groups_get.sh 2>/dev/null &") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) end @@ -265,18 +263,14 @@ o = a:option(Button, "Commit", " ") o.inputtitle = translate("Commit Settings") o.inputstyle = "apply" o.write = function() - fs.unlink("/tmp/Proxy_Group") - m.uci:set("openclash", "config", "enable", 0) - m.uci:commit("openclash") + fs.unlink("/tmp/Proxy_Group") end o = a:option(Button, "Apply", " ") o.inputtitle = translate("Apply Settings") o.inputstyle = "apply" o.write = function() - fs.unlink("/tmp/Proxy_Group") - m.uci:set("openclash", "config", "enable", 0) - m.uci:commit("openclash") + fs.unlink("/tmp/Proxy_Group") luci.sys.call("/usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 &") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) end diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua b/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua index 7ec44e238..675d99147 100644 --- a/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua +++ b/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua @@ -1101,6 +1101,7 @@ o = s:taboption("ipv6", ListValue, "ipv6_mode", translate("IPv6 Proxy Mode")) o:value("0", translate("TProxy Mode")) o:value("1", translate("Redirect Mode")) o:value("2", translate("TUN Mode")..translate("(Only Meta Core)")) +o:value("3", translate("Mix Mode")..translate("(Only Meta Core)")) o.default = "0" o:depends("ipv6_enable", "1") @@ -1108,6 +1109,8 @@ o = s:taboption("ipv6", ListValue, "stack_type_v6", translate("Select Stack Type o.description = translate("Select Stack Type For TUN Mode, According To The Running Speed on Your Machine") o:depends({ipv6_mode= "2", en_mode = "redir-host"}) o:depends({ipv6_mode= "2", en_mode = "fake-ip"}) +o:depends({ipv6_mode= "3", en_mode = "redir-host"}) +o:depends({ipv6_mode= "3", en_mode = "fake-ip"}) o:value("system", translate("System ")) o:value("gvisor", translate("gVisor")) o:value("mixed", translate("Mixed")..translate("(Only Meta Core)")) diff --git a/luci-app-openclash/luasrc/view/openclash/cfg_check.htm b/luci-app-openclash/luasrc/view/openclash/cfg_check.htm index 0c7db10d5..1fc0496b7 100644 --- a/luci-app-openclash/luasrc/view/openclash/cfg_check.htm +++ b/luci-app-openclash/luasrc/view/openclash/cfg_check.htm @@ -2,7 +2,7 @@
<% local val = self:cfgvalue(section) - if val == translate("Enable") or val == translate("Config Normal") or val == translate("Exist") then + if val == translate("Enable") or val == translate("Enabled") or val == translate("Config Normal") or val == translate("Exist") then %>
<% diff --git a/luci-app-openclash/luasrc/view/openclash/config_editor.htm b/luci-app-openclash/luasrc/view/openclash/config_editor.htm index 99e8b8646..89a5f0f35 100644 --- a/luci-app-openclash/luasrc/view/openclash/config_editor.htm +++ b/luci-app-openclash/luasrc/view/openclash/config_editor.htm @@ -357,9 +357,7 @@ var myEditor_name_cus_r2 = document.getElementById("cbid.openclash.config.custom var myEditor_fake_filter = document.getElementById("cbid.openclash.config.custom_fake_filter"); var myEditor_custom_domain_dns = document.getElementById("cbid.openclash.config.custom_domain_dns"); var myEditor_edit_file = document.getElementById("cbid.openclash.config.edit_file"); -var myEditor_sniffing_domain_force = document.getElementById("cbid.openclash.config.sniffing_domain_force"); -var myEditor_sniffing_domain_filter = document.getElementById("cbid.openclash.config.sniffing_domain_filter"); -var myEditor_sniffing_port_filter = document.getElementById("cbid.openclash.config.sniffing_port_filter"); +var myEditor_custom_sniffer = document.getElementById("cbid.openclash.config.sniffer_custom"); if (myEditor_hosts) { editor(myEditor_hosts, 'false', '100%', '300px'); @@ -390,19 +388,10 @@ if (myEditor_custom_domain_dns) { other_editor(myEditor_custom_domain_dns, 'false', '100%', '300px'); }; -if (myEditor_sniffing_domain_force) { - other_editor(myEditor_sniffing_domain_force, 'false', '100%', '300px'); +if (myEditor_custom_sniffer) { + other_editor(myEditor_custom_sniffer, 'false', '100%', '300px'); }; -if (myEditor_sniffing_domain_filter) { - other_editor(myEditor_sniffing_domain_filter, 'false', '100%', '300px'); -}; - -if (myEditor_sniffing_port_filter) { - other_editor(myEditor_sniffing_port_filter, 'false', '100%', '300px'); -}; - - var core_log = document.getElementById("core_log"); var oc_log = document.getElementById("cbid.openclash.config.clog"); if (core_log && oc_log) { diff --git a/luci-app-openclash/luasrc/view/openclash/log.htm b/luci-app-openclash/luasrc/view/openclash/log.htm index 0843805d9..3f41336fa 100644 --- a/luci-app-openclash/luasrc/view/openclash/log.htm +++ b/luci-app-openclash/luasrc/view/openclash/log.htm @@ -225,20 +225,20 @@ function line_tolocal(str){ var cn = 0; var sn = 0; str.trim().split('\n').forEach(function(v, i) { - var regex = /"([^"]*)"/g; + var regex = /(time=)"([^"]*)"/g; var res = regex.exec(v); if (res) { - var dt = new Date(res[1]); + var dt = new Date(res[2]); } else { var dtt = new Date(v.substring(0,19)); } if (dt && dt != "Invalid Date"){ if (v.indexOf("level=") != -1) { - var log_info = v.substring(res[1].length + 7); + var log_info = v.substring(res[2].length + 7); } else { - var log_info = v.substring(res[1].length + 2); + var log_info = v.substring(res[2].length + 2); } cstrt[cn]=dt.getFullYear()+"-"+p(dt.getMonth()+1)+"-"+p(dt.getDate())+" "+p(dt.getHours())+":"+p(dt.getMinutes())+":"+p(dt.getSeconds())+log_info; cn = cn + 1; diff --git a/luci-app-openclash/luasrc/view/openclash/myip.htm b/luci-app-openclash/luasrc/view/openclash/myip.htm index 1c5bb255a..db4be40f2 100644 --- a/luci-app-openclash/luasrc/view/openclash/myip.htm +++ b/luci-app-openclash/luasrc/view/openclash/myip.htm @@ -303,7 +303,7 @@ if (localStorage.getItem('privacy_my_ip') != 'true') { $$.getElementById('ip-upaiyun').innerHTML = resp.data.remote_addr; }; - $$.getElementById('ip-upaiyun-geo').innerHTML = resp.data.remote_addr_location.country + resp.data.remote_addr_location.province + resp.data.remote_addr_location.city + ' ' + resp.data.remote_addr_location.isp; + $$.getElementById('ip-upaiyun-geo').innerHTML = resp.data.remote_addr_location.country + ' ' + resp.data.remote_addr_location.province + ' ' + resp.data.remote_addr_location.city + ' ' + resp.data.remote_addr_location.isp; //IP.parseIPIpip(resp.data.remote_addr, 'ip-upaiyun-geo'); addTitleOnOverflow(); }) @@ -379,7 +379,7 @@ if (localStorage.getItem('privacy_my_ip') != 'true') { $$.getElementById('ip-pcol').innerHTML = data.ip; }; - $$.getElementById('ip-pcol-geo').innerHTML = `${data.pro}${data.city}${data.region} ${pcisp[1]}`; + $$.getElementById('ip-pcol-geo').innerHTML = `${data.pro} ${data.city} ${data.region} ${pcisp[1]}`; addTitleOnOverflow(); }; diff --git a/luci-app-openclash/luasrc/view/openclash/status.htm b/luci-app-openclash/luasrc/view/openclash/status.htm index 132583a64..07fad1256 100644 --- a/luci-app-openclash/luasrc/view/openclash/status.htm +++ b/luci-app-openclash/luasrc/view/openclash/status.htm @@ -1,6 +1,14 @@