Skip to content

Commit

Permalink
Fix redirect port may display error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmozhijin committed Sep 30, 2023
1 parent 0bfd4ab commit 5d1bf40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luasrc/model/cbi/AdGuardHome/base.lua
Expand Up @@ -52,7 +52,7 @@ o.template = "AdGuardHome/AdGuardHome_check"
o.showfastconfig=(not fs.access(configpath))
o.description=string.format(translate("core version:").."<strong><font id=\"updateversion\" color=\"green\">%s </font></strong>",e)
---- port warning not safe
local port=luci.sys.exec("awk '/ port:/{printf($2);exit;}' "..configpath.." 2>nul")
local port=luci.sys.exec("awk '/^dns:/ {found_dns=1} found_dns && /^ port:/ {print $2; exit}' "..configpath.." 2>nul")
if (port=="") then port="?" end
---- Redirect
o = s:option(ListValue, "redirect", port..translate("Redirect"), translate("AdGuardHome redirect mode"))
Expand Down

0 comments on commit 5d1bf40

Please sign in to comment.