Skip to content

Commit

Permalink
Merge pull request #131 from morytyann/v1.7.5
Browse files Browse the repository at this point in the history
v1.7.5
  • Loading branch information
morytyann authored Aug 27, 2024
2 parents 289f311 + 35a468a commit 0eb3556
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 48 deletions.
2 changes: 1 addition & 1 deletion luci-app-mihomo/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(TOPDIR)/rules.mk

PKG_VERSION:=1.7.4
PKG_VERSION:=1.7.5

LUCI_TITLE:=LuCI Support for mihomo
LUCI_DEPENDS:=+luci-base +mihomo
Expand Down
104 changes: 61 additions & 43 deletions luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,39 @@ const convertBackends = [
];

const convertTemplates = [
{name: 'ACL4SSR', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR.ini'},
{name: 'ACL4SSR_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_AdblockPlus.ini'},
{name: 'ACL4SSR_BackCN', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_BackCN.ini'},
{name: 'ACL4SSR_Mini', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini.ini'},
{name: 'ACL4SSR_Mini_Fallback', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_Fallback.ini'},
{name: 'ACL4SSR_Mini_MultiMode', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_MultiMode.ini'},
{name: 'ACL4SSR_Mini_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_NoAuto.ini'},
{name: 'ACL4SSR_NoApple', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoApple.ini'},
{name: 'ACL4SSR_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto.ini'},
{name: 'ACL4SSR_NoAuto_NoApple', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto_NoApple.ini'},
{name: 'ACL4SSR_NoAuto_NoApple_NoMicrosoft', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto_NoApple_NoMicrosoft.ini'},
{name: 'ACL4SSR_NoMicrosoft', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoMicrosoft.ini'},
{name: 'ACL4SSR_Online', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online.ini'},
{name: 'ACL4SSR_Online_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_AdblockPlus.ini'},
{name: 'ACL4SSR_Online_Full', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full.ini'},
{name: 'ACL4SSR_Online_Full_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_AdblockPlus.ini'},
{name: 'ACL4SSR_Online_Full_Google', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Google.ini'},
{name: 'ACL4SSR_Online_Full_MultiMode', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_MultiMode.ini'},
{name: 'ACL4SSR_Online_Full_Netflix', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Netflix.ini'},
{name: 'ACL4SSR_Online_Full_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_NoAuto.ini'},
{name: 'ACL4SSR_Online_Mini', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini.ini'},
{name: 'ACL4SSR_Online_Mini_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_AdblockPlus.ini'},
{name: 'ACL4SSR_Online_Mini_Ai', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_Ai.ini'},
{name: 'ACL4SSR_Online_Mini_Fallback', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_Fallback.ini'},
{name: 'ACL4SSR_Online_Mini_MultiCountry', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_MultiCountry.ini'},
{name: 'ACL4SSR_Online_Mini_MultiMode', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_MultiMode.ini'},
{name: 'ACL4SSR_Online_Mini_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_NoAuto.ini'},
{name: 'ACL4SSR_Online_MultiCountry', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_MultiCountry.ini'},
{name: 'ACL4SSR_Online_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_NoAuto.ini'},
{name: 'ACL4SSR_Online_NoReject', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_NoReject.ini'},
{name: 'ACL4SSR_WithChinaIp', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithChinaIp.ini'},
{name: 'ACL4SSR_WithChinaIp_WithGFW', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithChinaIp_WithGFW.ini'},
{name: 'ACL4SSR_WithGFW', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithGFW.ini'},
{ name: 'ACL4SSR', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR.ini' },
{ name: 'ACL4SSR_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_AdblockPlus.ini' },
{ name: 'ACL4SSR_BackCN', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_BackCN.ini' },
{ name: 'ACL4SSR_Mini', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini.ini' },
{ name: 'ACL4SSR_Mini_Fallback', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_Fallback.ini' },
{ name: 'ACL4SSR_Mini_MultiMode', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_MultiMode.ini' },
{ name: 'ACL4SSR_Mini_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_NoAuto.ini' },
{ name: 'ACL4SSR_NoApple', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoApple.ini' },
{ name: 'ACL4SSR_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto.ini' },
{ name: 'ACL4SSR_NoAuto_NoApple', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto_NoApple.ini' },
{ name: 'ACL4SSR_NoAuto_NoApple_NoMicrosoft', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto_NoApple_NoMicrosoft.ini' },
{ name: 'ACL4SSR_NoMicrosoft', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoMicrosoft.ini' },
{ name: 'ACL4SSR_Online', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online.ini' },
{ name: 'ACL4SSR_Online_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_AdblockPlus.ini' },
{ name: 'ACL4SSR_Online_Full', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full.ini' },
{ name: 'ACL4SSR_Online_Full_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_AdblockPlus.ini' },
{ name: 'ACL4SSR_Online_Full_Google', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Google.ini' },
{ name: 'ACL4SSR_Online_Full_MultiMode', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_MultiMode.ini' },
{ name: 'ACL4SSR_Online_Full_Netflix', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Netflix.ini' },
{ name: 'ACL4SSR_Online_Full_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_NoAuto.ini' },
{ name: 'ACL4SSR_Online_Mini', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini.ini' },
{ name: 'ACL4SSR_Online_Mini_AdblockPlus', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_AdblockPlus.ini' },
{ name: 'ACL4SSR_Online_Mini_Ai', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_Ai.ini' },
{ name: 'ACL4SSR_Online_Mini_Fallback', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_Fallback.ini' },
{ name: 'ACL4SSR_Online_Mini_MultiCountry', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_MultiCountry.ini' },
{ name: 'ACL4SSR_Online_Mini_MultiMode', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_MultiMode.ini' },
{ name: 'ACL4SSR_Online_Mini_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_NoAuto.ini' },
{ name: 'ACL4SSR_Online_MultiCountry', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_MultiCountry.ini' },
{ name: 'ACL4SSR_Online_NoAuto', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_NoAuto.ini' },
{ name: 'ACL4SSR_Online_NoReject', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_NoReject.ini' },
{ name: 'ACL4SSR_WithChinaIp', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithChinaIp.ini' },
{ name: 'ACL4SSR_WithChinaIp_WithGFW', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithChinaIp_WithGFW.ini' },
{ name: 'ACL4SSR_WithGFW', url: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithGFW.ini' },
];

function renderStatus(running) {
Expand Down Expand Up @@ -86,22 +86,22 @@ return view.extend({
let m, s, o, so;

m = new form.Map('mihomo', _('MihomoTProxy'), `${_('Transparent Proxy with Mihomo on OpenWrt.')} <a href="https://github.com/morytyann/OpenWrt-mihomo/wiki" target="_blank">${_('Usage')}</a>`);

s = m.section(form.NamedSection, 'status', 'status', _('Status'));

o = s.option(form.Value, '_app_version', _('App Version'));
o.readonly = true;
o.load = function (section_id) {
return appVersion.trim();
};
o.write = function () {};
o.write = function () { };

o = s.option(form.Value, '_core_version', _('Core Version'));
o.readonly = true;
o.load = function (section_id) {
return coreVersion.trim();
};
o.write = function () {};
o.write = function () { };

o = s.option(form.DummyValue, '_core_status', _('Core Status'));
o.cfgvalue = function (section_id) {
Expand Down Expand Up @@ -173,6 +173,9 @@ return view.extend({
o = s.option(form.Flag, 'test_profile', _('Test Profile'));
o.rmempty = false;

o = s.option(form.Flag, 'fast_reload', _('Fast Reload'));
o.rmempty = false;

s = m.section(form.NamedSection, 'proxy', 'proxy', _('Proxy Config'));

s.tab('transparent_proxy', _('Transparent Proxy'));
Expand Down Expand Up @@ -332,24 +335,36 @@ return view.extend({
o = s.taboption('convert', form.Value, 'convert_include', _('Include'));
o.modalonly = true;
o.retain = true;
o.depends({'convert': '1', 'convert_advanced': '1'});
o.depends({ 'convert': '1', 'convert_advanced': '1' });

o = s.taboption('convert', form.Value, 'convert_exclude', _('Exclude'));
o.modalonly = true;
o.retain = true;
o.depends({'convert': '1', 'convert_advanced': '1'});
o.depends({ 'convert': '1', 'convert_advanced': '1' });

o = s.taboption('convert', form.Flag, 'convert_udp', _('UDP'));
o.modalonly = true;
o.retain = true;
o.rmempty = false;
o.depends({ 'convert': '1', 'convert_advanced': '1' });

o = s.taboption('convert', form.Flag, 'convert_emoji', _('Use Emoji'));
o.modalonly = true;
o.retain = true;
o.rmempty = false;
o.depends({'convert': '1', 'convert_advanced': '1'});
o.depends({ 'convert': '1', 'convert_advanced': '1' });

o = s.taboption('convert', form.Flag, 'convert_insert_node_type', _('Insert Node Type'));
o.modalonly = true;
o.retain = true;
o.rmempty = false;
o.depends({'convert': '1', 'convert_advanced': '1'});
o.depends({ 'convert': '1', 'convert_advanced': '1' });

o = s.taboption('convert', form.Flag, 'convert_expand', _('Expand Ruleset'));
o.modalonly = true;
o.retain = true;
o.rmempty = false;
o.depends({ 'convert': '1', 'convert_advanced': '1' });

s = m.section(form.NamedSection, 'mixin', 'mixin', _('Mixin Config'));

Expand Down Expand Up @@ -393,6 +408,9 @@ return view.extend({

o = s.taboption('external_control', form.Value, 'ui_url', _('UI Url'));
o.rmempty = false;
o.value('https://mirror.ghproxy.com/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip', 'MetaCubeXD')
o.value('https://mirror.ghproxy.com/https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip', 'YACD')
o.value('https://mirror.ghproxy.com/https://github.com/MetaCubeX/Razord-meta/archive/refs/heads/gh-pages.zip', 'Razord')

o = s.taboption('external_control', form.Value, 'api_port', _('API Port'));
o.datatype = 'port';
Expand Down Expand Up @@ -629,8 +647,8 @@ return view.extend({
s.tab('geox', _('GeoX Config'));

o = s.taboption('geox', form.ListValue, 'geoip_format', _('GeoIP Format'));
o.value('dat');
o.value('mmdb');
o.value('dat', 'DAT');
o.value('mmdb', 'MMDB');

o = s.taboption('geox', form.ListValue, 'geodata_loader', _('GeoData Loader'));
o.value('standard', _('Standard Loader'));
Expand Down
9 changes: 9 additions & 0 deletions luci-app-mihomo/po/zh_Hans/mihomo.po
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ msgstr "混入"
msgid "Test Profile"
msgstr "检查配置文件"

msgid "Fast Reload"
msgstr "快速重载"

msgid "Proxy Config"
msgstr "代理配置"

Expand Down Expand Up @@ -181,12 +184,18 @@ msgstr "包含节点"
msgid "Exclude"
msgstr "排除节点"

msgid "UDP"
msgstr "UDP"

msgid "Use Emoji"
msgstr "使用 Emoji"

msgid "Insert Node Type"
msgstr "插入节点类型"

msgid "Expand Ruleset"
msgstr "展开规则集"

msgid "Mixin Config"
msgstr "混入配置"

Expand Down
2 changes: 1 addition & 1 deletion mihomo/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=mihomo
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
Expand Down
2 changes: 2 additions & 0 deletions mihomo/files/mihomo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ config subscription 'subscription'
option 'convert_advanced' '0'
option 'convert_include' ''
option 'convert_exclude' ''
option 'convert_udp' '0'
option 'convert_emoji' '0'
option 'convert_insert_node_type' '0'
option 'convert_expand' '0'

config mixin 'mixin'
option 'mode' 'rule'
Expand Down
13 changes: 10 additions & 3 deletions mihomo/files/mihomo.init
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ start_service() {
log "Starting..."
# get config
## app config
local scheduled_restart cron_expression profile mixin test_profile
local scheduled_restart cron_expression profile mixin test_profile fast_reload
config_get scheduled_restart "config" "scheduled_restart"
config_get cron_expression "config" "cron_expression"
config_get profile "config" "profile"
config_get_bool mixin "config" "mixin" 0
config_get_bool test_profile "config" "test_profile" 0
config_get_bool fast_reload "config" "fast_reload" 0
## proxy config
local transparent_proxy transparent_proxy_mode ipv4_dns_hijack ipv6_dns_hijack ipv4_proxy ipv6_proxy router_proxy lan_proxy access_control_mode bypass_china_mainland_ip acl_tcp_dport acl_udp_dport
config_get_bool transparent_proxy "proxy" "transparent_proxy" 0
Expand Down Expand Up @@ -125,12 +126,14 @@ start_service() {
config_get subscription_convert_backend "$subscription_section" "convert_backend"
config_get subscription_convert_template "$subscription_section" "convert_template"
# convert advanced
local subscription_convert_advanced subscription_convert_include subscription_convert_exclude subscription_convert_emoji subscription_convert_insert_node_type
local subscription_convert_advanced subscription_convert_include subscription_convert_exclude subscription_convert_udp subscription_convert_emoji subscription_convert_insert_node_type subscription_convert_expand
config_get_bool subscription_convert_advanced "$subscription_section" "convert_advanced" 0
config_get subscription_convert_include "$subscription_section" "convert_include"
config_get subscription_convert_exclude "$subscription_section" "convert_exclude"
config_get_bool subscription_convert_udp "$subscription_section" "convert_udp" 0
config_get_bool subscription_convert_emoji "$subscription_section" "convert_emoji" 0
config_get_bool subscription_convert_insert_node_type "$subscription_section" "convert_insert_node_type" 0
config_get_bool subscription_convert_expand "$subscription_section" "convert_expand" 0
# generate url
local url
if [ "$subscription_convert" == 0 ]; then
Expand All @@ -147,8 +150,10 @@ start_service() {
if [ -n "$subscription_convert_exclude" ]; then
url="$url&exclude=$(echo -n $subscription_convert_exclude | yq -M -o uri)"
fi
url="$url&udp=$([ "$subscription_convert_udp" == 1 ] && echo -n "true" || echo -n "false")"
url="$url&emoji=$([ "$subscription_convert_emoji" == 1 ] && echo -n "true" || echo -n "false")"
url="$url&append_type=$([ "$subscription_convert_insert_node_type" == 1 ] && echo -n "true" || echo -n "false")"
url="$url&expand=$([ "$subscription_convert_expand" == 1 ] && echo -n "true" || echo -n "false")"
fi
fi
curl -s -o "$RUN_PROFILE_PATH" -L -H "User-Agent: $subscription_user_agent" "$url"
Expand Down Expand Up @@ -262,7 +267,9 @@ start_service() {

procd_set_param command /bin/sh -c "$PROG -d $RUN_DIR >> $RUN_CORE_LOG_PATH 2>&1"
procd_set_param file "$RUN_PROFILE_PATH"
procd_set_param reload_signal HUP
if [ "$fast_reload" == 1 ]; then
procd_set_param reload_signal HUP
fi
procd_set_param respawn
procd_set_param user "$MIHOMO_USER"
procd_set_param group "$MIHOMO_GROUP"
Expand Down
2 changes: 2 additions & 0 deletions mihomo/files/uci-defaults/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ ui_metacubexd=$(uci -q get mihomo.mixin.ui_metacubexd); [ -n "$ui_metacubexd" ]
# delete mihomo.mixin.ui_metacubexd_url
ui_metacubexd_url=$(uci -q get mihomo.mixin.ui_metacubexd_url); [ -n "$ui_metacubexd_url" ] && uci delete mihomo.mixin.ui_metacubexd_url

# add mihomo.config.fast_reload
fast_reload=$(uci -q get mihomo.config.fast_reload); [ -z "$fast_reload" ] && uci set mihomo.config.fast_reload=1

# commit
uci commit mihomo
Expand Down

0 comments on commit 0eb3556

Please sign in to comment.