diff --git a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua b/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua index 0bd244465..923d9f37d 100644 --- a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua +++ b/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua @@ -54,7 +54,7 @@ o = s:option(Button, "restart", translate("Upgrade Core")) o.inputtitle=translate("Update core version") o.template = "AdGuardHome/AdGuardHome_check" o.showfastconfig=(not fs.access(configpath)) -o.description = string.format(translate("Current core version:") .. "%s ", e) +o.description = string.format(translate("Current core version:") .. "%s ", e) ---- port warning not safe local port=luci.sys.exec("awk '/ port:/{printf($2);exit;}' "..configpath.." 2>nul") if (port=="") then port="?" end diff --git a/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm b/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm index 639cb9988..cd9854a16 100644 --- a/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm +++ b/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm @@ -33,7 +33,7 @@ <%fs=require"nixio.fs"%> <%if fs.access("/tmp/AdGuardHometmpconfig.yaml") then%> - + <%end%> - -<%+cbi/valuefooter%> \ No newline at end of file + +<%+cbi/valuefooter%> diff --git a/luci-app-adguardhome/root/etc/init.d/AdGuardHome b/luci-app-adguardhome/root/etc/init.d/AdGuardHome index 32ab310c6..1196c813d 100644 --- a/luci-app-adguardhome/root/etc/init.d/AdGuardHome +++ b/luci-app-adguardhome/root/etc/init.d/AdGuardHome @@ -91,9 +91,9 @@ EOF for IP in $IPS do if [ "$tcp_server" == "1" ]; then - $ipt -t nat -A PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 + $ipt6 -t nat -A PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 fi - $ipt -t nat -A PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 + $ipt6 -t nat -A PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 done } @@ -119,8 +119,8 @@ EOF IPS="`ifconfig | grep "inet6 addr" | grep -v " fe80::" | grep -v " ::1" | grep "Global" | awk '{print $3}'`" for IP in $IPS do - $ipt -t nat -D PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 - $ipt -t nat -D PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 + $ipt6 -t nat -D PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 + $ipt6 -t nat -D PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 done }