luci: support bind device option

This commit is contained in:
Nick Peng
2023-01-05 23:36:17 +08:00
parent 5a3f53b487
commit 3b680f9455
5 changed files with 73 additions and 6 deletions

View File

@@ -25,6 +25,12 @@ msgstr "自动设置Dnsmasq"
msgid "Automatically set as upstream of dnsmasq when port changes."
msgstr "自动设置为Dnsmasq的上游服务器"
msgid "Bind Device"
msgstr "绑定到设备"
msgid "Bind Device Name"
msgstr "绑定的设备名称"
msgid "Cache Size"
msgstr "缓存大小"
@@ -227,6 +233,9 @@ msgstr "包含配置文件,路径为/etc/smartdns/conf.d或自定义配置
msgid "List of files to download."
msgstr "下载的文件列表。"
msgid "Listen only on the specified interfaces."
msgstr "监听在指定的设备上避免非网络的DNS查询请求。"
msgid "Local Port"
msgstr "本地端口"
@@ -242,6 +251,9 @@ msgstr "所有域名的最大 TTL 值。"
msgid "Minimum TTL for all domain result."
msgstr "所有域名的最小 TTL 值。"
msgid "Name of device name listen on."
msgstr "绑定的设备名称。"
msgid "NFTset Name"
msgstr "NFTSet名称"

View File

@@ -117,6 +117,20 @@ o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "1"
end
---- bind to device;
o = s:taboption("advanced", Flag, "bind_device", translate("Bind Device"), translate("Listen only on the specified interfaces."))
o.rmempty = false
o.default = o.enabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "1"
end
---- bind device name;
o = s:taboption("advanced", Value, "bind_device_name", translate("Bind Device Name"), translate("Name of device name listen on."))
o.placeholder = "default"
o.rempty = true
o.datatype = "string"
---- Support DualStack ip selection
o = s:taboption("advanced", Flag, "dualstack_ip_selection", translate("Dual-stack IP Selection"), translate("Enable IP selection between IPV4 and IPV6"))
o.rmempty = false