[script] DNS over QUIC


Small script to add DoQ support if you have no ADH. It can be done manually, but I think script will be better :stuck_out_tongue_winking_eye:

GitHub page


It is redundant for devices with Adguard Home, but should not harm you.


echo "Choose an action:"
echo "1) Install DNS over QUIC"
echo "2) Uninstall DNS over QUIC"
read -p "Enter your choice (1 or 2): " choice

case $choice in
        echo "Installation selected."
        read -p "Enter the DNS over QUIC server name: " doq_server
        opkg update
        opkg install quiche
        echo "server=${doq_server}#53" >> /etc/dnsmasq.conf
        /etc/init.d/dnsmasq enable
        /etc/init.d/dnsmasq restart
        echo "DNS over QUIC setup completed with server ${doq_server}."
        echo "Uninstallation selected."
        sed -i '/^server=/d' /etc/dnsmasq.conf
        opkg remove quiche
        /etc/init.d/dnsmasq disable
        /etc/init.d/dnsmasq stop
        echo "DNS over QUIC setup removed."
        echo "Invalid choice. Exiting."
        exit 1

How to use it?

Run this commands on your host machine (NOT router):

nano doq.sh

Paste code from above (or use v1 if you want) and save file.

scp -O -r doq.sh root@

Enter password

ssh root@

Enter password again

cd /tmp

You will have to use AdGuard Home as your local DNS proxy.
Set it up on your router and set quic://dns.adguard-dns.com as upstream DNS.

You can disable filtering completely if you don’t need this feature.

UPD: added GitHub page