A pure shell to download, validate, and configure upstream DNS servers for dnsproxy, AdGuardHome.
- Download and validate upstream DNS configuration files;
- Support multiple DNS server formats (IPv4, IPv6, UDP, TCP, TLS, HTTPS, HTTP/3, QUIC, SDNS);
- Domain-specific DNS server configuration with [/domain/]dns syntax;
- Custom DNS server replacement for domain-specific entries;
- Multiple upstream source support (command line, environment variables, local files);
- Configurable logging levels (debug, info, warn, error);
- Systemd service integration with automatic restart capability;
- Built-in validation for all DNS server configurations;
- Flexible output file configuration for AdGuardHome integration.
- Telegram notification support.
Download script:
curl -o /usr/local/bin/dns-upstream.sh https://raw.githubusercontent.com/fernvenue/dns-upstream/master/dns-upstream.shGive execute permissions:
chmod +x /usr/local/bin/dns-upstream.shDownload systemd service and timer templates:
curl -o /etc/systemd/system/dns-upstream.service https://raw.githubusercontent.com/fernvenue/dns-upstream/master/dns-upstream.service
curl -o /etc/systemd/system/dns-upstream.timer https://raw.githubusercontent.com/fernvenue/dns-upstream/master/dns-upstream.timerCustomize the service and timer files if needed, then enable and start the timer:
systemctl enable dns-upstream.timer --now
systemctl status dns-upstream.timer