feature: support ipset, nftset for bind option
This commit is contained in:
@@ -431,6 +431,44 @@ return view.extend({
|
||||
o.rmempty = false;
|
||||
o.default = o.disabled;
|
||||
|
||||
o = s.taboption("seconddns", form.Value, "seconddns_ipset_name", _("IPset Name"), _("IPset name."));
|
||||
o.rmempty = true;
|
||||
o.datatype = "string";
|
||||
o.rempty = true;
|
||||
o.validate = function (section_id, value) {
|
||||
if (value == "") {
|
||||
return true;
|
||||
}
|
||||
|
||||
var ipset = value.split(",")
|
||||
for (var i = 0; i < ipset.length; i++) {
|
||||
if (!ipset[i].match(/^(#[4|6]:)?[a-zA-Z0-9\-_]+$/)) {
|
||||
return _("ipset name format error, format: [#[4|6]:]ipsetname");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
o = s.taboption("seconddns", form.Value, "seconddns_nftset_name", _("NFTset Name"), _("NFTset name, format: [#[4|6]:[family#table#set]]"));
|
||||
o.rmempty = true;
|
||||
o.datatype = "string";
|
||||
o.rempty = true;
|
||||
o.validate = function (section_id, value) {
|
||||
if (value == "") {
|
||||
return true;
|
||||
}
|
||||
|
||||
var nftset = value.split(",")
|
||||
for (var i = 0; i < nftset.length; i++) {
|
||||
if (!nftset[i].match(/^#[4|6]:[a-zA-Z0-9\-_]+#[a-zA-Z0-9\-_]+#[a-zA-Z0-9\-_]+$/)) {
|
||||
return _("NFTset name format error, format: [#[4|6]:[family#table#set]]");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////
|
||||
// DNS64 Settings
|
||||
///////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user