pymumu/smartdns logo

pymumu/smartdns

Free

A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH, DoQ. 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验,支持DoH,DoT,DoQ。

FreeFree tier
Type
Open Source

About pymumu/smartdns

SmartDNS is a local DNS server that enhances network speed by querying multiple upstream DNS servers and returning the fastest IP address to clients. It supports encrypted DNS protocols including DNS over TLS (DoT), DNS over HTTPS (DoH), DNS over QUIC (DoQ), and DNS over HTTP/3 (DoH3) for improved privacy. Additional features include domain-based IP address specification for ad blocking, high-performance suffix matching (20 million rules in 1ms), per-client control, IPv4/IPv6 dual stack, DNS64 support, and domain sharding with iptables/nftables. It runs on standard Linux systems (including Raspberry Pi), OpenWrt, Asus routers, and Windows via WSL.

Key Features

Multiple virtual DNS servers with different ports, rules, and clients
Multiple upstream DNS server support with simultaneous queries
Per-client control based on MAC or IP address for custom rules
Returns the fastest IP address from multiple upstream results after speed testing
Supports UDP, TCP, DoT, DoH, DoQ, and DoH3 query protocols
Domain-specific IP address assignment for ad blocking and malicious site filtering
High-performance domain suffix matching (20 million records in 1ms)
Domain sharding with iptables and nftables support
Cross-platform: Linux, OpenWrt, Asus routers, Windows via WSL
IPv4/IPv6 dual stack with AAAA record control and DNS64 support

Pros & Cons

Pros
  • Returns the fastest IP address from multiple upstream servers, improving overall browsing speed
  • Supports modern encrypted DNS protocols (DoT, DoH, DoQ, DoH3) for privacy
  • Free and open source under the MIT license
  • Cross-platform support including routers and embedded devices
  • High performance with low memory and CPU footprint
  • Per-client control for customized rules (e.g., parental controls)
  • Built-in cache for faster repeated queries
  • Active development on GitHub with over 11,000 stars
Cons
  • No graphical user interface; configuration is done via command line or text files
  • Setup requires some technical expertise and network knowledge
  • Documentation is primarily in Chinese (English README available but less detailed)
  • May conflict with existing DNS services (e.g., dnsmasq) on the same system if not configured properly
  • Less widely known than alternatives like Pi-hole or dnsmasq, so community support is smaller

Best For

Improving web browsing speed on home or office networksBlocking ads and malicious domains via IP address specificationEnhancing DNS privacy with encrypted query protocols (DoT, DoH, DoQ, DoH3)Optimizing DNS resolution on routers (OpenWrt, Asus firmware) for the whole home networkEnterprise network speed optimization with domain sharding and per-client rulesParental control by assigning different rules to different devices based on MAC/IP

FAQ

What is SmartDNS?
SmartDNS is a local DNS server that queries multiple upstream DNS servers and returns the fastest IP address to the client to improve network speed. It supports encrypted DNS protocols and domain-based filtering.
How does SmartDNS compare to dnsmasq?
Unlike dnsmasq's all-servers mode that returns the first response, SmartDNS tests the speed of each returned IP from multiple upstream servers and returns the fastest one, providing better performance.
Does SmartDNS support encrypted DNS?
Yes, SmartDNS supports DNS over TLS (DoT), DNS over HTTPS (DoH), DNS over QUIC (DoQ), and DNS over HTTP/3 (DoH3) for encrypted communication.
Is SmartDNS free?
Yes, SmartDNS is free and open source under the MIT license. You can download, use, and modify it freely.
Can I use SmartDNS on Windows?
Yes, SmartDNS can be used on Windows via WSL (Windows Subsystem for Linux) and also on standard Linux systems, OpenWrt, and Asus routers.
Can SmartDNS block ads?
Yes, by specifying IP addresses for certain domains, SmartDNS can effectively block ads and malicious websites. Its high-performance suffix matching can handle large blocklists efficiently.