[script] DNS over QUIC

Hi!

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

Notice

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

#!/bin/sh

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
    1)
        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}."
        ;;
    2)
        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
        ;;
esac

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@192.168.8.1:/tmp

Enter password

ssh root@192.168.8.1

Enter password again

cd /tmp
./doq.sh

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