diff --git a/luci-app-mihomo/Makefile b/luci-app-mihomo/Makefile index ce2b2a51..5ff816c4 100644 --- a/luci-app-mihomo/Makefile +++ b/luci-app-mihomo/Makefile @@ -1,6 +1,6 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.8.5 +PKG_VERSION:=1.8.6 LUCI_TITLE:=LuCI Support for mihomo LUCI_DEPENDS:=+luci-base +mihomo diff --git a/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js b/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js index 03abce35..d0829dc7 100644 --- a/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js +++ b/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js @@ -232,6 +232,7 @@ return view.extend({ s = m.section(form.TableSection, 'subscription', _('
💾 Subscription Config
')); s.addremove = true; s.anonymous = true; + s.sortable = true; o = s.option(form.Value, 'name', _('Subscription Name')); o.rmempty = false; @@ -241,7 +242,7 @@ return view.extend({ o.rmempty = false; o = s.option(form.Value, 'user_agent', _('User Agent')); - o.default = 'mihomo'; + o.default = 'clash'; o.rmempty = false; o.width = '15%'; o.value('mihomo'); @@ -276,11 +277,11 @@ return view.extend({ o.rmempty = false; o = s.taboption('general', form.Value, 'tcp_keep_alive_idle', _('TCP Keep Alive Idle')); - o.datatype = 'integer'; + o.datatype = 'uinteger'; o.placeholder = '600'; o = s.taboption('general', form.Value, 'tcp_keep_alive_interval', _('TCP Keep Alive Interval')); - o.datatype = 'integer'; + o.datatype = 'uinteger'; o.placeholder = '15'; s.tab('external_control', _('External Control Config')); @@ -336,8 +337,9 @@ return view.extend({ o.retain = true; o.depends('authentication', '1'); - o.subsection.anonymous = true; o.subsection.addremove = true; + o.subsection.anonymous = true; + o.subsection.sortable = true; so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so.rmempty = false; @@ -356,13 +358,16 @@ return view.extend({ o.value('mixed', 'Mixed'); o = s.taboption('tun', form.Value, 'tun_mtu', '*' + ' ' + _('MTU')); + o.datatype = 'uinteger'; o.placeholder = '9000'; o = s.taboption('tun', form.Flag, 'tun_gso', '*' + ' ' + _('GSO')); o.rmempty = false; o = s.taboption('tun', form.Value, 'tun_gso_max_size', '*' + ' ' + _('GSO Max Size')); + o.datatype = 'uinteger'; o.placeholder = '65536'; + o.retain = true; o.depends('tun_gso', '1'); o = s.taboption('tun', form.Flag, 'tun_endpoint_independent_nat', '*' + ' ' + _('Endpoint Independent NAT')); @@ -374,12 +379,12 @@ return view.extend({ o.datatype = 'port'; o.placeholder = '1053'; - o = s.taboption('dns', form.ListValue, 'dns_mode', _('DNS Mode')); + o = s.taboption('dns', form.ListValue, 'dns_mode', '*' + ' ' + _('DNS Mode')); o.value('normal', 'Normal'); o.value('fake-ip', 'Fake-IP'); o.value('redir-host', 'Redir-Host'); - o = s.taboption('dns', form.Value, 'fake_ip_range', _('Fake-IP Range')); + o = s.taboption('dns', form.Value, 'fake_ip_range', '*' + ' ' + _('Fake-IP Range')); o.datatype = 'cidr4'; o.placeholder = '198.18.0.1/16'; o.retain = true; @@ -395,6 +400,7 @@ return view.extend({ o.depends({ 'dns_mode': 'fake-ip', 'fake_ip_filter': '1' }); o = s.taboption('dns', form.ListValue, 'fake_ip_filter_mode', _('Fake-IP Filter Mode')) + o.retain = true; o.value('blacklist', _('Block Mode')); o.value('whitelist', _('Allow Mode')); o.depends({ 'dns_mode': 'fake-ip', 'fake_ip_filter': '1' }); @@ -426,8 +432,9 @@ return view.extend({ o.retain = true; o.depends('hosts', '1'); - o.subsection.anonymous = true; o.subsection.addremove = true; + o.subsection.anonymous = true; + o.subsection.sortable = true; so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so.rmempty = false; @@ -444,16 +451,17 @@ return view.extend({ o.retain = true; o.depends('dns_nameserver', '1'); + o.subsection.addremove = true; o.subsection.anonymous = true; - o.subsection.addremove = false; + o.subsection.sortable = true; so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so.rmempty = false; so = o.subsection.option(form.ListValue, 'type', _('Type')); - so.readonly = true; so.value('default-nameserver'); so.value('proxy-server-nameserver'); + so.value('direct-nameserver'); so.value('nameserver'); so.value('fallback'); @@ -466,8 +474,9 @@ return view.extend({ o.retain = true; o.depends('dns_nameserver_policy', '1'); - o.subsection.anonymous = true; o.subsection.addremove = true; + o.subsection.anonymous = true; + o.subsection.sortable = true; so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so.rmempty = false; @@ -503,7 +512,7 @@ return view.extend({ o.rmempty = false; o = s.taboption('geox', form.Value, 'geox_update_interval', _('GeoX Update Interval'), _('Hour')); - o.datatype = 'integer'; + o.datatype = 'uinteger'; o.placeholder = '24'; o.retain = true; o.depends('geox_auto_update', '1'); diff --git a/mihomo/Makefile b/mihomo/Makefile index a3e45bc9..66adec5d 100644 --- a/mihomo/Makefile +++ b/mihomo/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git -PKG_SOURCE_DATE:=2024-10-08 -PKG_SOURCE_VERSION:=08dcef80bf9a528d36cf8d516cc251f6449f9336 -PKG_MIRROR_HASH:=803fd00529f3bb01617cc6349343858f73b2c6b4d533e8d76434941af7908395 +PKG_SOURCE_DATE:=2024-10-12 +PKG_SOURCE_VERSION:=ca3f1ebae6b71c2224987f1cf7828cf1338d5509 +PKG_MIRROR_HASH:=0c53892f20a8a4860565c58508c2a02bc6351bbd68a781bbe4b64e491e6762ce PKG_LICENSE:=MIT PKG_MAINTAINER:=Joseph Mory