Swiftdns tunnels your DNS-over-UDP queries over HTTPS for end-to-end privacy. Designed for power users, hobbyists, and privacy-conscious individuals on Debian-based systems.
-
Install dependencies:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env sudo apt install mold clang libssl-dev cargo install cargo-deb sccache
-
Build and install:
git clone https://github.com/chris9740/swiftdns.git cd swiftdns make package sudo dpkg -i target/debian/swiftdns_*.deb
-
Configure DNS: Set your system's DNS resolver to
127.0.0.1to route queries through Swiftdns.
- DNS-over-HTTPS: Encrypt all DNS queries for privacy
- Domain Filtering: Block ads, trackers, and unwanted domains
- Tor Support: Route queries through Tor for anonymity
- Hot Reload: Filter changes apply instantly
- Caching: Fast responses with intelligent TTL handling
Create filter files in /etc/swiftdns/filters/:
# Block exact domains
echo "^facebook.com" | sudo tee /etc/swiftdns/filters/social.list
# Block domains and subdomains
echo "google.com" | sudo tee -a /etc/swiftdns/filters/social.list
# Use wildcards
echo "*ads*" | sudo tee -a /etc/swiftdns/filters/social.listTest your filters:
swiftdns check facebook.comEdit /etc/swiftdns/config.toml:
address = "127.0.0.1:53"
[resolver]
url = "https://cloudflare-dns.com/dns-query"
bootstrap_ips = ["1.1.1.1:443", "1.0.0.1:443"]
[blocking]
strategy = "sinkhole" # sinkhole | nxdomain | refused | drop
[tor]
enabled = false
address = "127.0.0.1:9050"swiftdns check facebook.com # Test filter rules (does not make a DNS query)
swiftdns resolve example.com # Test DNS resolution (makes a DNS query)
swiftdns config # Show configuration
swiftdns --help # Show helpFor detailed configuration, advanced features, and troubleshooting, visit the full documentation.
