Repolode
pymumu

pymumu/smartdns

A local DNS server that queries multiple upstream resolvers and returns the fastest-responding IP address for each domain.

Stars
11,388
Forks
1,250
Open issues
322
Last commit
yesterday

What is it?

SmartDNS runs on your local network as a DNS server. It receives lookups from local devices, forwards them to several upstream DNS servers at once, then tests the returned IP addresses from your network and sends back the one that responds fastest. Unlike dnsmasq's all-servers mode, which returns every answer, SmartDNS returns only the quickest result.

Beyond speed selection, it supports per-domain IP overrides for ad filtering and blocking malicious sites, domain suffix matching, and routing different domains to different upstream servers. Clients can be given different rules by MAC or IP address, which allows use cases such as parental controls. Encrypted upstream protocols include DoT, DoH, DoQ and DoH3, along with SOCKS5 and HTTP proxy queries.

SmartDNS runs on standard Linux such as Raspberry Pi, OpenWrt firmware, ASUS router native firmware, WSL and Windows. It can integrate with ipset and nftables sets for traffic routing, and includes a web dashboard.

Key features

  • 01Queries multiple upstream DNS servers in parallel and returns the fastest-responding IP.
  • 02Supports UDP, TCP, DoT, DoH, DoQ and DoH3 upstream and client-facing services.
  • 03Allows per-domain IP overrides for ad filtering and blocking.
  • 04Applies different query rules per client based on MAC or IP address.
  • 05Integrates with ipset and nftables for domain-based traffic routing.
  • 06Supports IPv4, IPv6, A/AAAA records and DNS64.

Use cases

  • Speeding up website access on a home network or small office through a home router.
  • Blocking ads and tracking domains for every device on a LAN.
  • Running parental controls with per-device DNS rules.
  • Deploying a private, encrypted DNS resolver on OpenWrt or a Raspberry Pi.

Quick start

  1. 1

    Read the usage guide on the official website

  2. 2

    Build installable packages with the included script (package/build-pkg.sh)

Things to know

  • Licensed under GPL-3.0, a copyleft license that requires derivative works to be open-sourced under the same terms.
  • The main README is in Chinese, and the README gives no direct install command, so setup relies on the official site or build script.

In collections

Topics

FAQ

What is smartdns?
A local DNS server that queries multiple upstream resolvers and returns the fastest-responding IP address for each domain. SmartDNS runs on your local network as a DNS server. It receives lookups from local devices, forwards them to several upstream DNS servers at once, then tests the returned IP addresses from your network and sends back the one that responds fastest. Unlike dnsmasq's all-servers mode, which returns every answer, SmartDNS returns only the quickest result.
Is smartdns free to use? What license does it have?
smartdns is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is smartdns still maintained?
Actively maintained. The last commit to smartdns was on Nov 6, 2026.
What can I use smartdns for?
Speeding up website access on a home network or small office through a home router. Blocking ads and tracking domains for every device on a LAN. Running parental controls with per-device DNS rules. Deploying a private, encrypted DNS resolver on OpenWrt or a Raspberry Pi.
How do I install smartdns?
Read the usage guide on the official website Build installable packages with the included script (package/build-pkg.sh)
Where can I get smartdns?
The source code and installation instructions are on GitHub: https://github.com/pymumu/smartdns

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects