Files
op-packages/luci-app-adguardhome

luci-app-adguardhome

(Modified version based on the official source code)

Overview of changes

  • Migrate from lua to luci standard js
  • Add a global switch
  • Add the UI interface to create/modify AGH password function
  • Add UI interface to modify AGH management binding ip:port function
  • You can choose AGH as dnsmasq upstream, redirect 53 port, switch dnsmasq 53 port or do nothing
  • Update the kernel to choose the Latest/Beta version, download from AGH mirror station/AGH github station
  • When updating the kernel, you can choose the Latest/Beta version, and to download from AGH mirror station/AGH github station.
  • Dynamically obtain WAN interface passed to nft rules

Default behaviors

Tip

Use the following rules to exclude inbound traffic from WAN to avoid exposing the router to !!️ Public Parser!!️

This function is only effective in "Redirect" mode.

iifname { __WAN_EXCLUDES__ } return

The rest of the 53 port traffic that matches the target is local will be redirected to the listening port of AdGuard Home

fib daddr type local udp dport 53 redirect to :__AGH_PORT__
fib daddr type local tcp dport 53 redirect to :__AGH_PORT__

Caution

Only suitable for the OpenWRT official version, and questions generated by third parties will not be answered

Only nftables is supported, the one is still using iptables may have problems

The device name can be viewed through ip a / ifconfig

Attribution

Reference

Acknowledgment

Inspired by

Notice

If the author of the original code has any objections, please contact me to deal with it.