From 423208e0896b37c16a2a2719790ced20b44e9d0e Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Mon, 10 Mar 2025 04:19:32 +0800 Subject: [PATCH] update 2025-03-10 04:19:32 --- dnsmasq/files/dnsmasq.init | 12 ++++++++++-- .../luci-static/resources/view/fchomo/client.js | 5 +++++ .../htdocs/luci-static/resources/view/fchomo/node.js | 3 +++ .../luci-static/resources/view/fchomo/ruleset.js | 3 ++- .../luci-static/resources/view/fchomo/server.js | 1 + 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/dnsmasq/files/dnsmasq.init b/dnsmasq/files/dnsmasq.init index b864ea906..e9afcc78d 100755 --- a/dnsmasq/files/dnsmasq.init +++ b/dnsmasq/files/dnsmasq.init @@ -226,6 +226,14 @@ append_interface_name() { xappend "--interface-name=$1,$2" } +append_filter_rr() { + xappend "--filter-rr=$1" +} + +append_cache_rr() { + xappend "--cache-rr=$1" +} + filter_dnsmasq() { local cfg="$1" func="$2" match_cfg="$3" found_cfg @@ -1000,8 +1008,8 @@ dnsmasq_start() # deprecate or remove filter-X in favor of filter-rr? append_bool "$cfg" filter_aaaa "--filter-AAAA" append_bool "$cfg" filter_a "--filter-A" - append_parm "$cfg" filter_rr "--filter-rr" - append_parm "$cfg" cache_rr "--cache-rr" + config_list_foreach "$cfg" filter_rr append_filter_rr + config_list_foreach "$cfg" cache_rr append_cache_rr append_parm "$cfg" logfacility "--log-facility" config_get logfacility "$cfg" "logfacility" diff --git a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/client.js b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/client.js index e8c035762..ff0f59056 100644 --- a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/client.js +++ b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/client.js @@ -616,6 +616,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('Proxy Group'), _('Add a proxy group') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = true; ss.tab('field_general', _('General fields')); @@ -822,6 +823,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('Routing rule'), _('Add a routing rule') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = false; so = ss.option(form.Value, 'label', _('Label')); @@ -872,6 +874,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('Sub rule'), _('Add a sub rule') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = false; so = ss.option(form.Value, 'label', _('Label')); @@ -957,6 +960,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('DNS server'), _('Add a DNS server') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = true; so = ss.option(form.Value, 'label', _('Label')); @@ -1096,6 +1100,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('DNS policy'), _('Add a DNS policy') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = false; so = ss.option(form.Value, 'label', _('Label')); diff --git a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js index cfbd31115..b9e606718 100644 --- a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js +++ b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js @@ -33,6 +33,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('Node'), _('Add a Node') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = true; ss.tab('field_general', _('General fields')); @@ -813,6 +814,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('Provider'), _('Add a provider') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = false; /* Remove idle files start */ ss.renderSectionAdd = function(/* ... */) { @@ -1103,6 +1105,7 @@ return view.extend({ ss.nodescriptions = true; ss.hm_modaltitle = [ _('Proxy chain'), _('Add a proxy chain') ]; ss.hm_prefmt = hm.glossary[ss.sectiontype].prefmt; + ss.hm_field = hm.glossary[ss.sectiontype].field; ss.hm_lowcase_only = true; so = ss.option(form.Value, 'label', _('Label')); diff --git a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/ruleset.js b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/ruleset.js index a775485d7..7078c873f 100644 --- a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/ruleset.js +++ b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/ruleset.js @@ -144,11 +144,12 @@ return view.extend({ s.nodescriptions = true; s.hm_modaltitle = [ _('Rule set'), _('Add a rule set') ]; s.hm_prefmt = hm.glossary[s.sectiontype].prefmt; + s.hm_field = hm.glossary[s.sectiontype].field; s.hm_lowcase_only = false; /* Import mihomo config and Import rule-set links and Remove idle files start */ s.handleYamlImport = function() { - const field = hm.glossary[s.sectiontype].field; const section_type = this.sectiontype; + const field = this.hm_field; const o = new hm.handleImport(this.map, this, _('Import mihomo config'), _('Please type %s fields of mihomo config.
') .format(field)); diff --git a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/server.js b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/server.js index 917f33974..d3a131ece 100644 --- a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/server.js +++ b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/server.js @@ -61,6 +61,7 @@ return view.extend({ s.nodescriptions = true; s.hm_modaltitle = [ _('Server'), _('Add a server') ]; s.hm_prefmt = hm.glossary[s.sectiontype].prefmt; + s.hm_field = hm.glossary[s.sectiontype].field; s.hm_lowcase_only = false; s.tab('field_general', _('General fields'));