{"id":13453814,"url":"https://github.com/pymumu/smartdns","last_synced_at":"2026-10-18T22:09:21.025Z","repository":{"id":37663332,"uuid":"130578889","full_name":"pymumu/smartdns","owner":"pymumu","description":"A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH, DoQ. 一个本地DNS服务器，获取最快的网站IP，获得最佳上网体验，支持DoH，DoT，DoQ。","archived":false,"fork":false,"pushed_at":"2026-08-30T18:28:15.000Z","size":5905,"stargazers_count":11330,"open_issues_count":324,"forks_count":1252,"subscribers_count":133,"default_branch":"master","last_synced_at":"2026-10-10T04:34:28.064Z","etag":null,"topics":["c","dns","dns-over-https","dns-over-tls","dns-server","dns64","doh","doh3","doq","dot","nftables","nftables-sets","openwrt","openwrt-package","smartdns","stubby"],"latest_commit_sha":null,"homepage":"https://pymumu.github.io/smartdns/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pymumu.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2018-04-22T15:09:47.000Z","updated_at":"2026-10-09T04:19:07.000Z","dependencies_parsed_at":"2024-01-14T10:42:38.576Z","dependency_job_id":"20f75bf2-8838-44da-8626-229791699594","html_url":"https://github.com/pymumu/smartdns","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/pymumu/smartdns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymumu%2Fsmartdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymumu%2Fsmartdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymumu%2Fsmartdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymumu%2Fsmartdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pymumu","download_url":"https://codeload.github.com/pymumu/smartdns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymumu%2Fsmartdns/sbom","scorecard":{"id":18431,"data":{"date":"2025-08-04","repo":{"name":"github.com/pymumu/smartdns","commit":"55a4b360b1382ea8f67849c13959dbd18e7bda38"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.4,"checks":[{"name":"Code-Review","score":1,"reason":"Found 5/29 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/c-cpp.yml:1","Warn: no topLevel permission defined: .github/workflows/docker.yml:1","Warn: no topLevel permission defined: .github/workflows/webui.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/c-cpp.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/c-cpp.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/docker.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/webui.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/webui.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/webui.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/pymumu/smartdns/webui.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:54: pin your Docker image by updating busybox:stable-musl to busybox:stable-musl@sha256:74322b4716a11835c6f413fe9ffc2608ffdb8452f51cad9514a2b804908dc16e","Warn: downloadThenRun not pinned by hash: Dockerfile:6-32","Warn: npmCommand not pinned by hash: package/build-pkg.sh:305","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker.yml:16"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact Release46.1 not signed: https://api.github.com/repos/pymumu/smartdns/releases/203159357","Warn: release artifact Release46 not signed: https://api.github.com/repos/pymumu/smartdns/releases/160096123","Warn: release artifact Release45 not signed: https://api.github.com/repos/pymumu/smartdns/releases/134878626","Warn: release artifact Release43 not signed: https://api.github.com/repos/pymumu/smartdns/releases/115376646","Warn: release artifact Release42 not signed: https://api.github.com/repos/pymumu/smartdns/releases/102119443","Warn: release artifact Release46.1 does not have provenance: https://api.github.com/repos/pymumu/smartdns/releases/203159357","Warn: release artifact Release46 does not have provenance: https://api.github.com/repos/pymumu/smartdns/releases/160096123","Warn: release artifact Release45 does not have provenance: https://api.github.com/repos/pymumu/smartdns/releases/134878626","Warn: release artifact Release43 does not have provenance: https://api.github.com/repos/pymumu/smartdns/releases/115376646","Warn: release artifact Release42 does not have provenance: https://api.github.com/repos/pymumu/smartdns/releases/102119443"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T16:17:01.540Z","repository_id":37663332,"created_at":"2025-08-14T16:17:01.540Z","updated_at":"2025-08-14T16:17:01.540Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38342695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","dns","dns-over-https","dns-over-tls","dns-server","dns64","doh","doh3","doq","dot","nftables","nftables-sets","openwrt","openwrt-package","smartdns","stubby"],"created_at":"2024-07-31T08:00:47.917Z","updated_at":"2026-10-18T22:09:20.637Z","avatar_url":"https://github.com/pymumu.png","language":"C","funding_links":["https://paypal.me/PengNick/"],"categories":["Networking and Distributed","C","C (286)","DNS"],"sub_categories":["Networking"],"readme":"# SmartDNS\n\n**[English](ReadMe_en.md)**\n\n![SmartDNS](doc/smartdns-banner.png)\nSmartDNS 是一个运行在本地的 DNS 服务器，它接受来自本地客户端的 DNS 查询请求，然后从多个上游 DNS 服务器获取 DNS 查询结果，并将访问速度最快的结果返回给客户端，以此提高网络访问速度。\nSmartDNS 同时支持指定特定域名 IP 地址，并高性匹配，可达到过滤广告的效果; 支持DOT，DOH，DOQ，DOH3，更好的保护隐私。  \n\n与 DNSmasq 的 all-servers 不同，SmartDNS 返回的是访问速度最快的解析结果。\n\n支持树莓派、OpenWrt、华硕路由器原生固件和 Windows 系统等。\n\n## 使用指导\n\nSmartDNS官网：[https://pymumu.github.io/smartdns](https://pymumu.github.io/smartdns)\n\n## 软件效果展示\n\n### 仪表盘\n\n![SmartDNS-WebUI](doc/smartdns-webui.png)\n\n### 速度对比\n\n**阿里 DNS**  \n使用阿里 DNS 查询百度IP，并检测结果。  \n\n```shell\n$ nslookup www.baidu.com 223.5.5.5\nServer:         223.5.5.5\nAddress:        223.5.5.5#53\n\nNon-authoritative answer:\nwww.baidu.com   canonical name = www.a.shifen.com.\nName:   www.a.shifen.com\nAddress: 180.97.33.108\nName:   www.a.shifen.com\nAddress: 180.97.33.107\n\n$ ping 180.97.33.107 -c 2\nPING 180.97.33.107 (180.97.33.107) 56(84) bytes of data.\n64 bytes from 180.97.33.107: icmp_seq=1 ttl=55 time=24.3 ms\n64 bytes from 180.97.33.107: icmp_seq=2 ttl=55 time=24.2 ms\n\n--- 180.97.33.107 ping statistics ---\n2 packets transmitted, 2 received, 0% packet loss, time 1001ms\nrtt min/avg/max/mdev = 24.275/24.327/24.380/0.164 ms\npi@raspberrypi:~/code/smartdns_build $ ping 180.97.33.108 -c 2\nPING 180.97.33.108 (180.97.33.108) 56(84) bytes of data.\n64 bytes from 180.97.33.108: icmp_seq=1 ttl=55 time=31.1 ms\n64 bytes from 180.97.33.108: icmp_seq=2 ttl=55 time=31.0 ms\n\n--- 180.97.33.108 ping statistics ---\n2 packets transmitted, 2 received, 0% packet loss, time 1001ms\nrtt min/avg/max/mdev = 31.014/31.094/31.175/0.193 ms\n```\n\n**SmartDNS**  \n使用 SmartDNS 查询百度 IP，并检测结果。\n\n```shell\n$ nslookup www.baidu.com\nServer:         192.168.1.1\nAddress:        192.168.1.1#53\n\nNon-authoritative answer:\nwww.baidu.com   canonical name = www.a.shifen.com.\nName:   www.a.shifen.com\nAddress: 14.215.177.39\n\n$ ping 14.215.177.39 -c 2\nPING 14.215.177.39 (14.215.177.39) 56(84) bytes of data.\n64 bytes from 14.215.177.39: icmp_seq=1 ttl=56 time=6.31 ms\n64 bytes from 14.215.177.39: icmp_seq=2 ttl=56 time=5.95 ms\n\n--- 14.215.177.39 ping statistics ---\n2 packets transmitted, 2 received, 0% packet loss, time 1001ms\nrtt min/avg/max/mdev = 5.954/6.133/6.313/0.195 ms\n```\n\n从对比看出，SmartDNS 找到了访问 `www.baidu.com` 最快的 IP 地址，比阿里 DNS 速度快了 5 倍。\n\n## 特性\n\n1. **多虚拟DNS服务器**  \n   支持多个虚拟DNS服务器，不同虚拟DNS服务器不同的端口，规则，客户端。\n\n1. **多 DNS 上游服务器**  \n   支持配置多个上游 DNS 服务器，并同时进行查询，即使其中有 DNS 服务器异常，也不会影响查询。  \n\n1. **支持每个客户端独立控制**  \n   支持基于MAC，IP地址控制客户端使用不同查询规则，可实现家长控制等功能。  \n\n1. **返回最快 IP 地址**  \n   支持从域名所属 IP 地址列表中查找到访问速度最快的 IP 地址，并返回给客户端，提高网络访问速度。\n\n1. **支持多种查询协议**  \n   支持 UDP、TCP、DOT、DOH、DOQ 和 DOH3 查询及服务，以及非 53 端口查询；支持通过socks5，HTTP代理查询;\n\n1. **特定域名 IP 地址指定**  \n   支持指定域名的 IP 地址，达到广告过滤效果、避免恶意网站的效果。\n\n1. **域名高性能后缀匹配**  \n   支持域名后缀匹配模式，简化过滤配置，过滤 20 万条记录时间 \u003c 1ms。\n\n1. **域名分流**  \n   支持域名分流，不同类型的域名向不同的 DNS 服务器查询，支持iptable和nftable更好的分流；支持测速失败的情况下设置域名结果到对应ipset和nftset集合。\n\n1. **Windows / Linux 多平台支持**  \n   支持标准 Linux 系统（树莓派）、OpenWrt 系统各种固件和华硕路由器原生固件。同时还支持 WSL（Windows Subsystem for Linux，适用于 Linux 的 Windows 子系统）。\n\n1. **支持 IPv4、IPv6 双栈**  \n   支持 IPv4 和 IPV 6网络，支持查询 A 和 AAAA 记录，支持双栈 IP 速度优化，并支持完全禁用 IPv6 AAAA 解析。\n\n1. **支持DNS64**  \n   支持DNS64转换。\n\n1. **高性能、占用资源少**  \n   多线程异步 IO 模式，cache 缓存查询结果。\n\n1. **主流系统官方支持**  \n   主流路由系统官方软件源安装smartdns。\n\n## 架构\n\n![Architecture](https://github.com/pymumu/test/releases/download/blob/architecture.png)\n\n1. SmartDNS 接收本地网络设备的DNS 查询请求，如 PC、手机的查询请求；\n1. 然后将查询请求发送到多个上游 DNS 服务器，可支持 UDP 标准端口或非标准端口查询，以及 TCP 查询；\n1. 上游 DNS 服务器返回域名对应的服务器 IP 地址列表，SmartDNS 则会检测从本地网络访问速度最快的服务器 IP；\n1. 最后将访问速度最快的服务器 IP 返回给本地客户端。\n\n## 编译\n\n- 代码编译：\n\n  SmartDNS 提供了编译软件包的脚本（`package/build-pkg.sh`），支持编译 LuCI、Debian、OpenWrt 和 Optware 安装包。\n\n- 文档编译：\n\n  文档分支为`doc`，安装`mkdocs`工具后，执行`mkdocs build`编译。\n\n## 捐赠\n\n如果你觉得此项目对你有帮助，请捐助我们，使项目能持续发展和更加完善。\n\n### PayPal 贝宝\n\n[![Support via PayPal](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg)](https://paypal.me/PengNick/)\n\n### AliPay 支付宝\n\n![alipay](doc/alipay_donate.jpg)\n\n### WeChat Pay 微信支付\n\n![wechat](doc/wechat_donate.jpg)\n\n## 开源声明\n\nSmartDNS 基于 GPL V3 协议开源。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymumu%2Fsmartdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpymumu%2Fsmartdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymumu%2Fsmartdns/lists"}