From ea13a755d2ef44946c79d2cf63d8e2561485b5d2 Mon Sep 17 00:00:00 2001
From: Repo Sync
Date: Mon, 12 Feb 2024 04:45:24 +0800
Subject: [PATCH] 2024-02-12 04:45:24 Auto Sync
---
luci-app-openclash/Makefile | 4 +-
.../luasrc/controller/openclash.lua | 38 +-
.../model/cbi/openclash/config-overwrite.lua | 21 +
.../cbi/openclash/config-subscribe-edit.lua | 1 +
.../luasrc/model/cbi/openclash/settings.lua | 15 +-
.../luasrc/view/openclash/status.htm | 111 ++-
.../luasrc/view/openclash/update.htm | 2 +-
.../po/zh-cn/openclash.zh-cn.po | 43 +-
luci-app-openclash/root/etc/config/openclash | 24 +-
luci-app-openclash/root/etc/init.d/openclash | 21 +-
.../custom/openclash_custom_fake_filter.list | 4 +
.../root/usr/share/openclash/clash_version.sh | 8 +-
.../root/usr/share/openclash/openclash.sh | 192 +----
.../usr/share/openclash/openclash_chnroute.sh | 20 +-
.../usr/share/openclash/openclash_core.sh | 24 +-
.../share/openclash/openclash_debug_dns.lua | 12 +-
.../openclash/openclash_dler_checkin.lua | 14 +-
.../openclash/openclash_download_dashboard.sh | 2 +-
.../openclash/openclash_download_rule_list.sh | 20 +-
.../usr/share/openclash/openclash_geoip.sh | 10 +-
.../usr/share/openclash/openclash_geosite.sh | 10 +-
.../usr/share/openclash/openclash_ipdb.sh | 10 +-
.../usr/share/openclash/openclash_rule.sh | 24 +-
.../usr/share/openclash/openclash_update.sh | 8 +-
.../usr/share/openclash/openclash_version.sh | 8 +-
.../usr/share/openclash/openclash_watchdog.sh | 143 +++-
.../usr/share/openclash/res/game_rules.list | 149 ++--
.../usr/share/openclash/ui/metacubexd/CNAME | 1 +
.../ui/metacubexd/assets/Config-8226e777.js | 1 -
.../ui/metacubexd/assets/Config-FN-Wqjyv.js | 1 +
.../metacubexd/assets/ConfigTitle-_jKUZ02Y.js | 1 +
.../metacubexd/assets/ConfigTitle-dd5fc83b.js | 1 -
.../metacubexd/assets/Connections-02d8e92b.js | 1 -
.../metacubexd/assets/Connections-G3NKrw3N.js | 1 +
.../ui/metacubexd/assets/Logs-2575e4f0.js | 1 -
.../ui/metacubexd/assets/Logs-2lK8RJqA.js | 1 +
.../ui/metacubexd/assets/Overview-51176cc0.js | 700 -----------------
.../ui/metacubexd/assets/Overview-5_c_esIi.js | 703 ++++++++++++++++++
.../ui/metacubexd/assets/Proxies-99da7d66.js | 1 -
.../ui/metacubexd/assets/Proxies-Tt9GNuSW.js | 1 +
.../ui/metacubexd/assets/Rules-3b098996.js | 40 -
.../ui/metacubexd/assets/Rules-hglfpXzR.js | 45 ++
.../ui/metacubexd/assets/Setup-a0db2f96.js | 1 -
.../ui/metacubexd/assets/Setup-mkV79sjj.js | 1 +
...0152e.ttf => Twemoji.Mozilla-UkCiemhT.ttf} | Bin
...ra-sans-cyrillic-400-normal-17346ce4.woff2 | Bin 10228 -> 0 bytes
...ira-sans-cyrillic-400-normal-2fc74b92.woff | Bin 8260 -> 0 bytes
...ira-sans-cyrillic-400-normal-4ryKXlYU.woff | Bin 0 -> 8860 bytes
...ra-sans-cyrillic-400-normal-PYrWRMJ5.woff2 | Bin 0 -> 10768 bytes
...ns-cyrillic-ext-400-normal-1RYie3E0.woff2} | Bin
...sans-cyrillic-ext-400-normal-ed6525e5.woff | Bin 15188 -> 0 bytes
...sans-cyrillic-ext-400-normal-rf3f-Kaw.woff | Bin 0 -> 15180 bytes
.../fira-sans-greek-400-normal-5f8c46dc.woff | Bin 10884 -> 0 bytes
...fira-sans-greek-400-normal-Mc4iyeKH.woff2} | Bin
.../fira-sans-greek-400-normal-eCSWGL47.woff | Bin 0 -> 10892 bytes
...ra-sans-greek-ext-400-normal-278932e4.woff | Bin 6948 -> 0 bytes
...ra-sans-greek-ext-400-normal-QOf54KGx.woff | Bin 0 -> 6964 bytes
...-sans-greek-ext-400-normal-wxqRhc-I.woff2} | Bin
.../fira-sans-latin-400-normal-6cb3f720.woff | Bin 20408 -> 0 bytes
.../fira-sans-latin-400-normal-6lFYBE6Z.woff2 | Bin 0 -> 23880 bytes
.../fira-sans-latin-400-normal-ea03bd5d.woff2 | Bin 22592 -> 0 bytes
.../fira-sans-latin-400-normal-ka9-J3LG.woff | Bin 0 -> 21900 bytes
...ra-sans-latin-ext-400-normal-9ba2512f.woff | Bin 27152 -> 0 bytes
...a-sans-latin-ext-400-normal-a47436ee.woff2 | Bin 30564 -> 0 bytes
...a-sans-latin-ext-400-normal-bFWruaeo.woff2 | Bin 0 -> 42736 bytes
...ra-sans-latin-ext-400-normal-moeor6ib.woff | Bin 0 -> 38424 bytes
...-sans-vietnamese-400-normal--U_MOZBq.woff2 | Bin 0 -> 8424 bytes
...a-sans-vietnamese-400-normal-2424aed1.woff | Bin 5584 -> 0 bytes
...-sans-vietnamese-400-normal-69e40dcc.woff2 | Bin 7372 -> 0 bytes
...a-sans-vietnamese-400-normal-ois6Ns-t.woff | Bin 0 -> 6796 bytes
.../ui/metacubexd/assets/global-9f47a568.js | 1 -
.../ui/metacubexd/assets/global-MCJ9PAgv.js | 1 +
.../ui/metacubexd/assets/index-5ivcdObt.css | 1 +
.../ui/metacubexd/assets/index-788b021a.css | 1 -
.../ui/metacubexd/assets/index-83f95c10.js | 36 -
.../ui/metacubexd/assets/index-IZ7lrjtp.js | 36 +
.../ui/metacubexd/assets/index-bd53d7c8.js | 1 -
.../ui/metacubexd/assets/index-k-FO5KmN.js | 7 +
.../ui/metacubexd/assets/vendor-5507c805.js | 28 -
.../ui/metacubexd/assets/vendor-TCjgV7Sn.js | 28 +
.../share/openclash/ui/metacubexd/index.html | 7 +-
.../usr/share/openclash/ui/metacubexd/sw.js | 2 +-
...orkbox-56a10583.js => workbox-3e911b1d.js} | 0
.../usr/share/openclash/ui/yacd/.nojekyll | 0
.../ui/yacd/assets/Config-35023b66.css | 1 -
.../ui/yacd/assets/Config-4a6335ea.js | 1 -
.../ui/yacd/assets/Config-5a241eed.js | 1 +
.../ui/yacd/assets/Config-cf41b8ef.css | 1 +
.../ui/yacd/assets/Connections-0bb3d584.js | 1 -
.../ui/yacd/assets/Connections-a9e050f3.js | 22 +
.../ui/yacd/assets/Connections-ddae4f70.css | 1 +
.../ui/yacd/assets/Connections-fb8ea59b.css | 1 -
.../{Fab-82e79c68.js => Fab-6279b0bb.js} | 2 +-
.../openclash/ui/yacd/assets/Fab-a0a7e573.css | 1 -
.../openclash/ui/yacd/assets/Fab-a434d836.css | 1 +
.../ui/yacd/assets/Input-505b5fdb.css | 1 +
.../ui/yacd/assets/Input-6985be35.js | 1 +
.../ui/yacd/assets/Logs-4b8e75d1.css | 1 -
.../ui/yacd/assets/Logs-5e5ee0ad.css | 1 +
.../openclash/ui/yacd/assets/Logs-a4be0f66.js | 1 +
.../openclash/ui/yacd/assets/Logs-f594acee.js | 1 -
.../ui/yacd/assets/Modal-86bce5c3.css | 1 +
.../ui/yacd/assets/Modal.module-c406ff95.js | 1 +
.../ui/yacd/assets/Proxies-40f80166.css | 1 +
.../ui/yacd/assets/Proxies-420aa72b.js | 1 +
.../ui/yacd/assets/Proxies-96538b21.js | 1 -
.../ui/yacd/assets/Proxies-bee4beaa.css | 1 -
.../ui/yacd/assets/Rules-04c64a3e.js | 1 +
.../ui/yacd/assets/Rules-2c6b2a7c.js | 1 -
...{Select-81600379.js => Select-dda18c57.js} | 2 +-
.../ui/yacd/assets/StyleGuide-255b125c.css | 1 +
.../ui/yacd/assets/StyleGuide-409386d8.js | 1 +
.../ui/yacd/assets/TextFilter-9fe1cd81.js | 1 -
.../ui/yacd/assets/TextFilter-b21c0577.css | 1 -
.../ui/yacd/assets/TextFilter-ced87fc6.css | 1 +
.../ui/yacd/assets/TextFilter-ea8f9266.js | 1 +
.../ui/yacd/assets/Toggle-4f572f6c.css | 1 +
.../ui/yacd/assets/Toggle-cc905705.js | 1 +
.../ui/yacd/assets/ZapAnimated-6c3cdb8c.css | 1 +
.../ui/yacd/assets/ZapAnimated-d32c4141.js | 1 +
.../ui/yacd/assets/chart-lib-236f0953.js | 16 -
.../ui/yacd/assets/chart-lib-da3c73a9.js | 16 +
.../ui/yacd/assets/chevron-down-0a0d4fcd.js | 1 -
.../assets/{en-0b55644c.js => en-89e30f54.js} | 2 +-
.../ui/yacd/assets/index-08f400cf.js | 9 +
.../ui/yacd/assets/index-58e8cd5b.css | 1 -
.../ui/yacd/assets/index-8cf47a1c.js | 147 ++++
.../ui/yacd/assets/index-aa3f8ed9.js | 129 ----
.../ui/yacd/assets/index-d22d76cf.js | 9 -
.../{index-b418964b.js => index-d26de9ee.js} | 2 +-
.../ui/yacd/assets/index-d5e38ae4.css | 1 +
....esm-9774ed4d.js => index.esm-eb217302.js} | 2 +-
.../{logs-253cb530.js => logs-281e0071.js} | 4 +-
.../{play-0c8e26e5.js => play-85de9511.js} | 2 +-
.../ui/yacd/assets/useMutation-4610ee00.js | 1 +
...=> useRemainingViewPortHeight-b3800ff0.js} | 2 +-
.../assets/{zh-972d6106.js => zh-019c0297.js} | 2 +-
.../usr/share/openclash/ui/yacd/index.html | 4 +-
.../root/usr/share/openclash/ui/yacd/sw.js | 2 +-
.../root/usr/share/openclash/yml_change.sh | 33 +
.../usr/share/openclash/yml_groups_get.sh | 1 +
.../usr/share/openclash/yml_groups_name_ch.sh | 19 +-
.../usr/share/openclash/yml_groups_set.sh | 25 +-
.../usr/share/openclash/yml_proxys_get.sh | 5 +-
.../usr/share/openclash/yml_proxys_set.sh | 10 +-
145 files changed, 1679 insertions(+), 1413 deletions(-)
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/CNAME
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Config-8226e777.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Config-FN-Wqjyv.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/ConfigTitle-_jKUZ02Y.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/ConfigTitle-dd5fc83b.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Connections-02d8e92b.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Connections-G3NKrw3N.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Logs-2575e4f0.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Logs-2lK8RJqA.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Overview-51176cc0.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Overview-5_c_esIi.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Proxies-99da7d66.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Proxies-Tt9GNuSW.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Rules-3b098996.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Rules-hglfpXzR.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Setup-a0db2f96.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Setup-mkV79sjj.js
rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{Twemoji.Mozilla-6d90152e.ttf => Twemoji.Mozilla-UkCiemhT.ttf} (100%)
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-17346ce4.woff2
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-2fc74b92.woff
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-4ryKXlYU.woff
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-PYrWRMJ5.woff2
rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{fira-sans-cyrillic-ext-400-normal-61d002d2.woff2 => fira-sans-cyrillic-ext-400-normal-1RYie3E0.woff2} (100%)
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-cyrillic-ext-400-normal-ed6525e5.woff
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-cyrillic-ext-400-normal-rf3f-Kaw.woff
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-greek-400-normal-5f8c46dc.woff
rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{fira-sans-greek-400-normal-86edeee5.woff2 => fira-sans-greek-400-normal-Mc4iyeKH.woff2} (100%)
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-greek-400-normal-eCSWGL47.woff
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-greek-ext-400-normal-278932e4.woff
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-greek-ext-400-normal-QOf54KGx.woff
rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/{fira-sans-greek-ext-400-normal-e48378b0.woff2 => fira-sans-greek-ext-400-normal-wxqRhc-I.woff2} (100%)
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-400-normal-6cb3f720.woff
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-400-normal-6lFYBE6Z.woff2
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-400-normal-ea03bd5d.woff2
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-400-normal-ka9-J3LG.woff
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-9ba2512f.woff
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-a47436ee.woff2
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-bFWruaeo.woff2
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-moeor6ib.woff
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-vietnamese-400-normal--U_MOZBq.woff2
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-vietnamese-400-normal-2424aed1.woff
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-vietnamese-400-normal-69e40dcc.woff2
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/fira-sans-vietnamese-400-normal-ois6Ns-t.woff
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/global-9f47a568.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/global-MCJ9PAgv.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-5ivcdObt.css
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-788b021a.css
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-83f95c10.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-IZ7lrjtp.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-bd53d7c8.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/index-k-FO5KmN.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/vendor-5507c805.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/vendor-TCjgV7Sn.js
rename luci-app-openclash/root/usr/share/openclash/ui/metacubexd/{workbox-56a10583.js => workbox-3e911b1d.js} (100%)
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/.nojekyll
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Config-35023b66.css
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Config-4a6335ea.js
create 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-cf41b8ef.css
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-0bb3d584.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-a9e050f3.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-ddae4f70.css
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Connections-fb8ea59b.css
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{Fab-82e79c68.js => Fab-6279b0bb.js} (96%)
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Fab-a0a7e573.css
create 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-505b5fdb.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Input-6985be35.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-4b8e75d1.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-5e5ee0ad.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-a4be0f66.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Logs-f594acee.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Modal-86bce5c3.css
create 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-40f80166.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Proxies-420aa72b.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Proxies-96538b21.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Proxies-bee4beaa.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Rules-04c64a3e.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Rules-2c6b2a7c.js
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{Select-81600379.js => Select-dda18c57.js} (76%)
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/StyleGuide-255b125c.css
create 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-9fe1cd81.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/TextFilter-b21c0577.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/TextFilter-ced87fc6.css
create 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/Toggle-4f572f6c.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/Toggle-cc905705.js
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/ZapAnimated-6c3cdb8c.css
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/ZapAnimated-d32c4141.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/chart-lib-236f0953.js
create 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/chevron-down-0a0d4fcd.js
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{en-0b55644c.js => en-89e30f54.js} (92%)
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-08f400cf.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-58e8cd5b.css
create 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-aa3f8ed9.js
delete mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-d22d76cf.js
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{index-b418964b.js => index-d26de9ee.js} (98%)
create mode 100644 luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/index-d5e38ae4.css
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{index.esm-9774ed4d.js => index.esm-eb217302.js} (94%)
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{logs-253cb530.js => logs-281e0071.js} (73%)
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{play-0c8e26e5.js => play-85de9511.js} (97%)
create 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-8f8ae068.js => useRemainingViewPortHeight-b3800ff0.js} (81%)
rename luci-app-openclash/root/usr/share/openclash/ui/yacd/assets/{zh-972d6106.js => zh-019c0297.js} (89%)
diff --git a/luci-app-openclash/Makefile b/luci-app-openclash/Makefile
index 9489e90..a7ab533 100644
--- a/luci-app-openclash/Makefile
+++ b/luci-app-openclash/Makefile
@@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclash
-PKG_VERSION:=0.45.157
-PKG_RELEASE:=246
+PKG_VERSION:=0.46.001
+PKG_RELEASE:=247
PKG_MAINTAINER:=vernesong
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/luci-app-openclash/luasrc/controller/openclash.lua b/luci-app-openclash/luasrc/controller/openclash.lua
index d6ef609..6e42d9a 100644
--- a/luci-app-openclash/luasrc/controller/openclash.lua
+++ b/luci-app-openclash/luasrc/controller/openclash.lua
@@ -74,6 +74,8 @@ function index()
entry({"admin", "services", "openclash", "manual_stream_unlock_test"}, call("manual_stream_unlock_test"))
entry({"admin", "services", "openclash", "all_proxies_stream_test"}, call("all_proxies_stream_test"))
entry({"admin", "services", "openclash", "set_subinfo_url"}, call("set_subinfo_url"))
+ entry({"admin", "services", "openclash", "check_core"}, call("action_check_core"))
+ entry({"admin", "services", "openclash", "core_download"}, call("core_download"))
entry({"admin", "services", "openclash", "settings"},cbi("openclash/settings"),_("Plugin Settings"), 30).leaf = true
entry({"admin", "services", "openclash", "config-overwrite"},cbi("openclash/config-overwrite"),_("Overwrite Settings"), 40).leaf = true
entry({"admin", "services", "openclash", "servers"},cbi("openclash/servers"),_("Onekey Create"), 50).leaf = true
@@ -229,6 +231,14 @@ local function coremodel()
end
end
+local function check_core()
+ if not nixio.fs.access(dev_core_path) and not nixio.fs.access(tun_core_path) and not nixio.fs.access(meta_core_path) then
+ return "0"
+ else
+ return "1"
+ end
+end
+
local function corecv()
if not nixio.fs.access(dev_core_path) then
return "0"
@@ -334,6 +344,24 @@ local function historychecktime()
end
end
+function core_download()
+ if uci:get("openclash", "config", "github_address_mod") == "0" or not uci:get("openclash", "config", "github_address_mod") then
+ uci:set("openclash", "config", "github_address_mod", "https://testingcf.jsdelivr.net/")
+ uci:commit("openclash")
+ luci.sys.call("rm -rf /tmp/clash_last_version 2>/dev/null && bash /usr/share/openclash/clash_version.sh >/dev/null 2>&1")
+ luci.sys.call("bash /usr/share/openclash/openclash_core.sh 'Dev' >/dev/null 2>&1 &")
+ luci.sys.call("bash /usr/share/openclash/openclash_core.sh 'TUN' >/dev/null 2>&1 &")
+ luci.sys.call("bash /usr/share/openclash/openclash_core.sh 'Meta' >/dev/null 2>&1 &")
+ uci:set("openclash", "config", "github_address_mod", "0")
+ uci:commit("openclash")
+ else
+ luci.sys.call("rm -rf /tmp/clash_last_version 2>/dev/null && bash /usr/share/openclash/clash_version.sh >/dev/null 2>&1")
+ luci.sys.call("bash /usr/share/openclash/openclash_core.sh 'Dev' >/dev/null 2>&1 &")
+ luci.sys.call("bash /usr/share/openclash/openclash_core.sh 'TUN' >/dev/null 2>&1 &")
+ luci.sys.call("bash /usr/share/openclash/openclash_core.sh 'Meta' >/dev/null 2>&1 &")
+ end
+end
+
function download_rule()
local filename = luci.http.formvalue("filename")
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',filename))
@@ -375,7 +403,6 @@ function action_restore_config()
luci.sys.call("cp /usr/share/openclash/backup/openclash_sniffing* /etc/openclash/custom/ >/dev/null 2>&1 &")
luci.sys.call("cp /usr/share/openclash/backup/yml_change.sh /usr/share/openclash/yml_change.sh >/dev/null 2>&1 &")
luci.sys.call("rm -rf /etc/openclash/history/* >/dev/null 2>&1 &")
- luci.http.redirect(luci.dispatcher.build_url('admin/services/openclash/settings'))
end
function action_remove_all_core()
@@ -875,7 +902,7 @@ function action_toolbar_show()
if not daip or not cn_port then return end
traffic = json.parse(luci.sys.exec(string.format('curl -sL -m 3 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -XGET http://"%s":"%s"/traffic', dase, daip, cn_port)))
connections = json.parse(luci.sys.exec(string.format('curl -sL -m 3 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -XGET http://"%s":"%s"/connections', dase, daip, cn_port)))
- if traffic and connections then
+ if traffic and connections and connections.connections then
connection = #(connections.connections)
up = s(traffic.up)
down = s(traffic.down)
@@ -1114,6 +1141,13 @@ function action_opupdate()
})
end
+function action_check_core()
+ luci.http.prepare_content("application/json")
+ luci.http.write_json({
+ core_status = check_core();
+ })
+end
+
function action_coreupdate()
luci.http.prepare_content("application/json")
luci.http.write_json({
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 93fb686..47d5011 100644
--- a/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua
+++ b/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua
@@ -135,6 +135,27 @@ 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
+---- Fallback DNS Proxy Group
+o = s:taboption("dns", Value, "proxy_dns_group", font_red..bold_on..translate("Fallback DNS Proxy Group (Support Regex)")..bold_off..font_off)
+o.description = translate("Group Use For Proxy The Fallback DNS, Preventing DNS Lookup Failures")..translate("(Only Meta Core)")
+local groupnames,filename
+filename = m.uci:get("openclash", "config", "config_path")
+if filename then
+ groupnames = SYS.exec(string.format('ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "YAML.load_file(\'%s\')[\'proxy-groups\'].each do |i| puts i[\'name\']+\'##\' end" 2>/dev/null',filename))
+ if groupnames then
+ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
+ if groupname ~= nil and groupname ~= "" then
+ o:value(groupname)
+ end
+ end
+ end
+end
+
+o:value("DIRECT")
+o:value("Disable", translate("Disable"))
+o.default = "Disable"
+o.rempty = false
+
o = s:taboption("dns", Flag, "append_wan_dns", translate("Append Upstream DNS"))
o.description = translate("Append The Upstream Assigned DNS And Gateway IP To The Nameserver")
o.default = 1
diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua b/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua
index 2fb0ed3..3acbbe3 100644
--- a/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua
+++ b/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua
@@ -106,6 +106,7 @@ o:value("https://v.id9.cc/sub", translate("v.id9.cc")..translate("(Support Vless
o:value("https://sub.id9.cc/sub", translate("sub.id9.cc"))
o:value("https://api.wcc.best/sub", translate("api.wcc.best"))
o.default = "https://api.dler.io/sub"
+o.placeholder = "https://api.dler.io/sub"
---- Template
o = s:option(ListValue, "template", translate("Template Name"))
diff --git a/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua b/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua
index 2a29672..4e7eb24 100644
--- a/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua
+++ b/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua
@@ -24,9 +24,9 @@ m.description = translate("Note: To restore the default configuration, try acces
"
"..translate("Note: It is not recommended to enable IPv6 and related services for routing. Most of the network connection problems reported so far are related to it")..
"
"..font_green..translate("Note: Turning on secure DNS in the browser will cause abnormal shunting, please be careful to turn it off")..font_off..
"
"..font_green..translate("Note: Some software will modify the device HOSTS, which will cause abnormal shunt, please pay attention to check")..font_off..
-"
"..font_green..translate("Note: Game proxy please use nodes except Vmess")..font_off..
-"
"..font_green..translate("Note: If you need to perform client access control in Fake-ip mode, please change the DNS hijacking mode to firewall forwarding")..font_off..
-"
"..translate("Note: The default proxy routes local traffic, BT, PT download, etc., please use redir mode as much as possible and pay attention to traffic avoidance")..
+"
"..font_green..translate("Note: Game proxy please use nodes except VMess")..font_off..
+"
"..font_green..translate("Note: If you need to perform client access control in Fake-IP mode, please change the DNS hijacking mode to firewall forwarding")..font_off..
+"
"..translate("Note: The default proxy routes local traffic, BT, PT download, etc., please use Redir-Host mode as much as possible and pay attention to traffic avoidance")..
"
"..translate("Note: If the connection is abnormal, please follow the steps on this page to check first")..": "..""..translate("Click to the page")..""
s = m:section(TypedSection, "openclash")
@@ -79,7 +79,8 @@ o:depends("en_mode", "fake-ip-tun")
o:depends("en_mode", "redir-host-mix")
o:depends("en_mode", "fake-ip-mix")
o:value("system", translate("System "))
-o:value("gvisor", translate("Gvisor"))
+o:value("gvisor", translate("gVisor"))
+o:value("mixed", translate("Mixed")..translate("(Only Meta Core)"))
o.default = "system"
o = s:taboption("op_mode", ListValue, "proxy_mode", translate("Proxy Mode"))
@@ -163,6 +164,7 @@ end
---- Access Control
o = s:taboption("lan_ac", ListValue, "lan_ac_mode", translate("LAN Access Control Mode"))
+o.description = font_red..bold_on..translate("To Use in Fake-IP Mode, Please Switch The Dns Redirect Mode To Firewall Forwarding")..bold_off..font_off
o:value("0", translate("Black List Mode"))
o:value("1", translate("White List Mode"))
o.default = "0"
@@ -932,7 +934,6 @@ o.rmempty = true
o.description = translate("Custom GeoIP Dat URL, Click Button Below To Refresh After Edit")
o:value("https://testingcf.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat", translate("Loyalsoldier-testingcf-jsdelivr-Version")..translate("(Default)"))
o:value("https://fastly.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat", translate("Loyalsoldier-fastly-jsdelivr-Version"))
-o:value("https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/v/v2/v2raya/dists/v2ray-rules-dat/geoip.dat", translate("OSDN-Version")..translate("(Default)"))
o.default = "https://testingcf.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat"
o:depends("geoip_auto_update", "1")
@@ -976,7 +977,6 @@ o.rmempty = true
o.description = translate("Custom GeoSite Data URL, Click Button Below To Refresh After Edit")
o:value("https://testingcf.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat", translate("Loyalsoldier-testingcf-jsdelivr-Version")..translate("(Default)"))
o:value("https://fastly.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat", translate("Loyalsoldier-fastly-jsdelivr-Version"))
-o:value("https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/v/v2/v2raya/dists/v2ray-rules-dat/geosite.dat", translate("OSDN-Version")..translate("(Default)"))
o.default = "https://testingcf.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat"
o:depends("geosite_auto_update", "1")
@@ -1133,7 +1133,8 @@ o.description = translate("Select Stack Type For TUN Mode, According To The Runn
o:depends({ipv6_mode= "2", en_mode = "redir-host"})
o:depends({ipv6_mode= "2", en_mode = "fake-ip"})
o:value("system", translate("System "))
-o:value("gvisor", translate("Gvisor"))
+o:value("gvisor", translate("gVisor"))
+o:value("mixed", translate("Mixed")..translate("(Only Meta Core)"))
o.default = "system"
o = s:taboption("ipv6", Flag, "enable_v6_udp_proxy", translate("Proxy UDP Traffics"))
diff --git a/luci-app-openclash/luasrc/view/openclash/status.htm b/luci-app-openclash/luasrc/view/openclash/status.htm
index 7ac882c..8f732d4 100644
--- a/luci-app-openclash/luasrc/view/openclash/status.htm
+++ b/luci-app-openclash/luasrc/view/openclash/status.htm
@@ -39,17 +39,17 @@
<%
if uci:get("openclash", "config", "enable_meta_core") ~= '1' then
%>
-
+
<%
else
%>
-
+
<%
end
%>
@@ -441,7 +441,7 @@
}
if(rdmdl==16)
{
- startlog.innerHTML = '<%:Note: The default proxy routes local traffic, BT, PT download, etc., please use redir mode as much as possible and pay attention to traffic avoidance%>';
+ startlog.innerHTML = '<%:Note: The default proxy routes local traffic, BT, PT download, etc., please use Redir-Host mode as much as possible and pay attention to traffic avoidance%>';
}
}
}
@@ -451,6 +451,7 @@
get_run_mode();
state_get();
clashversion_check();
+ check_core();
function get_rule_mode() {
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "rule_mode")%>', null, function(x, status) {
@@ -645,15 +646,40 @@
function ws_tmessage(event) {
var data = JSON.parse(event.data)
- document.getElementById("upload_").innerHTML = ""+bytesToSize(data.up)+"/S";
- document.getElementById("download_").innerHTML = ""+bytesToSize(data.down)+"/S";
+ if (data.up) {
+ document.getElementById("upload_").innerHTML = ""+bytesToSize(data.up)+"/S";
+ }
+ else {
+ document.getElementById("upload_").innerHTML = "0 B/S";
+ }
+ if (data.down) {
+ document.getElementById("download_").innerHTML = ""+bytesToSize(data.down)+"/S";
+ }
+ else {
+ document.getElementById("download_").innerHTML = "0 B/S";
+ }
};
function ws_cmessage(event) {
var data = JSON.parse(event.data)
- document.getElementById("uploadtotal_").innerHTML = ""+bytesToSize(data.uploadTotal)+"";
- document.getElementById("downloadtotal_").innerHTML = ""+bytesToSize(data.downloadTotal)+"";
- document.getElementById("connect_t").innerHTML = ""+Object.keys(data.connections).length+"";
+ if (data.uploadTotal) {
+ document.getElementById("uploadtotal_").innerHTML = ""+bytesToSize(data.uploadTotal)+"";
+ }
+ else {
+ document.getElementById("uploadtotal_").innerHTML = "0 KB";
+ }
+ if (data.downloadTotal) {
+ document.getElementById("downloadtotal_").innerHTML = ""+bytesToSize(data.downloadTotal)+"";
+ }
+ else {
+ document.getElementById("downloadtotal_").innerHTML = "0 KB";
+ }
+ if (data.connections) {
+ document.getElementById("connect_t").innerHTML = ""+Object.keys(data.connections).length+"";
+ }
+ else {
+ document.getElementById("connect_t").innerHTML = "0";
+ }
show_sys();
};
@@ -668,28 +694,26 @@
{
btn.value = '<%:Check All Components Update%>';
btn.disabled = true;
- var r = confirm("<%:Check and update all Cores and plug-ins?%>")
+ var r = confirm("<%:Check and Update all Cores and OpenClash?%>")
if (r == true) {
- XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "one_key_update_check")%>', null, function(x, status) {
- if ( x && x.status == 200 ) {
- if ( status.corever != "0" ) {
- XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "one_key_update")%>', null, function(x, status) {
- if ( x && x.status != 200 ) {
- alert('<%:Check failed, Please try again later!%>')
- }
- });
- }
- else {
- alert('<%:No compiled version is selected. Please configure it in the General Settings tab!%>')
- }
- }
- else {
- alert('<%:Check failed, Please try again later!%>')
- }
- });
+ XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "one_key_update_check")%>', null, function(x, status) {
+ if ( x && x.status == 200 ) {
+ if ( status.corever != "0" ) {
+ XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "one_key_update")%>', null, function(x, status) {
+ if ( x && x.status != 200 ) {
+ alert('<%:Check failed, Please try again later!%>')
+ }
+ });
+ }
+ else {
+ alert('<%:No compiled version is selected. Please configure it in the General Settings tab!%>')
+ }
}
else {
- }
+ alert('<%:Check failed, Please try again later!%>')
+ }
+ });
+ }
btn.disabled = false;
return false;
};
@@ -705,7 +729,7 @@
}
else {
btn.disabled = false;
- btn.value = '<%:Check Third Party Rules Update%>';
+ btn.value = '<%:Check Third Party Rules Update%>';
}
return false;
});
@@ -850,11 +874,11 @@
btn.disabled = true;
btn.value = '<%:Yacd Control Panel%>';
if (status.daip && window.location.hostname == status.daip) {
- url1='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/yacd/#/?hostname='+ window.location.hostname + '&port=' + status.cn_port + '&secret=' + status.dase +'"%>';
+ url1='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/yacd/?hostname='+ window.location.hostname + '&port=' + status.cn_port + '&secret=' + status.dase +'"%>';
}
else if (status.daip && window.location.hostname != status.daip && status.db_foward_domain && status.db_foward_port) {
var ui_proto = status.db_forward_ssl == 0 ? 'http://' : 'https://';
- url1='<%="'+ui_proto+status.db_foward_domain+':'+status.db_foward_port+'/ui/yacd/#/?hostname='+ status.db_foward_domain + '&port=' + status.db_foward_port + '&secret=' + status.dase +'"%>';
+ url1='<%="'+ui_proto+status.db_foward_domain+':'+status.db_foward_port+'/ui/yacd/?hostname='+ status.db_foward_domain + '&port=' + status.db_foward_port + '&secret=' + status.dase +'"%>';
}
else {
url1='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/yacd/"%>';
@@ -921,6 +945,7 @@
newimg.src = imgNewSrc;
newimg.onload = function() {
imgobj.src = imgNewSrc;
+ imgobj.loading = "lazy";
imgobj.onload = function() {};
};
newimg.onerror = function() {
@@ -943,7 +968,7 @@
function clashversion_error()
{
- clashversion.innerHTML = '';
+ clashversion.innerHTML = '';
};
function logo_error(imgobj,imgSrc)
@@ -953,7 +978,8 @@
function imgerrorfuns(imgobj,imgSrc){
setTimeout(function(){
- imgobj.src=imgSrc;
+ imgobj.src = imgSrc;
+ imgobj.loading = "lazy";
},1000*10);
};
@@ -962,5 +988,24 @@
url4='https://github.com/vernesong/OpenClash/releases';
winOpen(url4);
};
+
+ function check_core()
+ {
+ XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "check_core")%>', null, function(x, status) {
+ if ( x && x.status == 200 ) {
+ if ( status.core_status != "1" )
+ {
+ var r = confirm("<%:You have not installed the core yet, do you want to download and install it now?%>")
+ if (r == true) {
+ XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "core_download")%>', null, function(x, status) {
+ if ( x && x.status == 200 ) {
+ window.location.href='<%="'+window.location.protocol+'//'+window.location.hostname+'/cgi-bin/luci/admin/services/openclash/log"%>';
+ }
+ });
+ }
+ }
+ }
+ });
+ };
//]]>
diff --git a/luci-app-openclash/luasrc/view/openclash/update.htm b/luci-app-openclash/luasrc/view/openclash/update.htm
index 8421497..d532a12 100644
--- a/luci-app-openclash/luasrc/view/openclash/update.htm
+++ b/luci-app-openclash/luasrc/view/openclash/update.htm
@@ -513,7 +513,7 @@
if (x && x.status == 200) {
btn.value = '<%:One Click Check Update%>';
btn.disabled = true;
- var r = confirm("<%:Check and update all Cores and plug-ins?%>")
+ var r = confirm("<%:Check and Update all Cores and OpenClash?%>")
if (r == true) {
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "one_key_update_check")%>', null, function(x, status) {
if ( x && x.status == 200 ) {
diff --git a/luci-app-openclash/po/zh-cn/openclash.zh-cn.po b/luci-app-openclash/po/zh-cn/openclash.zh-cn.po
index b170369..d27fe7f 100644
--- a/luci-app-openclash/po/zh-cn/openclash.zh-cn.po
+++ b/luci-app-openclash/po/zh-cn/openclash.zh-cn.po
@@ -1260,9 +1260,12 @@ msgstr "GEOIP 数据库检查更新"
msgid "Check GeoSite Data Update"
msgstr "GeoSite 数据库检查更新"
-msgid "Check and update all Cores and plug-ins?"
+msgid "Check and Update all Cores and OpenClash?"
msgstr "确定要一键检查并更新所有内核及插件吗?"
+msgid "You have not installed the core yet, do you want to download and install it now?"
+msgstr "您还未安装内核,是否立即下载安装?"
+
msgid "Check failed, Please try again later!"
msgstr "一键检查更新失败,请稍后再试!"
@@ -2962,7 +2965,7 @@ msgid "Update GeoIP Dat"
msgstr "更新 GeoIP Dat 数据库"
msgid "Note: It is not recommended to enable IPv6 and related services for routing. Most of the network connection problems reported so far are related to it"
-msgstr "注意: 路由不建议开启 IPV6 和相关服务,目前反馈的网络连接问题多数与它有关"
+msgstr "注意: 路由不建议开启 IPv6 和相关服务,目前反馈的网络连接问题多数与它有关"
msgid "Note: Turning on secure DNS in the browser will cause abnormal shunting, please be careful to turn it off"
msgstr "注意: 浏览器开启安全 DNS,会导致分流异常,请注意关闭"
@@ -2970,17 +2973,17 @@ msgstr "注意: 浏览器开启安全 DNS,会导致分流异常,请注意关
msgid "Note: Some software will modify the device HOSTS, which will cause abnormal shunt, please pay attention to check"
msgstr "注意: 部分软件会修改设备 HOSTS,会导致分流异常,请注意检查"
-msgid "Note: The default proxy routes local traffic, BT, PT download, etc., please use redir mode as much as possible and pay attention to traffic avoidance"
-msgstr "注意: 默认代理路由本机流量,BT、PT 下载等请尽量使用 redir 模式并注意进行流量规避"
+msgid "Note: The default proxy routes local traffic, BT, PT download, etc., please use Redir-Host mode as much as possible and pay attention to traffic avoidance"
+msgstr "注意: 默认代理路由本机流量,BT、PT 下载等请尽量使用 Redir-Host 模式并注意进行流量规避"
-msgid "Note: Game proxy please use nodes except Vmess"
-msgstr "注意: 游戏代理请使用 Vmess 以外的节点"
+msgid "Note: Game proxy please use nodes except VMess"
+msgstr "注意: 游戏代理请使用 VMess 以外的节点"
msgid "Note: If the connection is abnormal, please follow the steps on this page to check first"
msgstr "注意: 连接异常时请按照此页步骤先进行检查"
-msgid "Note: If you need to perform client access control in Fake-ip mode, please change the DNS hijacking mode to firewall forwarding"
-msgstr "注意: Fake-ip 模式下如需要进行客户端访问控制,请将DNS劫持模式改为防火墙转发"
+msgid "Note: If you need to perform client access control in Fake-IP mode, please change the DNS hijacking mode to firewall forwarding"
+msgstr "注意: Fake-IP 模式下如需要进行客户端访问控制,请将DNS劫持模式改为防火墙转发"
msgid "Click to the page"
msgstr "点击前往"
@@ -3461,3 +3464,27 @@ msgstr "TCP Keep-alive 间隔(s)"
msgid "Used for Downloading Subscriptions, Defaults to Clash"
msgstr "用于下载订阅时指定 UA,默认为 Clash"
+
+msgid "Error: Set Proxies Address Skip Failed,"
+msgstr "错误:绕过代理服务器地址设置失败,"
+
+msgid "Flush Failed"
+msgstr "清理失败"
+
+msgid "Flush Successful"
+msgstr "清理成功"
+
+msgid "Flush Timeout"
+msgstr "清理超时"
+
+msgid "Fallback DNS Proxy Group (Support Regex)"
+msgstr "Fallback DNS 代理组 (支持正则匹配)"
+
+msgid "Group Use For Proxy The Fallback DNS, Preventing DNS Lookup Failures"
+msgstr "为所有 Fallback DNS 设置代理策略组,防止 DNS 查询失败"
+
+msgid "Error: Set Fallback DNS Proxy Group Failed,"
+msgstr "错误:Fallback DNS 代理策略组设置失败,"
+
+msgid "To Use in Fake-IP Mode, Please Switch The Dns Redirect Mode To Firewall Forwarding"
+msgstr "要在 Fake-IP 模式下使用,请将 Dns 重定向模式切换为防火墙转发模式"
\ No newline at end of file
diff --git a/luci-app-openclash/root/etc/config/openclash b/luci-app-openclash/root/etc/config/openclash
index 8210dc8..1dd0fd7 100644
--- a/luci-app-openclash/root/etc/config/openclash
+++ b/luci-app-openclash/root/etc/config/openclash
@@ -68,12 +68,30 @@ config openclash 'config'
option chnr6_custom_url 'https://ispip.clang.cn/all_cn_ipv6.txt'
option cndomain_custom_url 'https://testingcf.jsdelivr.net/gh/felixonmars/dnsmasq-china-list@master/accelerated-domains.china.conf'
+config dns_servers
+ option type 'udp'
+ option ip '114.114.114.114'
+ option enabled '1'
+ option group 'default'
+
+config dns_servers
+ option type 'udp'
+ option ip '119.29.29.29'
+ option enabled '1'
+ option group 'default'
+
config dns_servers
option group 'nameserver'
option type 'udp'
option ip '114.114.114.114'
option enabled '1'
+config dns_servers
+ option type 'udp'
+ option ip '223.5.5.5'
+ option enabled '1'
+ option group 'default'
+
config dns_servers
option group 'nameserver'
option type 'udp'
@@ -108,7 +126,7 @@ config dns_servers
option type 'https'
option group 'fallback'
option ip 'dns.cloudflare.com/dns-query'
- option enabled '1'
+ option enabled '0'
config dns_servers
option group 'fallback'
@@ -162,7 +180,7 @@ config dns_servers
option group 'fallback'
option type 'https'
option ip 'public.dns.iij.jp/dns-query'
- option enabled '1'
+ option enabled '0'
config dns_servers
option group 'fallback'
@@ -201,7 +219,7 @@ config dns_servers
option type 'https'
config dns_servers
- option enabled '1'
+ option enabled '0'
option group 'fallback'
option ip 'dns.oszx.co/dns-query'
option type 'https'
diff --git a/luci-app-openclash/root/etc/init.d/openclash b/luci-app-openclash/root/etc/init.d/openclash
index a86f778..82d2a3b 100644
--- a/luci-app-openclash/root/etc/init.d/openclash
+++ b/luci-app-openclash/root/etc/init.d/openclash
@@ -2898,7 +2898,7 @@ if [ -z "$FW4" ]; then
if [ "$bypass_gateway_compatible" -eq 1 ]; then
ip6tables -t nat -N openclash_post
ip6tables -t nat -F openclash_post
- ip6tables -t nat -A openclash_post -m set --match-set localnetwork src -m set --match-set lan_ac_black_ports src -j RETURN >/dev/null 2>&1
+ ip6tables -t nat -A openclash_post -m set --match-set localnetwork6 src -m set --match-set lan_ac_black_ports src -j RETURN >/dev/null 2>&1
ip6tables -t nat -A openclash_post -m mark --mark "$PROXY_FWMARK" -j ACCEPT
ip6tables -t nat -A openclash_post -m set --match-set localnetwork6 dst -j RETURN
ip6tables -t nat -A openclash_post -m addrtype ! --src-type LOCAL -m owner ! --uid-owner 65534 -j MASQUERADE
@@ -3100,6 +3100,7 @@ get_config()
global_client_fingerprint=$(uci -q get openclash.config.global_client_fingerprint || echo "0")
enable_unified_delay=$(uci -q get openclash.config.enable_unified_delay || echo "0")
keep_alive_interval=$(uci -q get openclash.config.keep_alive_interval || echo "0")
+ proxy_dns_group=$(uci -q get openclash.config.proxy_dns_group || echo "Disable")
[ -z "$dns_port" ] && dns_port=7874 && uci -q set openclash.config.dns_port=7874
uci -q set openclash.config.restricted_mode=0 && uci -q commit openclash
}
@@ -3127,7 +3128,7 @@ start()
if ! $quick_start; then
LOG_OUT "Step 3: Modify The Config File..."
config_check
- /usr/share/openclash/yml_change.sh 2>/dev/null "$en_mode" "$da_password" "$cn_port" "$proxy_port" "$TMP_CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$log_level" "$proxy_mode" "$en_mode_tun" "$stack_type" "$dns_port" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$enable_meta_core" "$enable_meta_sniffer" "$enable_geoip_dat" "$geodata_loader" "$enable_meta_sniffer_custom" "$interface_name" "$enable_tcp_concurrent" "$core_type" "$append_default_dns" "$enable_meta_sniffer_pure_ip" "$find_process_mode" "$fakeip_range" "$global_client_fingerprint" "$ipv6_mode" "$stack_type_v6" "$enable_unified_delay" "$keep_alive_interval"
+ /usr/share/openclash/yml_change.sh 2>/dev/null "$en_mode" "$da_password" "$cn_port" "$proxy_port" "$TMP_CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$log_level" "$proxy_mode" "$en_mode_tun" "$stack_type" "$dns_port" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$enable_meta_core" "$enable_meta_sniffer" "$enable_geoip_dat" "$geodata_loader" "$enable_meta_sniffer_custom" "$interface_name" "$enable_tcp_concurrent" "$core_type" "$append_default_dns" "$enable_meta_sniffer_pure_ip" "$find_process_mode" "$fakeip_range" "$global_client_fingerprint" "$ipv6_mode" "$stack_type_v6" "$enable_unified_delay" "$keep_alive_interval" "$proxy_dns_group"
/usr/share/openclash/yml_rules_change.sh 2>/dev/null "$rule_source" "$enable_custom_clash_rules" "$TMP_CONFIG_FILE" "$enable_rule_proxy" "$CONFIG_NAME" "$router_self_proxy" "$lan_ip" "$proxy_port" "$tproxy_port" "$enable_meta_core" "$enable_redirect_dns" "$fakeip_range" "$en_mode"
/usr/share/openclash/openclash_custom_domain_dns.sh >/dev/null 2>&1
#Custom overwrite
@@ -3281,6 +3282,22 @@ reload()
SLOG_CLEAN
del_lock
fi
+ if pidof clash >/dev/null && [ "$enable" == "1" ] && [ "$1" == "revert" ]; then
+ set_lock
+ revert_firewall 2>/dev/null
+ /etc/init.d/dnsmasq restart >/dev/null 2>&1
+ SLOG_CLEAN
+ del_lock
+ fi
+ if pidof clash >/dev/null && [ "$enable" == "1" ] && [ "$1" == "restore" ]; then
+ set_lock
+ do_run_mode 2>/dev/null
+ get_config 2>/dev/null
+ set_firewall 2>/dev/null
+ /etc/init.d/dnsmasq restart >/dev/null 2>&1
+ SLOG_CLEAN
+ del_lock
+ fi
}
boot()
diff --git a/luci-app-openclash/root/etc/openclash/custom/openclash_custom_fake_filter.list b/luci-app-openclash/root/etc/openclash/custom/openclash_custom_fake_filter.list
index 025af88..eec6abe 100644
--- a/luci-app-openclash/root/etc/openclash/custom/openclash_custom_fake_filter.list
+++ b/luci-app-openclash/root/etc/openclash/custom/openclash_custom_fake_filter.list
@@ -74,6 +74,7 @@ localhost.sec.qq.com
#Nintendo Switch
+.srv.nintendo.net
*.n.n.srv.nintendo.net
++.cdn.nintendo.net
#Sony PlayStation
+.stun.playstation.net
#Microsoft Xbox
@@ -137,3 +138,6 @@ local.adguard.org
#迅雷
+.sandai.net
+.n0808.com
+#UU Plugin
++.uu.163.com
+ps.res.netease.com
\ No newline at end of file
diff --git a/luci-app-openclash/root/usr/share/openclash/clash_version.sh b/luci-app-openclash/root/usr/share/openclash/clash_version.sh
index b1f62ea..bb74e85 100644
--- a/luci-app-openclash/root/usr/share/openclash/clash_version.sh
+++ b/luci-app-openclash/root/usr/share/openclash/clash_version.sh
@@ -21,14 +21,14 @@ set_lock
if [ "$TIME" != "$CHTIME" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL -m 60 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL -m 60 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL -m 60 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL -m 60 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL -m 60 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL -m 60 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL -m 60 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL -m 60 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash.sh b/luci-app-openclash/root/usr/share/openclash/openclash.sh
index 716c4fd..7cb2f8c 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash.sh
@@ -20,27 +20,10 @@ CFG_FILE="/tmp/yaml_sub_tmp_config.yaml"
CRON_FILE="/etc/crontabs/root"
CONFIG_PATH=$(uci -q get openclash.config.config_path)
servers_update=$(uci -q get openclash.config.servers_update)
-dns_port=$(uci -q get openclash.config.dns_port)
-enable_redirect_dns=$(uci -q get openclash.config.enable_redirect_dns)
-disable_masq_cache=$(uci -q get openclash.config.disable_masq_cache)
-default_resolvfile=$(uci -q get openclash.config.default_resolvfile)
-en_mode=$(uci -q get openclash.config.en_mode)
-china_ip_route=$(uci -q get openclash.config.china_ip_route)
-disable_udp_quic=$(uci -q get openclash.config.disable_udp_quic)
-ipv6_enable=$(uci -q get openclash.config.ipv6_enable)
router_self_proxy=$(uci -q get openclash.config.router_self_proxy || echo 1)
-DNSPORT=$(uci -q get dhcp.@dnsmasq[0].port)
-DNSMASQ_CONF_DIR=$(uci -q get dhcp.@dnsmasq[0].confdir || echo '/tmp/dnsmasq.d')
-DNSMASQ_CONF_DIR=${DNSMASQ_CONF_DIR%*/}
-custom_china_domain_dns_server=$(uci -q get openclash.config.custom_china_domain_dns_server || echo "114.114.114.114")
FW4=$(command -v fw4)
CLASH="/etc/openclash/clash"
-CLASH_CONFIG="/tmp"
-
-
-if [ -z "$DNSPORT" ]; then
- DNSPORT=$(netstat -nlp |grep -E '127.0.0.1:.*dnsmasq' |awk -F '127.0.0.1:' '{print $2}' |awk '{print $1}' |head -1 || echo 53)
-fi
+CLASH_CONFIG="/etc/openclash"
restart=0
only_download=0
set_lock
@@ -89,12 +72,12 @@ config_download()
{
if [ -n "$subscribe_url_param" ]; then
if [ -n "$c_address" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" "$c_address""$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" "$c_address""$subscribe_url_param" -o "$CFG_FILE" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" https://api.dler.io/sub"$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" https://api.dler.io/sub"$subscribe_url_param" -o "$CFG_FILE" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" "$subscribe_url" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" "$subscribe_url" -o "$CFG_FILE" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
}
@@ -247,117 +230,7 @@ config_error()
change_dns()
{
if pidof clash >/dev/null; then
- if [ "$enable_redirect_dns" = "1" ]; then
- uci -q del dhcp.@dnsmasq[-1].server
- uci -q add_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port"
- uci -q delete dhcp.@dnsmasq[0].resolvfile
- uci -q set dhcp.@dnsmasq[0].noresolv=1
- [ "$disable_masq_cache" -eq 1 ] && {
- uci -q set dhcp.@dnsmasq[0].cachesize=0
- }
- uci commit dhcp
- fi
-
- if [ -z "$(echo "$en_mode" |grep "redir-host")" ] && [ "$china_ip_route" -eq 1 ] && [ "$enable_redirect_dns" != "2" ]; then
- cat "/etc/openclash/accelerated-domains.china.conf" |awk -v dns="${custom_china_domain_dns_server}" -F '/' '!/^$/&&!/^#/{print $1"/"$2"/"dns}' >${DNSMASQ_CONF_DIR}/dnsmasq_accelerated-domains.china.conf 2>/dev/null
- for i in `awk '!/^$/&&!/^#/&&!/(^([1-9]|1[0-9]|1[1-9]{2}|2[0-4][0-9]|25[0-5])\.)(([0-9]{1,2}|1[1-9]{2}|2[0-4][0-9]|25[0-5])\.){2}([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-5][0-9]|25[0-4])((\/[0-9][0-9])?)$/{printf("%s\n",$0)}' /etc/openclash/custom/openclash_custom_chnroute_pass.list`
- do
- sed -i "/server=\/${i}\//d" ${DNSMASQ_CONF_DIR}/dnsmasq_accelerated-domains.china.conf 2>/dev/null
- done 2>/dev/null
- fi
-
- /etc/init.d/dnsmasq restart >/dev/null 2>&1
-
- if [ -n "$FW4" ]; then
- for nft in "nat_output" "mangle_output"; do
- local handles=$(nft -a list chain inet fw4 ${nft} |grep -E "openclash|OpenClash" |grep -v "OpenClash DNS Hijack" |awk -F '# handle ' '{print$2}')
- for handle in $handles; do
- nft delete rule inet fw4 ${nft} handle ${handle}
- done
- done >/dev/null 2>&1
- echo "$nat_output_rules" |while read line
- do
- if [ -n "$(echo "$line" |grep "OpenClash DNS Hijack")" ]; then
- continue
- fi
- nft add rule inet fw4 nat_output ${line}
- done >/dev/null 2>&1
- echo "$mangle_output_rules" |while read line
- do
- if [ -n "$(echo "$line" |grep "OpenClash DNS Hijack")" ]; then
- continue
- fi
- nft add rule inet fw4 mangle_output ${line}
- done >/dev/null 2>&1
-
- if [ "$enable_redirect_dns" = "2" ]; then
- if [ "$router_self_proxy" = 1 ]; then
- nft add rule inet fw4 nat_output position 0 tcp dport 53 ip daddr {127.0.0.1} meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 udp dport 53 ip daddr {127.0.0.1} meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- fi
- if [ "$ipv6_enable" -eq 1 ]; then
- if [ "$router_self_proxy" = 1 ]; then
- nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} tcp dport 53 ip daddr {::/0} meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} udp dport 53 ip daddr {::/0} meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- fi
- fi
- fi
- if [ -z "$(echo "$en_mode" |grep "redir-host")" ] && [ "$china_ip_route" -eq 1 ] && [ "$enable_redirect_dns" != "2" ]; then
- LOG_OUT "Tip: Bypass the China IP May Cause the Dnsmasq Load For a Long Time After Restart in FAKE-IP Mode, Hijack the DNS to Core Untill the Dnsmasq Works Well..."
- nft insert rule inet fw4 dstnat position 0 tcp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft insert rule inet fw4 dstnat position 0 udp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft 'add chain inet fw4 nat_output { type nat hook output priority -1; }' 2>/dev/null
- nft add rule inet fw4 nat_output position 0 tcp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 udp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 tcp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 udp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
- if [ "$ipv6_enable" -eq 1 ]; then
- nft insert rule inet fw4 dstnat position 0 meta nfproto {ipv6} tcp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft insert rule inet fw4 dstnat position 0 meta nfproto {ipv6} udp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft 'add chain inet fw4 nat_output { type nat hook output priority -1; }' 2>/dev/null
- nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} tcp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} udp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} tcp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
- nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} udp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
- fi
- fi
- else
- iptables -t nat -D OUTPUT -j openclash_output >/dev/null 2>&1
- iptables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
- ip6tables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
- iptables -t nat -A OUTPUT -j openclash_output >/dev/null 2>&1
- iptables -t mangle -A OUTPUT -j openclash_output >/dev/null 2>&1
- ip6tables -t mangle -A OUTPUT -j openclash_output >/dev/null 2>&1
- if [ "$enable_redirect_dns" = "2" ]; then
- if [ "$router_self_proxy" = 1 ]; then
- iptables -t nat -I OUTPUT -p udp --dport 53 -d 127.0.0.1 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- iptables -t nat -I OUTPUT -p tcp --dport 53 -d 127.0.0.1 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- fi
- if [ "$ipv6_enable" -eq 1 ]; then
- if [ "$router_self_proxy" = 1 ]; then
- ip6tables -t nat -I OUTPUT -p udp --dport 53 -d ::/0 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- ip6tables -t nat -I OUTPUT -p tcp --dport 53 -d ::/0 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- fi
- fi
- fi
- if [ -z "$(echo "$en_mode" |grep "redir-host")" ] && [ "$china_ip_route" -eq 1 ] && [ "$enable_redirect_dns" != "2" ]; then
- LOG_OUT "Tip: Bypass the China IP May Cause the Dnsmasq Load For a Long Time After Restart in FAKE-IP Mode, Hijack the DNS to Core Untill the Dnsmasq Works Well..."
- iptables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- iptables -t nat -I PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- iptables -t nat -I OUTPUT -p udp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- iptables -t nat -I OUTPUT -p tcp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- iptables -t nat -I OUTPUT -p udp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- iptables -t nat -I OUTPUT -p tcp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- if [ "$ipv6_enable" -eq 1 ]; then
- ip6tables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- ip6tables -t nat -I PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- ip6tables -t nat -I OUTPUT -p udp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- ip6tables -t nat -I OUTPUT -p tcp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- ip6tables -t nat -I OUTPUT -p udp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- ip6tables -t nat -I OUTPUT -p tcp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
- fi
- fi
- fi
+ /etc/init.d/openclash reload "restore" >/dev/null 2>&1
[ "$(unify_ps_status "openclash_watchdog.sh")" -eq 0 ] && [ "$(unify_ps_prevent)" -eq 0 ] && nohup /usr/share/openclash/openclash_watchdog.sh &
fi
}
@@ -397,55 +270,7 @@ config_download_direct()
{
if pidof clash >/dev/null && [ "$router_self_proxy" = 1 ]; then
kill_watchdog
- if [ "$enable_redirect_dns" -eq 1 ]; then
- uci -q del_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port"
- if [ -n "$default_resolvfile" ]; then
- uci -q set dhcp.@dnsmasq[0].resolvfile="$default_resolvfile"
- elif [ -s "/tmp/resolv.conf.d/resolv.conf.auto" ] && [ -n "$(grep "nameserver" /tmp/resolv.conf.d/resolv.conf.auto)" ]; then
- uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto
- elif [ -s "/tmp/resolv.conf.auto" ] && [ -n "$(grep "nameserver" /tmp/resolv.conf.auto)" ]; then
- uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
- else
- rm -rf /tmp/resolv.conf.auto 2>/dev/null
- touch /tmp/resolv.conf.auto 2>/dev/null
- cat >> "/tmp/resolv.conf.auto" <<-EOF
-# Interface lan
-nameserver 114.114.114.114
-nameserver 119.29.29.29
-EOF
- uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
- fi
- uci -q set dhcp.@dnsmasq[0].noresolv=0
- uci -q delete dhcp.@dnsmasq[0].cachesize
- uci commit dhcp
- rm -rf ${DNSMASQ_CONF_DIR}/dnsmasq_accelerated-domains.china.conf >/dev/null 2>&1
- /etc/init.d/dnsmasq restart >/dev/null 2>&1
- fi
- if [ -n "$FW4" ]; then
- nat_output_rules=$(nft -a list chain inet fw4 nat_output |grep -E "openclash|OpenClash" |awk -F '# handle ' '{print$1}' |sed 's/^[ \t]*//g')
- mangle_output_rules=$(nft -a list chain inet fw4 mangle_output |grep -E "openclash|OpenClash" |awk -F '# handle ' '{print$1}' |sed 's/^[ \t]*//g')
- for nft in "nat_output" "mangle_output"; do
- local handles=$(nft -a list chain inet fw4 ${nft} |grep -E "openclash|OpenClash" |awk -F '# handle ' '{print$2}')
- for handle in $handles; do
- nft delete rule inet fw4 ${nft} handle ${handle}
- done
- done >/dev/null 2>&1
- else
- iptables -t nat -D OUTPUT -j openclash_output >/dev/null 2>&1
- iptables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
- ip6tables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
- for ipt in "iptables -nvL OUTPUT -t nat" "iptables -nvL OUTPUT -t mangle" "ip6tables -nvL OUTPUT -t mangle" "ip6tables -nvL OUTPUT -t nat"; do
- for comment in "OpenClash DNS Hijack"; do
- local lines=$($ipt |sed 1,2d |sed -n "/${comment}/=" 2>/dev/null |sort -rn)
- if [ -n "$lines" ]; then
- for line in $lines; do
- $(echo "$ipt" |awk -v OFS=" " '{print $1,$4,$5}' |sed 's/[ ]*$//g') -D $(echo "$ipt" |awk '{print $3}') $line
- done
- fi
- done
- done >/dev/null 2>&1
- fi
-
+ /etc/init.d/openclash reload "revert" >/dev/null 2>&1
sleep 3
config_download
@@ -629,8 +454,8 @@ sub_info_get()
fi
if [ -n "$template_path" ]; then
template_path_encode=$(urlencode "$template_path")
- [ -n "$key_match_param" ] && key_match_param="$(urlencode "$key_match_param")"
- [ -n "$key_ex_match_param" ] && key_ex_match_param="$(urlencode "$key_ex_match_param")"
+ [ -n "$key_match_param" ] && key_match_param="$(urlencode "(?i)$key_match_param")"
+ [ -n "$key_ex_match_param" ] && key_ex_match_param="$(urlencode "(?i)$key_ex_match_param")"
subscribe_url_param="?target=clash&new_name=true&url=$subscribe_url&config=$template_path_encode&include=$key_match_param&exclude=$key_ex_match_param&emoji=$emoji&list=false&sort=$sort$udp&scv=$skip_cert_verify&append_type=$node_type&fdn=true$rule_provider"
c_address="$convert_address"
else
@@ -650,6 +475,7 @@ sub_info_get()
config_test
if [ $? -ne 0 ]; then
LOG_OUT "Error: Config File Tested Faild, Please Check The Log Infos!"
+ LOG_OUT "Error: Config File【$name】Subscribed Failed, Trying to Download Without Agent..."
config_download_direct
return
fi
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_chnroute.sh b/luci-app-openclash/root/usr/share/openclash/openclash_chnroute.sh
index b784c52..ee81f54 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_chnroute.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_chnroute.sh
@@ -41,13 +41,13 @@
LOG_OUT "Start Downloading The Chnroute Cidr List..."
if [ -z "$CHNR_CUSTOM_URL" ]; then
if pidof clash >/dev/null; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn.txt -o /tmp/china_ip_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn.txt -o /tmp/china_ip_route.txt 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" != "0" ] || ! pidof clash >/dev/null; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn_cidr.txt -o /tmp/china_ip_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn_cidr.txt -o /tmp/china_ip_route.txt 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$CHNR_CUSTOM_URL" -o /tmp/china_ip_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$CHNR_CUSTOM_URL" -o /tmp/china_ip_route.txt 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -s "/tmp/china_ip_route.txt" ]; then
@@ -81,9 +81,9 @@
#ipv6
LOG_OUT "Start Downloading The Chnroute6 Cidr List..."
if [ -z "$CHNR6_CUSTOM_URL" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn_ipv6.txt -o /tmp/china_ip6_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip6_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn_ipv6.txt -o /tmp/china_ip6_route.txt 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip6_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$CHNR6_CUSTOM_URL" -o /tmp/china_ip6_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip6_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$CHNR6_CUSTOM_URL" -o /tmp/china_ip6_route.txt 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_ip6_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq "0" ] && [ -s "/tmp/china_ip6_route.txt" ]; then
LOG_OUT "Chnroute6 Cidr List Download Success, Check Updated..."
@@ -116,18 +116,18 @@
#CN DOMAIN
LOG_OUT "Start Downloading The CN Domains List..."
if [ -n "$CNDOMAIN_CUSTOM_URL" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$CNDOMAIN_CUSTOM_URL" -o "/tmp/china_domains.list" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$CNDOMAIN_CUSTOM_URL" -o "/tmp/china_domains.list" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/felixonmars/dnsmasq-china-list@master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/felixonmars/dnsmasq-china-list@master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf -o "/tmp/china_domains.list" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/china_domains.list" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
fi
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_core.sh b/luci-app-openclash/root/usr/share/openclash/openclash_core.sh
index 0bae43d..5f989a6 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_core.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_core.sh
@@ -62,14 +62,14 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
LOG_OUT "【TUN】Core Downloading, Please Try to Download and Upload Manually If Fails"
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
@@ -80,14 +80,14 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
LOG_OUT "【Meta】Core Downloading, Please Try to Download and Upload Manually If Fails"
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
@@ -98,14 +98,14 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
LOG_OUT "【Dev】Core Downloading, Please Try to Download and Upload Manually If Fails"
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_debug_dns.lua b/luci-app-openclash/root/usr/share/openclash/openclash_debug_dns.lua
index 27a2693..56c00e1 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_debug_dns.lua
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_debug_dns.lua
@@ -7,6 +7,7 @@ local uci = require("luci.model.uci").cursor()
local json = require "luci.jsonc"
local datatype = require "luci.cbi.datatypes"
local addr = arg[1]
+local resolve = arg[2]
local function debug_dns()
local info, ip, host
@@ -25,7 +26,7 @@ local function debug_dns()
if info then
info = json.parse(info)
end
- if info then
+ if info and not resolve then
print("Status: "..(info.Status))
print("TC: "..tostring(info.TC))
print("RD: "..tostring(info.RD))
@@ -71,6 +72,15 @@ local function debug_dns()
end
end
end
+ if info and resolve then
+ if info.Answer then
+ for _, v in pairs(info.Answer) do
+ if v.type == 1 then
+ print(v.data)
+ end
+ end
+ end
+ end
end
os.exit(0)
end
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_dler_checkin.lua b/luci-app-openclash/root/usr/share/openclash/openclash_dler_checkin.lua
index 8e89dbf..3c27d0d 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_dler_checkin.lua
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_dler_checkin.lua
@@ -18,19 +18,19 @@ local function dler_checkin()
path = "/tmp/dler_checkin"
if token and email and passwd and enable == "1" then
checkin = string.format("curl -sL -H 'Content-Type: application/json' -d '{\"email\":\"%s\", \"passwd\":\"%s\", \"multiple\":\"%s\"}' -X POST https://dler.cloud/api/v1/checkin -o %s", email, passwd, multiple, path)
- if not nixio.fs.access(path) then
+ if fs.readfile(path) == "" or not fs.readfile(path) then
luci.sys.exec(checkin)
else
- if fs.readfile(path) == "" or not fs.readfile(path) then
+ if (os.time() - fs.mtime(path) > interval*3600+1) then
+ fs.unlink(path)
luci.sys.exec(checkin)
else
- if (os.time() - fs.mtime(path) > interval*3600+1) then
- luci.sys.exec(checkin)
- else
- os.exit(0)
- end
+ os.exit(0)
end
end
+ if fs.readfile(path) == "" or not fs.readfile(path) then
+ fs.writefile(path, " ")
+ end
info = fs.readfile(path)
if info then
info = json.parse(info)
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_download_dashboard.sh b/luci-app-openclash/root/usr/share/openclash/openclash_download_dashboard.sh
index ec3e7cf..1ebd070 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_download_dashboard.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_download_dashboard.sh
@@ -35,7 +35,7 @@
FILE_PATH_INCLUDE="metacubexd-gh-pages"
fi
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$DOWNLOAD_PATH" -o "$DASH_FILE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$DASH_FILE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$DOWNLOAD_PATH" -o "$DASH_FILE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$DASH_FILE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -s "$DASH_FILE_DIR" ] && [ -z "$(grep "404: Not Found" "$DASH_FILE_DIR")" ] && [ -z "$(grep "Package size exceeded the configured limit" "$DASH_FILE_DIR")" ]; then
unzip -qt "$DASH_FILE_DIR" >/dev/null 2>&1
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_download_rule_list.sh b/luci-app-openclash/root/usr/share/openclash/openclash_download_rule_list.sh
index 02880db..48f4b3b 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_download_rule_list.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_download_rule_list.sh
@@ -63,32 +63,32 @@ urlencode() {
[ "$RULE_TYPE" != "netflix" ] && [ "$RULE_TYPE" != "disney" ] && DOWNLOAD_PATH=$(urlencode "$DOWNLOAD_PATH")
if [ "$RULE_TYPE" = "netflix" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$RULE_TYPE" = "disney" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$RULE_TYPE" = "game" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/FQrabbit/SSTap-Rule@master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/FQrabbit/SSTap-Rule@master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"FQrabbit/SSTap-Rule/master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"FQrabbit/SSTap-Rule/master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/FQrabbit/SSTap-Rule/master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/FQrabbit/SSTap-Rule/master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/FQrabbit/SSTap-Rule/master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/FQrabbit/SSTap-Rule/master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
elif [ "$RULE_TYPE" = "provider" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/"$(echo "$DOWNLOAD_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"@master"$(echo "$DOWNLOAD_PATH" |awk -F 'master' '{print $2}')" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/"$(echo "$DOWNLOAD_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"@master"$(echo "$DOWNLOAD_PATH" |awk -F 'master' '{print $2}')" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod""$(echo "$DOWNLOAD_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"/master"$(echo "$DOWNLOAD_PATH" |awk -F 'master' '{print $2}')" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod""$(echo "$DOWNLOAD_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"/master"$(echo "$DOWNLOAD_PATH" |awk -F 'master' '{print $2}')" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$TMP_RULE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
fi
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_geoip.sh b/luci-app-openclash/root/usr/share/openclash/openclash_geoip.sh
index 6cd11f0..ebd8485 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_geoip.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_geoip.sh
@@ -30,17 +30,17 @@
if [ -z "$GEOIP_CUSTOM_URL" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "${github_address_mod}gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat" -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "${github_address_mod}gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat" -o /tmp/GeoIP.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "https://raw.fastgit.org/Loyalsoldier/v2ray-rules-dat/release/geoip.dat" -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "https://raw.fastgit.org/Loyalsoldier/v2ray-rules-dat/release/geoip.dat" -o /tmp/GeoIP.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat -o /tmp/GeoIP.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" -o /tmp/GeoIP.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOIP_CUSTOM_URL" -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOIP_CUSTOM_URL" -o /tmp/GeoIP.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq "0" ] && [ -s "/tmp/GeoIP.dat" ]; then
LOG_OUT "GeoIP Dat Download Success, Check Updated..."
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_geosite.sh b/luci-app-openclash/root/usr/share/openclash/openclash_geosite.sh
index f220fc3..030bf9e 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_geosite.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_geosite.sh
@@ -30,17 +30,17 @@
if [ -z "$GEOSITE_CUSTOM_URL" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat -o /tmp/GeoSite.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/Loyalsoldier/v2ray-rules-dat/release/geosite.dat -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/Loyalsoldier/v2ray-rules-dat/release/geosite.dat -o /tmp/GeoSite.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -o /tmp/GeoSite.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -o /tmp/GeoSite.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOSITE_CUSTOM_URL" -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOSITE_CUSTOM_URL" -o /tmp/GeoSite.dat 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq "0" ] && [ -s "/tmp/GeoSite.dat" ]; then
LOG_OUT "GeoSite Database Download Success, Check Updated..."
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_ipdb.sh b/luci-app-openclash/root/usr/share/openclash/openclash_ipdb.sh
index 154f721..4327963 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_ipdb.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_ipdb.sh
@@ -30,17 +30,17 @@
if [ -z "$GEOIP_CUSTOM_URL" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/alecthw/mmdb_china_ip_list@release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/alecthw/mmdb_china_ip_list@release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/alecthw/mmdb_china_ip_list/release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/alecthw/mmdb_china_ip_list/release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/lite/Country.mmdb -o /tmp/Country.mmdb 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOIP_CUSTOM_URL" -o /tmp/Country.mmdb 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOIP_CUSTOM_URL" -o /tmp/Country.mmdb 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/Country.mmdb" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -s "/tmp/Country.mmdb" ]; then
LOG_OUT "Geoip Database Download Success, Check Updated..."
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh b/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh
index c40ce28..c649a7c 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh
@@ -36,41 +36,41 @@
if [ "$rule_name" = "lhie1" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/dler-io/Rules@master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/dler-io/Rules@master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/dler-io/Rules/master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/dler-io/Rules/master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/dler-io/Rules/master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/dler-io/Rules/master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/dler-io/Rules/master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/dler-io/Rules/master/Clash/Rule.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
sed -i '1i rules:' /tmp/rules.yaml
elif [ "$rule_name" = "ConnersHua" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/DivineEngine/Profiles@master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/DivineEngine/Profiles@master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Outbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
sed -i "s/# - RULE-SET,ChinaIP,DIRECT/- RULE-SET,ChinaIP,DIRECT/g" /tmp/rules.yaml 2>/dev/null
sed -i "s/- GEOIP,/#- GEOIP,/g" /tmp/rules.yaml 2>/dev/null
elif [ "$rule_name" = "ConnersHua_return" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/DivineEngine/Profiles@master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/DivineEngine/Profiles@master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Inbound.yaml -o /tmp/rules.yaml 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/rules.yaml" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
fi
if [ -s "/tmp/rules.yaml" ]; then
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_update.sh b/luci-app-openclash/root/usr/share/openclash/openclash_update.sh
index 0bd1f04..3f0383e 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_update.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_update.sh
@@ -49,14 +49,14 @@ if [ -n "$OP_CV" ] && [ -n "$OP_LV" ] && [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1
LOG_OUT "Start Downloading【OpenClash - v$LAST_VER】..."
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -s "/tmp/openclash.ipk" ]; then
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_version.sh b/luci-app-openclash/root/usr/share/openclash/openclash_version.sh
index d4f9690..faace5b 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_version.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_version.sh
@@ -12,14 +12,14 @@ LOG_FILE="/tmp/openclash.log"
if [ "$TIME" != "$CHTIME" ]; then
if [ "$github_address_mod" != "0" ]; then
if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"gh/vernesong/OpenClash@package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.fastgit.org/vernesong/OpenClash/package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$github_address_mod"https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
else
- curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
+ curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
fi
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -z "$(cat $LAST_OPVER |grep '')" ]; then
diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_watchdog.sh b/luci-app-openclash/root/usr/share/openclash/openclash_watchdog.sh
index c584a98..16f75da 100644
--- a/luci-app-openclash/root/usr/share/openclash/openclash_watchdog.sh
+++ b/luci-app-openclash/root/usr/share/openclash/openclash_watchdog.sh
@@ -33,11 +33,50 @@ FW4=$(command -v fw4)
check_dnsmasq() {
if [ -z "$(echo "$en_mode" |grep "redir-host")" ] && [ "$china_ip_route" -eq 1 ] && [ "$enable_redirect_dns" != "2" ]; then
- if [ "$(nslookup www.baidu.com 127.0.0.1:12353 >/dev/null 2>&1 || echo $?)" != "1" ]; then
- DNSPORT=$(uci -q get dhcp.@dnsmasq[0].port)
- if [ -z "$DNSPORT" ]; then
- DNSPORT=$(netstat -nlp |grep -E '127.0.0.1:.*dnsmasq' |awk -F '127.0.0.1:' '{print $2}' |awk '{print $1}' |head -1 || echo 53)
+ DNSPORT=$(uci -q get dhcp.@dnsmasq[0].port)
+ if [ -z "$DNSPORT" ]; then
+ DNSPORT=$(netstat -nlp |grep -E '127.0.0.1:.*dnsmasq' |awk -F '127.0.0.1:' '{print $2}' |awk '{print $1}' |head -1 || echo 53)
+ fi
+ if [ "$(nslookup www.baidu.com 127.0.0.1:"$DNSPORT" >/dev/null 2>&1 || echo $?)" = "1" ]; then
+ if [ -n "$FW4" ]; then
+ if [ -z "$(nft list chain inet fw4 nat_output |grep '12353')" ]; then
+ nft insert rule inet fw4 dstnat position 0 tcp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft insert rule inet fw4 dstnat position 0 udp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft 'add chain inet fw4 nat_output { type nat hook output priority -1; }' 2>/dev/null
+ nft insert rule inet fw4 nat_output position 0 tcp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft insert rule inet fw4 nat_output position 0 udp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft insert rule inet fw4 nat_output position 0 tcp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft insert rule inet fw4 nat_output position 0 udp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ if [ "$ipv6_enable" -eq 1 ]; then
+ nft insert rule inet fw4 dstnat position 0 meta nfproto {ipv6} tcp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft insert rule inet fw4 dstnat position 0 meta nfproto {ipv6} udp dport 53 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft 'add chain inet fw4 nat_output { type nat hook output priority -1; }' 2>/dev/null
+ nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} tcp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} udp dport 53 meta skuid != 65534 counter redirect to "$dns_port" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} tcp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ nft add rule inet fw4 nat_output position 0 meta nfproto {ipv6} udp dport 12353 meta skuid != 65534 counter redirect to "$DNSPORT" comment \"OpenClash DNS Hijack\" 2>/dev/null
+ fi
+ fi
+ else
+ if [ -z "$(iptables -t nat -nL OUTPUT --line-number |grep '12353')" ]; then
+ iptables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ iptables -t nat -I PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ iptables -t nat -I OUTPUT -p udp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ iptables -t nat -I OUTPUT -p tcp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ iptables -t nat -I OUTPUT -p udp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ iptables -t nat -I OUTPUT -p tcp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ if [ "$ipv6_enable" -eq 1 ]; then
+ ip6tables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ ip6tables -t nat -I PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ ip6tables -t nat -I OUTPUT -p udp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ ip6tables -t nat -I OUTPUT -p tcp --dport 53 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$dns_port" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ ip6tables -t nat -I OUTPUT -p udp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ ip6tables -t nat -I OUTPUT -p tcp --dport 12353 -m owner ! --uid-owner 65534 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack" 2>/dev/null
+ fi
+ fi
fi
+ fi
+ if [ "$(nslookup www.baidu.com 127.0.0.1:12353 >/dev/null 2>&1 || echo $?)" != "1" ]; then
if [ -n "$FW4" ]; then
if [ -n "$(nft list chain inet fw4 nat_output |grep 'OpenClash DNS Hijack')" ]; then
LOG_OUT "Tip: Dnsmasq Work is Normal, Restore The Firewall DNS Hijacking Rules..."
@@ -112,7 +151,6 @@ do
stream_auto_select_google_not_cn=$(uci -q get openclash.config.stream_auto_select_google_not_cn || echo 0)
stream_auto_select_openai=$(uci -q get openclash.config.stream_auto_select_openai || echo 0)
upnp_lease_file=$(uci -q get upnpd.config.upnp_lease_file)
-
enable=$(uci -q get openclash.config.enable)
if [ "$enable" -eq 1 ]; then
@@ -271,6 +309,101 @@ fi
fi
fi
+## Skip Proxies Address
+ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "
+ begin
+ Value = YAML.load_file('$CONFIG_FILE');
+ rescue Exception => e
+ puts '${LOGTIME} Error: Load File Failed,【' + e.message + '】';
+ end;
+ begin
+ Thread.new{
+ reg = /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/;
+ reg6 = /^(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))|\[(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))\](?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/i;
+ if Value.key?('proxies') or Value.key?('proxy-providers') then
+ firewall_v = '$FW4';
+ if firewall_v.empty? then
+ firewall_v = 'ipt'
+ else
+ firewall_v = 'nft'
+ end;
+ ips = Array.new;
+ servers = Array.new;
+ if Value.key?('proxies') and not Value['proxies'].nil? then
+ Value['proxies'].each do
+ |i|
+ if i['server'] then
+ if not i['server'] =~ reg and not i['server'] =~ reg6 and not servers.include?(i['server']) then
+ servers = servers.push(i['server']).uniq
+ syscall = '/usr/share/openclash/openclash_debug_dns.lua 2>/dev/null \"' + i['server'] + '\" \"true\"'
+ if IO.popen(syscall).read.split(/\n+/) then
+ ips = ips | IO.popen(syscall).read.split(/\n+/)
+ end;
+ else
+ ips = ips.push(i['server']).uniq
+ end;
+ end;
+ end;
+ end;
+ if Value.key?('proxy-providers') and not Value['proxy-providers'].nil? then
+ Value['proxy-providers'].values.each do
+ |i,path|
+ if i['path'] and not i['path'].empty? then
+ if i['path'].split('/')[0] == '.' then
+ path = '/etc/openclash/'+i['path'].split('./')[1]
+ else
+ path = i['path']
+ end;
+ if File::exist?(path) then
+ if YAML.load_file(path).key?('proxies') and not YAML.load_file(path)['proxies'].nil? then
+ YAML.load_file(path)['proxies'].each do
+ |j|
+ if j['server'] then
+ if not j['server'] =~ reg and not j['server'] =~ reg6 and not servers.include?(j['server']) then
+ servers = servers.push(j['server']).uniq
+ syscall = '/usr/share/openclash/openclash_debug_dns.lua 2>/dev/null \"' + j['server'] + '\" \"true\"'
+ if IO.popen(syscall).read.split(/\n+/) then
+ ips = ips | IO.popen(syscall).read.split(/\n+/)
+ end;
+ else
+ ips = ips.push(j['server']).uniq
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ #Add ip skip
+ if ips and not ips.empty? then
+ ips.each do
+ |ip|
+ if ip and ip =~ reg then
+ if firewall_v == 'nft' then
+ syscall = 'nft add element inet fw4 localnetwork { \"' + ip + '\" } 2>/dev/null'
+ system(syscall)
+ else
+ syscall = 'ipset add localnetwork \"' + ip + '\" 2>/dev/null'
+ system(syscall)
+ end;
+ elsif ip and ip =~ reg6 then
+ if firewall_v == 'nft' then
+ syscall = 'nft add element inet fw4 localnetwork6 { \"' + ip + '\" } 2>/dev/null'
+ system(syscall)
+ else
+ syscall = 'ipset add localnetwork6 \"' + ip + '\" 2>/dev/null'
+ system(syscall)
+ end;
+ end;
+ end;
+ end;
+ end;
+ }.join;
+ rescue Exception => e
+ puts '${LOGTIME} Error: Set Proxies Address Skip Failed,【' + e.message + '】';
+ end" >> $LOG_FILE
+
## DNS转发劫持
if [ "$enable_redirect_dns" = "1" ]; then
if [ -z "$(uci -q get dhcp.@dnsmasq[0].server |grep "$dns_port")" ] || [ ! -z "$(uci -q get dhcp.@dnsmasq[0].server |awk -F ' ' '{print $2}')" ]; then
diff --git a/luci-app-openclash/root/usr/share/openclash/res/game_rules.list b/luci-app-openclash/root/usr/share/openclash/res/game_rules.list
index eaabf84..9ffd5df 100644
--- a/luci-app-openclash/root/usr/share/openclash/res/game_rules.list
+++ b/luci-app-openclash/root/usr/share/openclash/res/game_rules.list
@@ -1,100 +1,107 @@
300英雄,300hero-cn.rules
+方舟:生存进化,ARK--Survival-Evolved.rules
永恒之塔-台服,Aion-TW.rules
美国卡车模拟国际服,American-Truck-Simulator.rules
太空狼人杀,Among Us.rules
圣歌,Anthem.rules
+Apex-uu,Apex-uu.rules
Apex英雄,Apex.rules
-Apex英雄-uu策略,Apex-uu.rules
-方舟:生存进化,ARK--Survival-Evolved.rules
-武装突袭(Codefourgaming和官服),Arma3.rules
+武装突袭3,Arma3.rules
刺客信条:奥德赛,Assassin's-Creed-Odyssey.rules,Assassins-Creed-Odyssey.rules
刺客信条:起源,Assassin's-Creed-Origins.rules,Assassins-Creed-Origins.rules
Atlas-全区,Atlas.rules
-战地1,Battlefield-1.rules
+战网,Battle-net-tw.rules
战地4,BattleField-4.rules
-战地5,Battlefield-Ⅴ.rules,Battlefield-5.rules
+战地1,Battlefield-1.rules
+戰地5,Battlefield-Ⅴ.rules,Battlefield-5.rules
黑色沙漠,Black-Desert.rules
黑色幸存者,BlackSurvivor.rules
-剑灵台服,Blade&Soul TW.rules
+灵剑台服,Blade&Soul TW.rules
剑灵-日服,Blade-&-Soul-jp.rules
-剑灵-国服全部区服(UU规则),Blood-&-Soul-CN.rules
剑灵-国服-南天国(测试版),Blood-&-Soul-CN-TestServer-NantianGuo-Alpha.rules
+剑灵-国服全部区服(UU规则),Blood-&-Soul-CN.rules
无主之地3,Borderlands3-asia.rules
泡泡战士-跑跑卡丁车-韩服,BubbleFighter-KartRider-KR.rules
-使命召唤4:现代战争重置版,Call-Of-Duty-4-Modern-Warfare.rules
-使命召唤15亚服,Call-Of-Duty15-Asia.rules
-使命召唤16&19:现代战争I&II,Call-Of-Duty-Modern-Warfare.rules
-使命召唤17:冷战,Call-Of-Duty17-ColdWar.rules
-英雄连2,Company-Of-Heroes-2.rules
+绕过大陆和局域网,BypassCNandLan.rules
+绕过大陆和局域网someip,BypassCNandLan_someip.rules
反恐精英:全球攻势,CS-GO.rules
-反恐精英:全球攻势-港服(uu),CSGO-HKuu.rules
反恐精英:全球攻势-港服(tx),CSGO-HKtx.rules
+反恐精英:全球攻势-港服(uu),CSGO-HKuu.rules
反恐精英:全球攻势-日服(tx),CSGO-JPtx.rules
反恐精英:全球攻势-美服(tx),CSGO-UStx.rules
+使命召唤4:现代战争重置版,Call-Of-Duty-4-Modern-Warfare.rules
+使命召唤16&19:现代战争I&II,Call-Of-Duty-Modern-Warfare.rules
+使命召唤15亚服,Call-Of-Duty15-Asia.rules
+使命召唤17:冷战,Call-Of-Duty17-ColdWar.rules
+仅代理中国IP,China-IP-only.rules
+英雄连2,Company-Of-Heroes-2.rules
黑暗之魂3,Dark-Souls-3.rules
不屈不挠,Dauntless.rules
-DayZ-steam,DayZ.rules
+DayZ steam,DayZ.rules
黎明杀机,Dead-by-Daylight.rules
命运2-全服(tx),Destiny2-Alltx.rules
命运2-全服(uu),Destiny2-Alluu.rules
天命2-亚服/命运2-亚服,Destiny2-Asia.rules
天命2-欧服/命运2-欧服,Destiny2-EU.rules
-命运2-steam,Destiny2-steam.rules
天命2-美服/命运2-美服,Destiny2-US.rules
-暗黑破坏神2:重制版-亚服,Diablo-2-Resurrected.rules
+命运2-steam,Destiny2-steam.rules
+暗黑破坏神2:重制版,Diablo-2-Resurrected.rules
暗黑破坏神3-亚服,Diablo3-Asia.rules
暗黑破坏神3-美服,Diablo3-US.rules
-暗黑破坏神4-亚服,DiabloIV-HK.rules
+暗黑破坏神4-港服,DiabloIV-HK.rules
脏弹-Steam,Dirty-Bomb.rules
-Discord,Discord-All.rules
-饥荒-steam,Don't-Starve-steam.rules,Dont-Starve-steam.rules
-DOTA2-日服,Dota2-jp.rules
+Discord语音,Discord-All.rules
+饥荒-steam,Don't-Starve-steam.rules
刀塔霸业,Dota-Underlords.rules
+DOTA2-日服,Dota2-jp.rules
逃离塔科夫,Escape-from-Tarkov.rules
欧卡2所有分区-UU,Euro-Truck-Simulator-2.rules
Eve-online欧服,Eve-online.rules
-FIFA19,FiFa19-INT.rules
FIFA20,FIFA20.rules
-糖豆人,Fall-Guys.rules
-最终幻想14,Final-Fantasy-XIV.rules
最终幻想14国服,FINAL-FANTASY-XIV-cn.rules
+糖豆人,Fall-Guys.rules
+FIFA19,FiFa19-INT.rules
+最终幻想14,Final-Fantasy-XIV.rules
荣耀战魂,For-Honour.rules
-堡垒之夜-亚服,Fortnite-AS.rules
+堡垒之夜亚服,Fortnite-AS.rules
堡垒之夜-国服,Fortnite-cn.rules
极限竞速地平线4,Forza-Horizon-4.rules
极限竞速地平线5,Forza-Horizon-5.rules
极限竞速7,Forza-Motorsport-7.rules
-基佬大乱斗Gang-Beasts,Gang-Beasts.rules
-鹅鸭杀-港服,Goose-Goose-Duck-HK.rules
-Grand Theft Auto V(GTA5),Grand Theft Auto V.rules
+基佬大乱斗Gang Beasts,Gang-Beasts.rules
+鹅鸭杀,Goose-Goose-Duck-HK.rules
+Grand Theft Auto V,Grand Theft Auto V.rules
激战2,Guild-Wars-2.rules
巫师昆特牌国际服,Gwent_The-Witcher-Card-game.rules
杀手2外服,HITMAN2.rules
光环:士官长合集,Halo-The-Master-Chief-Collection.rules
荒野行动PC版-国服,HuangYeXingDong-cn.rules
+猎杀对决,Hunt-Showdown-Asia.rules
叛乱:沙漠风暴,Insurgency-Sandstorm.rules
Jump大乱斗,Jump-Force.rules
跑跑卡丁车(韩服),KartRider.rules
+酷狗回国,KuGou-cn.rules
Kurtzpel,Kurtzpel.rules
求生之路2-Test,L4D2-Test.rules
+英雄联盟PBE,League-of-Legends-PBE.rules
英雄联盟-日服,League-of-Legends-jp.rules
英雄联盟-韩服,League-of-Legends-kr.rules
-英雄联盟PBE,League-of-Legends-PBE.rules
-英雄联盟-台服,League-of-Legends-tw+Garena(2018-12-19).rules
-英雄联盟-台服+Garena平台(2018-12-19更新),League-of-Legends-tw.rules
+英雄联盟-台服+Garena平台(2018-12-19更新),League-of-Legends-tw+Garena(2018-12-19).rules
+英雄联盟-台服,League-of-Legends-tw.rules
英雄联盟-美服,League-of-Legends-us.rules
+致命公司,Lethal Company.rules
失落的方舟韩服,Lost-Ark.rules
失落的方舟俄服,Lostark-RU.rules
+传奇4-亚服,MIR4-asia.rules
+万智牌:竞技场-国际服,MTG-Arena.rules
+奇迹传奇MU2,MU2.rules
冒险岛,Maplestory-us.rules
心灵终结,MentalOmega.rules
微软模拟飞行年度版,Microsoft-Flight-Simulator-Game-Of-The-Year-Edition.rules
-微软商店,Microsoft-Srote.rules
+巨硬商店,Microsoft-Srote.rules
我的世界-地下城,Minecraft-Dungeons.rules
-传奇4,MIR4-asia.rules
误造,Miscreated.rules
怪兽世界猎人steam版,Monster-Hunter-World.rules
-万智牌:竞技场-国际服,MTG-Arena.rules
-奇迹传奇MU2,MU2.rules
NBA-2K19,NBA-2K19.rules
NBA2K20,NBA2K20.rules
仁王,NIOH.rules
@@ -102,66 +109,74 @@ NBA2K20,NBA2K20.rules
Osu!,Osu!.rules
守望先锋-亚服,Overwatch-Asia.rules
守望先锋-美服,Overwatch-US.rules
-流亡黯道-国际服,Path Of Exile.rules
-流放之路,PathOfexile.rules
梦幻之星2-日服(tx),PHANTASY STAR ONLINE2-JPtx.rules
-行星边际2,PlanetSide-2.rules
-绝地求生大逃杀,PlayerUnknown's-Battlegrounds-update.rules,PlayerUnknowns-Battlegrounds-update.rules
-实况足球-2018,Pro-Evolution-Soccer-2018.rules
-实况足球-2019,Pro-Evolution-Soccer-2019.rules
-绝地求生亚服-东南亚服,PUBG-Asia&-Southeast-Asia.rules
+绝地求生亚服&东南亚服,PUBG-Asia&-Southeast-Asia.rules
绝地求生国际服,PUBG-INT.rules
绝地求生韩服,PUBG-kakao.rules
-绝地求生低配版-Garena,PUBGLite-Garena.rules
绝地求生轻量版-WEB客户端,PUBGLITE-WEB.rules
+绝地求生低配版-Garena,PUBGLite-Garena.rules
+流亡黯道-国际服,Path Of Exile.rules
+流放之路,PathOfexile.rules
+行星边际2,PlanetSide-2.rules
+绝地求生大逃杀,PlayerUnknown's-Battlegrounds-update.rules
+实况足球-2018,Pro-Evolution-Soccer-2018.rules
+实况足球-2019,Pro-Evolution-Soccer-2019.rules
R2竞技场服,R2Arena.rules
R2俄服官服,R2RU.rules
R2美服,R2US.rules
-仙境传说OL美国,Ragnarok-Online-2-us.rules
+仙境传说2-us,Ragnarok-Online-2-us.rules
仙境传说OL台湾,Ragnarok-Online-tw.rules
荒野大镖客2,Red-dead-redemption2.rules
无限法则,Ring-of-Elysium-asia.rules
Roblox,Roblox.rules
+Scum人渣-全球服,Scum.rules
影之诗,Shadowverse.rules
+不代理中国IP且绕过局域网(精简版CNIP表),Skip-all-China-IP-mini-and-LAN.rules
灵魂行者-台服,Soul-Worker.rules
星际公民,Star-Citizen.rules
星球大战2前线,Star-Wars-BattlefrontII.rules
-StarCraft-亚服,StarCraft-2-asia.rules
-星际争霸2-国服,StarCraftⅡ-cn.rules,StarCraft2-cn.rules
-Steam-社区,Steam.rules
+StarCraft 2 亚服,StarCraft-2-asia.rules
+星际争霸2国服,StarCraftⅡ-cn.rules
+星露谷物语,Stardew Valley.rules
+Steam-社区(Beta),Steam.rules
极限巅峰,Steep.rules
街头霸王5,Street-Fighter-V.rules
神谕之战,TERA.rules
+新枫之谷,TMS.rules
+仅代理Telegram,Telegram.rules
飙酷车神,The-Crew.rules
飙酷车神2,The-Crew2.rules
上古卷轴OL,The-Elder-Scrolls-Online.rules
-天涯明月刀-台服,TianYaMingYueDao-tw.rules
泰坦陨落2,TiTanFall2.rules
-新枫之谷,TMS.rules
-幽灵行动:荒野,Tom-Clancy's-Ghost-Recon-Wildlands.rules,Tom-Clancys-Ghost-Recon-Wildlands.rules
-彩虹六号-围攻-全部,Tom-Clancy's-Rainbow-Six-Siege-all.rules,Tom-Clancys-Rainbow-Six-Siege-all.rules
-彩虹六号-围攻-EAS,Tom-Clancy's-Rainbow-Six-Siege-EAS.rules,Tom-Clancys-Rainbow-Six-Siege-EAS.rules
-彩虹六号-异种-全部,Tom-Clancy's-Rainbow-Six-Extraction-all.rules,Tom-Clancys-Rainbow-Six-Extraction-all.rules
-全境封锁,Tom-clancy's-The-Division-2.rules,Tom-clancys-The-Division-2.rules
-全境封锁2,Tom-clancy's-The-Division.rules,Tom-clancys-The-Division.rules
+天涯明月刀-台服,TianYaMingYueDao-tw.rules
+幽灵行动:荒野,Tom-Clancy's-Ghost-Recon-Wildlands.rules
+彩虹六号-异种-全部,Tom-Clancy's-Rainbow-Six-Extraction-all.rules
+彩虹六号-围攻-EAS,Tom-Clancy's-Rainbow-Six-Siege-EAS.rules
+彩虹六号-围攻-全部,Tom-Clancy's-Rainbow-Six-Siege-all.rules
+全境封锁2,Tom-clancy's-The-Division-2.rules
+全境封锁,Tom-clancy's-The-Division.rules
+Twitch直播,Twitch.rules
未转变者Unturned,Unturned.rules
+VRchat,VRchat.rules
无畏契约,Valorant.rules
-战争雷霆,War-thunder-steam.rules
-战争前线-steam,Warface.rules
+战争雷霆-steam,War-thunder-steam.rules
+战争前线,Warface.rules
+星际战甲,Warframe.rules
看门狗,Watch-Dogs.rules
看门狗2,Watch-Dogs2.rules
求生意志OL,Will-To-Live-Online.rules
-第三次世界大战-欧服,World-War-3.rules
-坦克世界-亚服,World-of-Tanks-Asia.rules
-坦克世界-国服,World-of-Tanks-cn.rules
-坦克世界闪电战,World-of-Tanks-Blitz.rules
-魔兽世界台服,World-of-warcraft-tw.rules
-战舰世界-亚服,World-of-Warships-US.rules
-战舰世界-欧服,World-of-warships-EU.rules
-战舰世界-美服,World-of-Warships.rules
-战舰世界国服UU,World-of-Warships-CN.rules
-僵尸世界大战,Worldwar-Z.rules
魔兽世界-欧服,WoW-EU.rules
+World War 3,World-War-3.rules
+坦克世界-亚服,World-of-Tanks-Asia.rules
+坦克世界闪电战,World-of-Tanks-Blitz.rules
+坦克世界-国服,World-of-Tanks-cn.rules
+战舰世界国服UU,World-of-Warships-CN.rules
+战舰世界-美服,World-of-Warships-US.rules
+战舰世界-亚服,World-of-Warships.rules
+魔兽世界台服,World-of-warcraft-tw.rules
+战舰世界欧服,World-of-warships-EU.rules
+僵尸世界大战,Worldwar-Z.rules
游戏王决斗链接,YO-GI-HO delulinks.rules
+YY语音,YY-cn.rules
游侠对战平台,YouXiaDuiZhanPingTai.rules
-YY语音平台,YY-cn.rules
+风暴英雄,heros of the storm-kr.rules
diff --git a/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/CNAME b/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/CNAME
new file mode 100644
index 0000000..82221cb
--- /dev/null
+++ b/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/CNAME
@@ -0,0 +1 @@
+d.metacubex.one
diff --git a/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Config-8226e777.js b/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Config-8226e777.js
deleted file mode 100644
index 6500642..0000000
--- a/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/assets/Config-8226e777.js
+++ /dev/null
@@ -1 +0,0 @@
-import{k as Q,a4 as le,i as e,c as t,S as T,d as v,a5 as y,a2 as W,N as Z,F,a1 as ae,ay as ne,p as J,P as se,b as p,D as R,a3 as K,v as re}from"./vendor-5507c805.js";import{u as j,ad as ie,ae as M,af as ce,B as E,ag as k,ah as oe,ai as de,aj as ue,ak as ge,al as pe,am as he,an as fe,ao as ve,ap as be,aq as me,b as _e,ar as $e,as as O,at as z,au as xe,av as H,aw as Ce,ax as X,ay as ke,az as ye,aA as Se,aB as we,aC as De,ac as Ee,aD as Te,aE as Ne,aF as Pe,aG as Ae}from"./index-bd53d7c8.js";import{C as S}from"./ConfigTitle-dd5fc83b.js";const Ie=v(' |