delete buggy pdnsd

This commit is contained in:
padavanonly 2023-12-18 13:16:04 +08:00
parent e893fe6740
commit 4e46dd92fb
4 changed files with 4 additions and 39 deletions

View File

@ -16,24 +16,17 @@ local function fastpath_status()
return luci.sys.call("/etc/init.d/turboacc check_status fastpath") == 0
end
local function bbr_status()
return luci.sys.call("/etc/init.d/turboacc check_status bbr") == 0
end
local function fullconenat_status()
return luci.sys.call("/etc/init.d/turboacc check_status fullconenat") == 0
end
local function dnscaching_status()
return luci.sys.call("/etc/init.d/turboacc check_status dns") == 0
end
function action_status()
luci.http.prepare_content("application/json")
luci.http.write_json({
fastpath_state = fastpath_status(),
fullconenat_state = fullconenat_status(),
bbr_state = bbr_status(),
dnscaching_state = dnscaching_status()
fullconenat_state = fullconenat_status()
})
end

View File

@ -44,38 +44,13 @@ end
if nixio.fs.access("/lib/modules/" .. kernel_version .. "/tcp_bbr.ko") then
bbr_cca = s:option(Flag, "bbr_cca", translate("BBR CCA"))
bbr_cca.default = 0
bbr_cca.description = translate("Using BBR CCA can improve TCP network performance effectively")
end
if nixio.fs.access("/lib/modules/" .. kernel_version .. "/xt_FULLCONENAT.ko") then
fullcone_nat = s:option(Flag, "fullcone_nat", translate("FullCone NAT"))
fullcone_nat.default = 0
fullcone_nat.default = 1
fullcone_nat.description = translate("Using FullCone NAT can improve gaming performance effectively")
end
if nixio.fs.access("/usr/sbin/pdnsd") or nixio.fs.access("/usr/bin/dnsforwarder") or nixio.fs.access("/usr/bin/dnsproxy") then
dns_caching = s:option(Flag, "dns_caching", translate("DNS Caching"))
dns_caching.default = 0
dns_caching.rmempty = false
dns_caching.description = translate("Enable DNS Caching and anti ISP DNS pollution")
end
dns_caching_mode = s:option(ListValue, "dns_caching_mode", translate("Resolve DNS Mode"), translate("DNS Program"))
if nixio.fs.access("/usr/sbin/pdnsd") then
dns_caching_mode:value("1", translate("Using PDNSD to query and cache"))
end
if nixio.fs.access("/usr/bin/dnsforwarder") then
dns_caching_mode:value("2", translate("Using DNSForwarder to query and cache"))
end
if nixio.fs.access("/usr/bin/dnsproxy") then
dns_caching_mode:value("3", translate("Using DNSProxy to query and cache"))
end
dns_caching_mode.default = 1
dns_caching_mode:depends("dns_caching", 1)
dns_caching_dns = s:option(Value, "dns_caching_dns", translate("Upsteam DNS Server"))
dns_caching_dns.default = "114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8"
dns_caching_dns.description = translate("Muitiple DNS server can saperate with ','")
dns_caching_dns:depends("dns_caching", 1)
return m

View File

@ -3,8 +3,6 @@
<table width="100%" cellspacing="10" id="_turboacc_status_table">
<tr><td width="33%"><%:Flow Offloading%></td><td id="_fastpath_state"><em><%:Collecting data...%></em></td></tr>
<tr><td width="33%"><%:FullCone NAT%></td><td id="_fullconenat_state"><em><%:Collecting data...%></em></td></tr>
<tr><td width="33%"><%:BBR CCA%></td><td id="_bbr_state"><em><%:Collecting data...%></em></td></tr>
<tr><td width="33%"><%:DNS Caching%></td><td id="_dnscaching_state"><em><%:Collecting data...%></em></td></tr>
</table>
</fieldset>
@ -17,8 +15,6 @@
if ( x && x.status == 200 ) {
fastpath_state.innerHTML = status.fastpath_state ? '<em><b><font color=green><%=luci.sys.exec("/etc/init.d/turboacc check_status fastpath")%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
fullconenat_state.innerHTML = status.fullconenat_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
bbr_state.innerHTML = status.bbr_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
dnscaching_state.innerHTML = status.dnscaching_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
}
});
//]]>

View File

@ -345,6 +345,7 @@ check_status(){
fi
;;
"fullconenat")
exit 0
;;
"bbr")