diff --git a/package/luci/files/luci/i18n/smartdns.zh-cn.po b/package/luci/files/luci/i18n/smartdns.zh-cn.po index 9009833..058b3eb 100644 --- a/package/luci/files/luci/i18n/smartdns.zh-cn.po +++ b/package/luci/files/luci/i18n/smartdns.zh-cn.po @@ -184,8 +184,38 @@ msgstr "启用IPV6服务器。" msgid "Enable TCP DNS Server" msgstr "启用TCP服务器。" -msgid "Enable daily auto update." -msgstr "启用每日自动更新" +msgid "Enable daily (weekly) auto update." +msgstr "启用每日(每周)自动更新" + +msgid "Update time (every day)" +msgstr "更新时间(每天)" + +msgid "Update Time (Every Week)" +msgstr "更新时间(每周)" + +msgid "Every Day" +msgstr "每天" + +msgid "Every Monday" +msgstr "每周一" + +msgid "Every Tuesday" +msgstr "每周二" + +msgid "Every Wednesday" +msgstr "每周三" + +msgid "Every Thursday" +msgstr "每周四" + +msgid "Every Friday" +msgstr "每周五" + +msgid "Every Saturday" +msgstr "每周六" + +msgid "Every Sunday" +msgstr "每周日" msgid "Enable domain prefetch, accelerate domain response speed." msgstr "启用域名预加载,加速域名响应速度。" @@ -349,6 +379,9 @@ msgstr "无" msgid "Only socks5 proxy support udp server." msgstr "仅SOCKS5代理支持UDP服务器。" +msgid "Please check the system logs and check if the configuration is valid." +msgstr "请检查系统日志,并检查配置是否合法。" + msgid "Please set proxy server first." msgstr "请先设置代理服务器。" diff --git a/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js b/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js index 91d7d09..a3f264c 100644 --- a/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js +++ b/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js @@ -58,12 +58,17 @@ function smartdnsRenderStatus(res) { var autoSetDnsmasq = uci.get_first('smartdns', 'smartdns', 'auto_set_dnsmasq'); var smartdnsPort = uci.get_first('smartdns', 'smartdns', 'port'); + var smartdnsEnable = uci.get_first('smartdns', 'smartdns', 'enabled'); var dnsmasqServer = uci.get_first('dhcp', 'dnsmasq', 'server'); if (isRunning) { renderHTML += "SmartDNS - " + _("RUNNING") + ""; } else { renderHTML += "SmartDNS - " + _("NOT RUNNING") + ""; + if (smartdnsEnable === '1') { + renderHTML += "
" + _("Please check the system logs and check if the configuration is valid."); + renderHTML += ""; + } return renderHTML; } @@ -79,7 +84,6 @@ function smartdnsRenderStatus(res) { return renderHTML; } - return view.extend({ load: function () { return Promise.all([ @@ -156,7 +160,7 @@ return view.extend({ o.default = 53; o.datatype = "port"; o.rempty = false; - + // auto-conf-dnsmasq; o = s.taboption("settings", form.Flag, "auto_set_dnsmasq", _("Automatically Set Dnsmasq"), _("Automatically set as upstream of dnsmasq when port changes.")); o.rmempty = false; @@ -220,6 +224,30 @@ return view.extend({ o.rmempty = false; o.default = o.enabled; + // Enable DOT server; + o = s.taboption("advanced", form.Flag, "tls_server", _("DOT Server"), _("Enable DOT DNS Server")); + o.rmempty = false; + o.default = o.disabled; + + o = s.taboption("advanced", form.Value, "tls_server_port", _("DOT Server Port"), _("Smartdns DOT server port.")); + o.placeholder = 853; + o.default = 853; + o.datatype = "port"; + o.rempty = false; + o.depends('tls_server', '1'); + + // Enable DOH server; + o = s.taboption("advanced", form.Flag, "doh_server", _("DOH Server"), _("Enable DOH DNS Server")); + o.rmempty = false; + o.default = o.disabled; + + o = s.taboption("advanced", form.Value, "doh_server_port", _("DOH Server Port"), _("Smartdns DOH server port.")); + o.placeholder = 443; + o.default = 443; + o.datatype = "port"; + o.rempty = false; + o.depends('https_server', '1'); + // Support IPV6; o = s.taboption("advanced", form.Flag, "ipv6_server", _("IPV6 Server"), _("Enable IPV6 DNS Server")); o.rmempty = false; @@ -279,7 +307,7 @@ return view.extend({ o.default = o.enabled; // Ipset no speed. - o = s.taboption("advanced", form.Value, "ipset_no_speed", _("No Speed IPset Name"), + o = s.taboption("advanced", form.Value, "ipset_no_speed", _("No Speed IPset Name"), _("Ipset name, Add domain result to ipset when speed check fails.")); o.rmempty = true; o.datatype = "string"; @@ -300,7 +328,7 @@ return view.extend({ } // NFTset no speed. - o = s.taboption("advanced", form.Value, "nftset_no_speed", _("No Speed NFTset Name"), + o = s.taboption("advanced", form.Value, "nftset_no_speed", _("No Speed NFTset Name"), _("Nftset name, Add domain result to nftset when speed check fails, format: [#[4|6]:[family#table#set]]")); o.rmempty = true; o.datatype = "string"; @@ -343,7 +371,7 @@ return view.extend({ o.rempty = true; // other args - o = s.taboption("advanced", form.Value, "server_flags", _("Additional Server Args"), + o = s.taboption("advanced", form.Value, "server_flags", _("Additional Server Args"), _("Additional server args, refer to the help description of the bind option.")) o.default = "" o.rempty = true @@ -476,7 +504,7 @@ return view.extend({ } // other args - o = s.taboption("seconddns", form.Value, "seconddns_server_flags", _("Additional Server Args"), + o = s.taboption("seconddns", form.Value, "seconddns_server_flags", _("Additional Server Args"), _("Additional server args, refer to the help description of the bind option.")) o.default = "" o.rempty = true @@ -492,11 +520,29 @@ return view.extend({ /////////////////////////////////////// // download Files Settings /////////////////////////////////////// - o = s.taboption("files", form.Flag, "enable_auto_update", _("Enable Auto Update"), _("Enable daily auto update.")); + o = s.taboption("files", form.Flag, "enable_auto_update", _("Enable Auto Update"), _("Enable daily (weekly) auto update.")); o.rmempty = true; o.default = o.disabled; o.rempty = true; + o = s.taboption("files", form.ListValue, "auto_update_week_time", _("Update Time (Every Week)")); + o.value('*', _('Every Day')); + o.value('1', _('Every Monday')); + o.value('2', _('Every Tuesday')); + o.value('3', _('Every Wednesday')); + o.value('4', _('Every Thursday')); + o.value('5', _('Every Friday')); + o.value('6', _('Every Saturday')); + o.value('0', _('Every Sunday')); + o.default = "*"; + o.depends('enable_auto_update', '1'); + + o = s.taboption('files', form.ListValue, 'auto_update_day_time', _("Update time (every day)")); + for (var i = 0; i < 24; i++) + o.value(i, i + ':00'); + o.default = '5'; + o.depends('enable_auto_update', '1'); + o = s.taboption("files", form.FileUpload, "upload_conf_file", _("Upload Config File"), _("Upload smartdns config file to /etc/smartdns/conf.d")); o.rmempty = true