luci-app-mihomo: sync upstream

last commit: f0b2af8b5a
This commit is contained in:
gitea-action 2024-10-10 20:00:12 +08:00
parent c81528156a
commit 5538caa25c
2 changed files with 21 additions and 12 deletions

View File

@ -1,6 +1,6 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_VERSION:=1.8.5 PKG_VERSION:=1.8.6
LUCI_TITLE:=LuCI Support for mihomo LUCI_TITLE:=LuCI Support for mihomo
LUCI_DEPENDS:=+luci-base +mihomo LUCI_DEPENDS:=+luci-base +mihomo

View File

@ -232,6 +232,7 @@ return view.extend({
s = m.section(form.TableSection, 'subscription', _('Subscription Config')); s = m.section(form.TableSection, 'subscription', _('Subscription Config'));
s.addremove = true; s.addremove = true;
s.anonymous = true; s.anonymous = true;
s.sortable = true;
o = s.option(form.Value, 'name', _('Subscription Name')); o = s.option(form.Value, 'name', _('Subscription Name'));
o.rmempty = false; o.rmempty = false;
@ -241,7 +242,7 @@ return view.extend({
o.rmempty = false; o.rmempty = false;
o = s.option(form.Value, 'user_agent', _('User Agent')); o = s.option(form.Value, 'user_agent', _('User Agent'));
o.default = 'mihomo'; o.default = 'clash';
o.rmempty = false; o.rmempty = false;
o.width = '15%'; o.width = '15%';
o.value('mihomo'); o.value('mihomo');
@ -276,11 +277,11 @@ return view.extend({
o.rmempty = false; o.rmempty = false;
o = s.taboption('general', form.Value, 'tcp_keep_alive_idle', _('TCP Keep Alive Idle')); o = s.taboption('general', form.Value, 'tcp_keep_alive_idle', _('TCP Keep Alive Idle'));
o.datatype = 'integer'; o.datatype = 'uinteger';
o.placeholder = '600'; o.placeholder = '600';
o = s.taboption('general', form.Value, 'tcp_keep_alive_interval', _('TCP Keep Alive Interval')); o = s.taboption('general', form.Value, 'tcp_keep_alive_interval', _('TCP Keep Alive Interval'));
o.datatype = 'integer'; o.datatype = 'uinteger';
o.placeholder = '15'; o.placeholder = '15';
s.tab('external_control', _('External Control Config')); s.tab('external_control', _('External Control Config'));
@ -336,8 +337,9 @@ return view.extend({
o.retain = true; o.retain = true;
o.depends('authentication', '1'); o.depends('authentication', '1');
o.subsection.anonymous = true;
o.subsection.addremove = true; o.subsection.addremove = true;
o.subsection.anonymous = true;
o.subsection.sortable = true;
so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so = o.subsection.option(form.Flag, 'enabled', _('Enable'));
so.rmempty = false; so.rmempty = false;
@ -356,13 +358,16 @@ return view.extend({
o.value('mixed', 'Mixed'); o.value('mixed', 'Mixed');
o = s.taboption('tun', form.Value, 'tun_mtu', '*' + ' ' + _('MTU')); o = s.taboption('tun', form.Value, 'tun_mtu', '*' + ' ' + _('MTU'));
o.datatype = 'uinteger';
o.placeholder = '9000'; o.placeholder = '9000';
o = s.taboption('tun', form.Flag, 'tun_gso', '*' + ' ' + _('GSO')); o = s.taboption('tun', form.Flag, 'tun_gso', '*' + ' ' + _('GSO'));
o.rmempty = false; o.rmempty = false;
o = s.taboption('tun', form.Value, 'tun_gso_max_size', '*' + ' ' + _('GSO Max Size')); o = s.taboption('tun', form.Value, 'tun_gso_max_size', '*' + ' ' + _('GSO Max Size'));
o.datatype = 'uinteger';
o.placeholder = '65536'; o.placeholder = '65536';
o.retain = true;
o.depends('tun_gso', '1'); o.depends('tun_gso', '1');
o = s.taboption('tun', form.Flag, 'tun_endpoint_independent_nat', '*' + ' ' + _('Endpoint Independent NAT')); o = s.taboption('tun', form.Flag, 'tun_endpoint_independent_nat', '*' + ' ' + _('Endpoint Independent NAT'));
@ -374,12 +379,12 @@ return view.extend({
o.datatype = 'port'; o.datatype = 'port';
o.placeholder = '1053'; 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('normal', 'Normal');
o.value('fake-ip', 'Fake-IP'); o.value('fake-ip', 'Fake-IP');
o.value('redir-host', 'Redir-Host'); 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.datatype = 'cidr4';
o.placeholder = '198.18.0.1/16'; o.placeholder = '198.18.0.1/16';
o.retain = true; o.retain = true;
@ -395,6 +400,7 @@ return view.extend({
o.depends({ 'dns_mode': 'fake-ip', 'fake_ip_filter': '1' }); 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 = s.taboption('dns', form.ListValue, 'fake_ip_filter_mode', _('Fake-IP Filter Mode'))
o.retain = true;
o.value('blacklist', _('Block Mode')); o.value('blacklist', _('Block Mode'));
o.value('whitelist', _('Allow Mode')); o.value('whitelist', _('Allow Mode'));
o.depends({ 'dns_mode': 'fake-ip', 'fake_ip_filter': '1' }); o.depends({ 'dns_mode': 'fake-ip', 'fake_ip_filter': '1' });
@ -426,8 +432,9 @@ return view.extend({
o.retain = true; o.retain = true;
o.depends('hosts', '1'); o.depends('hosts', '1');
o.subsection.anonymous = true;
o.subsection.addremove = true; o.subsection.addremove = true;
o.subsection.anonymous = true;
o.subsection.sortable = true;
so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so = o.subsection.option(form.Flag, 'enabled', _('Enable'));
so.rmempty = false; so.rmempty = false;
@ -444,16 +451,17 @@ return view.extend({
o.retain = true; o.retain = true;
o.depends('dns_nameserver', '1'); o.depends('dns_nameserver', '1');
o.subsection.addremove = true;
o.subsection.anonymous = true; o.subsection.anonymous = true;
o.subsection.addremove = false; o.subsection.sortable = true;
so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so = o.subsection.option(form.Flag, 'enabled', _('Enable'));
so.rmempty = false; so.rmempty = false;
so = o.subsection.option(form.ListValue, 'type', _('Type')); so = o.subsection.option(form.ListValue, 'type', _('Type'));
so.readonly = true;
so.value('default-nameserver'); so.value('default-nameserver');
so.value('proxy-server-nameserver'); so.value('proxy-server-nameserver');
so.value('direct-nameserver');
so.value('nameserver'); so.value('nameserver');
so.value('fallback'); so.value('fallback');
@ -466,8 +474,9 @@ return view.extend({
o.retain = true; o.retain = true;
o.depends('dns_nameserver_policy', '1'); o.depends('dns_nameserver_policy', '1');
o.subsection.anonymous = true;
o.subsection.addremove = true; o.subsection.addremove = true;
o.subsection.anonymous = true;
o.subsection.sortable = true;
so = o.subsection.option(form.Flag, 'enabled', _('Enable')); so = o.subsection.option(form.Flag, 'enabled', _('Enable'));
so.rmempty = false; so.rmempty = false;
@ -503,7 +512,7 @@ return view.extend({
o.rmempty = false; o.rmempty = false;
o = s.taboption('geox', form.Value, 'geox_update_interval', _('GeoX Update Interval'), _('Hour')); o = s.taboption('geox', form.Value, 'geox_update_interval', _('GeoX Update Interval'), _('Hour'));
o.datatype = 'integer'; o.datatype = 'uinteger';
o.placeholder = '24'; o.placeholder = '24';
o.retain = true; o.retain = true;
o.depends('geox_auto_update', '1'); o.depends('geox_auto_update', '1');