From 71afedffa34b6cd268a1eb3a3a90df9a665a3c4b Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:43:54 +0800 Subject: [PATCH 1/3] luci-app-adguardhome: fix typo --- luci-app-adguardhome/root/etc/init.d/AdGuardHome | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luci-app-adguardhome/root/etc/init.d/AdGuardHome b/luci-app-adguardhome/root/etc/init.d/AdGuardHome index 32ab310c..1196c813 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 } From 700f703d8e1e3e6811f835d66fc06cb34ceac230 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:45:55 +0800 Subject: [PATCH 2/3] luci-app-adguardhome: adapter luci-theme-openwrt-2020 theme --- luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua b/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua index 0bd24446..923d9f37 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 From d35b7307f457137419140f8070ad6b6a36a6a7c1 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:46:47 +0800 Subject: [PATCH 3/3] luci-app-adguardhome: adapter luci-theme-openwrt-2020 theme --- luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm b/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm index 639cb998..cd9854a1 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%>