mirror of
https://github.com/coolsnowwolf/luci
synced 2025-01-08 11:27:28 +08:00
luci-app-turboacc: add fullcone mode 2 support
This commit is contained in:
parent
3c87b2c04d
commit
c7fb30534a
@ -47,11 +47,12 @@ 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 = s:option(ListValue, "fullcone_nat", translate("FullCone NAT"))
|
||||
fullcone_nat.default = 0
|
||||
fullcone_nat:value("0", translate("Disable"))
|
||||
fullcone_nat:value("1", translate("Compatible Mode"))
|
||||
fullcone_nat:value("2", translate("High Performing Mode"))
|
||||
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"))
|
||||
|
@ -24,7 +24,6 @@ inital_conf(){
|
||||
[ -e "/lib/modules/$(uname -r)/mtkhnat.ko" ] && { sw_flow="0"; hw_flow="1"; }
|
||||
[ ! -e "/lib/modules/$(uname -r)/xt_FLOWOFFLOAD.ko" ] && { sw_flow="0"; hw_flow="0"; }
|
||||
[ ! -e "/lib/modules/$(uname -r)/tcp_bbr.ko" ] && bbr_cca="0"
|
||||
[ ! -e "/lib/modules/$(uname -r)/xt_FULLCONENAT.ko" ] && fullcone_nat="0"
|
||||
}
|
||||
|
||||
start_pdnsd() {
|
||||
@ -349,8 +348,11 @@ check_status(){
|
||||
fi
|
||||
;;
|
||||
"fullconenat")
|
||||
[ "$(cat "/sys/module/xt_FULLCONENAT/refcnt" 2>"/dev/null" || echo 0)" -ne "0" ] && \
|
||||
exit 0 || exit 1
|
||||
if [ -z "$(iptables -t nat -L zone_wan_postrouting | grep -i fullcone)" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
"bbr")
|
||||
[ "x$(cat "/proc/sys/net/ipv4/tcp_congestion_control" 2>"/dev/null")" = "xbbr" ] && \
|
||||
|
Loading…
Reference in New Issue
Block a user