https://github.com/fernvenue/dns-upstream
A pure shell to download, validate, and configure upstream DNS servers for dnsproxy, AdGuardHome.
https://github.com/fernvenue/dns-upstream
adguardhome dns dns-over-http3 dns-over-https dns-over-tls dns-upstream dnsproxy doh doq dot sdns upstream
Last synced: 3 months ago
JSON representation
A pure shell to download, validate, and configure upstream DNS servers for dnsproxy, AdGuardHome.
- Host: GitHub
- URL: https://github.com/fernvenue/dns-upstream
- Owner: fernvenue
- License: gpl-3.0
- Created: 2021-06-11T09:35:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-09-13T21:35:44.000Z (3 months ago)
- Last Synced: 2025-09-13T22:09:49.974Z (3 months ago)
- Topics: adguardhome, dns, dns-over-http3, dns-over-https, dns-over-tls, dns-upstream, dnsproxy, doh, doq, dot, sdns, upstream
- Language: Shell
- Homepage:
- Size: 47.9 KB
- Stars: 51
- Watchers: 1
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DNS Upstream
[](./LICENSE)
[](https://github.com/fernvenue/dns-upstream)
A pure shell to download, validate, and configure upstream DNS servers for [dnsproxy](https://github.com/AdguardTeam/dnsproxy), [AdGuardHome](https://github.com/AdguardTeam/AdGuardHome).
## Features
- [x] Download and validate upstream DNS configuration files;
- [x] Support multiple DNS server formats (IPv4, IPv6, UDP, TCP, TLS, HTTPS, HTTP/3, QUIC, SDNS);
- [x] Domain-specific DNS server configuration with [/domain/]dns syntax;
- [x] Custom DNS server replacement for domain-specific entries;
- [x] Multiple upstream source support (command line, environment variables, local files);
- [x] Configurable logging levels (debug, info, warn, error);
- [x] Systemd service integration with automatic restart capability;
- [x] Built-in validation for all DNS server configurations;
- [x] Flexible output file configuration for AdGuardHome integration.
- [x] Telegram notification support.
## Usage
Download script:
```bash
curl -o /usr/local/bin/dns-upstream.sh https://raw.githubusercontent.com/fernvenue/dns-upstream/master/dns-upstream.sh
```
Give execute permissions:
```bash
chmod +x /usr/local/bin/dns-upstream.sh
```
Download systemd service and timer templates:
```bash
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.timer
```
Customize the service and timer files if needed, then enable and start the timer:
```bash
systemctl enable dns-upstream.timer --now
systemctl status dns-upstream.timer
```
## Links
- [AdguardTeam/dnsproxy](https://github.com/AdguardTeam/dnsproxy)
- [AdguardTeam/AdGuardHome](https://github.com/AdguardTeam/AdGuardHome)