luci: remove redirect feature and set as main dns server automatically when port is 53

This commit is contained in:
Nick Peng
2022-08-31 00:58:31 +08:00
parent 7b3dcd31f9
commit e6d533e2c5
10 changed files with 1198 additions and 1280 deletions

View File

@@ -6,23 +6,6 @@ XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "smartdns", "stat
var links = "";
if (data.running) {
links = '<b><font color=green>SmartDNS - <%:RUNNING%></font></b></em>';
if (data.redirect) {
if (data.redirect == 1) {
if (data.ipv4_works == 0) {
links += "<br></br><b><font color=red><%:IPV4 53 Port Redirect Failure%></font></b>"
}
if (data.ipv6_works != 2) {
if (data.ipv6_works == 0) {
links += "<br></br><b><font color=red><%:IPV6 53 Port Redirect Failure%></font></b>"
}
}
} else if (data.redirect == 2) {
if (data.dnsmasq_forward == 0) {
links += "<br></br><b><font color=red><%:Dnsmasq Forwared To Smartdns Failure%></font></b>"
}
}
}
} else {
links = '<b><font color=red>SmartDNS - <%:NOT RUNNING%></font></b>';
}