conf: support disable expired cache on specific domain.
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
msgid "Additional Args for upstream dns servers"
|
||||
msgstr "额外的上游 DNS 服务器参数"
|
||||
|
||||
msgid "Additional Rule Flag"
|
||||
msgstr "额外规则标识"
|
||||
|
||||
msgid "Additional Flags for rules, read help on domain-rule for more information."
|
||||
msgstr "额外的规则标识,具体参考domain-rule的帮助说明。"
|
||||
|
||||
msgid "Additional Server Args"
|
||||
msgstr "额外的服务器参数"
|
||||
|
||||
|
||||
@@ -448,6 +448,12 @@ function o.validate(self, value)
|
||||
return nil, translate("NFTset name format error, format: [#[4|6]:[family#table#set]]")
|
||||
end
|
||||
|
||||
---- other args
|
||||
o = s:taboption("forwarding", Value, "addition_flag", translate("Additional Rule Flag"), translate("Additional Flags for rules, read help on domain-rule for more information."))
|
||||
o.default = ""
|
||||
o.rempty = true
|
||||
o.modalonly = true;
|
||||
|
||||
o = s:taboption("forwarding", FileUpload, "forwarding_domain_set_file", translate("Domain List File"),
|
||||
translate("Upload domain list file, or configure auto download from Download File Setting page."))
|
||||
o.rmempty = true
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
msgid "Additional Args for upstream dns servers"
|
||||
msgstr "额外的上游 DNS 服务器参数"
|
||||
|
||||
msgid "Additional Rule Flag"
|
||||
msgstr "额外规则标识"
|
||||
|
||||
msgid "Additional Flags for rules, read help on domain-rule for more information."
|
||||
msgstr "额外的规则标识,具体参考domain-rule的帮助说明。"
|
||||
|
||||
msgid "Additional Server Args"
|
||||
msgstr "额外的服务器参数"
|
||||
|
||||
|
||||
@@ -664,6 +664,13 @@ return view.extend({
|
||||
return true;
|
||||
}
|
||||
|
||||
// other args
|
||||
o = s.taboption("forwarding", form.Value, "addition_flag", _("Additional Rule Flag"),
|
||||
_("Additional Flags for rules, read help on domain-rule for more information."))
|
||||
o.default = ""
|
||||
o.rempty = true
|
||||
o.modalonly = true;
|
||||
|
||||
o = s.taboption("forwarding", form.FileUpload, "forwarding_domain_set_file", _("Domain List File"),
|
||||
_("Upload domain list file, or configure auto download from Download File Setting page."));
|
||||
o.rmempty = true
|
||||
@@ -861,6 +868,13 @@ return view.extend({
|
||||
return true;
|
||||
}
|
||||
|
||||
// other args
|
||||
so = ss.option(form.Value, "addition_flag", _("Additional Rule Flag"),
|
||||
_("Additional Flags for rules, read help on domain-rule for more information."))
|
||||
so.default = ""
|
||||
so.rempty = true
|
||||
so.modalonly = true;
|
||||
|
||||
///////////////////////////////////////
|
||||
// IP Blacklist;
|
||||
///////////////////////////////////////
|
||||
|
||||
@@ -281,6 +281,9 @@ load_domain_rules()
|
||||
config_get nftset_name "$section" "nftset_name" ""
|
||||
[ ! -z "$nftset_name" ] && domain_set_args="$domain_set_args -nftset '$nftset_name'"
|
||||
|
||||
config_get addition_flag "$section" "addition_flag" ""
|
||||
[ ! -z "$addition_flag" ] && domain_set_args="$domain_set_args $addition_flag"
|
||||
|
||||
config_get forwarding_domain_set_file "$section" "forwarding_domain_set_file" ""
|
||||
[ ! -z "$forwarding_domain_set_file" ] && {
|
||||
conf_append "domain-set" "-name ${domain_set_name}-forwarding-file -file '$forwarding_domain_set_file'"
|
||||
@@ -336,6 +339,9 @@ load_domain_rule_list()
|
||||
config_get domain_list_file "$section" "domain_list_file" ""
|
||||
[ -z "$domain_list_file" ] && return
|
||||
|
||||
config_get addition_flag "$section" "addition_flag" ""
|
||||
[ ! -z "$addition_flag" ] && domain_set_args="$domain_set_args $addition_flag"
|
||||
|
||||
conf_append "domain-set" "-name domain-rule-list-${domain_set_name} -file '$domain_list_file'"
|
||||
conf_append "domain-rules" "/domain-set:domain-rule-list-${domain_set_name}/ $domain_set_args"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user