🐋 SmartDNS Edge

🐋 SmartDNS Edge

基于 Rust 开发的全平台高性能本地 DNS 服务器

A Rust-based cross-platform high-performance local DNS server

🌐 GitHub 源码仓库 | ✨ 核心特性 | 💻 支持系统 | 📦 安装运行 🌐 GitHub Repo | ✨ Features | 💻 Supported OS | 📦 Install & Run


什么是 SmartDNS Edge?

What is SmartDNS Edge?

SmartDNS Edge 是使用 Rust 语言重写的本地 DNS 服务器。它能够获取多个上游 DNS 的解析结果,并通过测速算法动态获取最快的网站 IP 响应,从而显著提升网络访问相应速度与网页加载体验。

SmartDNS Edge is a local DNS server rewritten in the Rust programming language. It resolves DNS queries from multiple upstream servers, dynamically determines the fastest IP addresses using smart speed-testing algorithms, and significantly improves internet access speeds and web-loading experiences.

✨ 核心特性

✨ Core Features

💻 支持的操作系统

💻 Supported Operating Systems

🪟 Windows 系列(全面覆盖企业与现代桌面)

🪟 Windows Series (Full Coverage of Enterprise & Modern Desktops)

底层架构:x86_64 (主流 Intel/AMD) 与 aarch64 (现代 ARM 处理器)

Underlying Architectures: x86_64 (Mainstream Intel/AMD) & aarch64 (Modern ARM Processors)

🐧 Linux 系列

🐧 Linux Series

底层架构:x86_64-generic-linux-gnuaarch64-generic-linux-gnu

Underlying Architectures: x86_64-generic-linux-gnu & aarch64-generic-linux-gnu

🍎 macOS 系列(苹果生态全家桶)

🍎 macOS Series (Apple Ecosystem)

底层架构:x86_64-apple-darwinaarch64-apple-darwin

Underlying Architectures: x86_64-apple-darwin & aarch64-apple-darwin

🐳 云原生与容器化环境 (Docker / NAS)

🐳 Cloud-Native & Containerized Environments (Docker / NAS)

分发形式:全自动构建的 ghcr.io 多架构双端镜像 (amd64 / arm64)

Distribution: Automated multi-architecture dual-end images on ghcr.io (amd64 / arm64)

📦 安装与运行

📦 Installation and Running

本程序为纯净绿色软件,无任何外部系统依赖。请前往 Releases 页面 下载对应您系统架构的最新压缩包。

This software is a clean, dependency-free utility. Please visit the Releases page to download the latest archive corresponding to your system architecture.

🪟 Windows (企业服务器 & 个人桌面)

🪟 Windows (Enterprise Servers & Desktops)

将下载的 .zip 文件解压到一个固定目录(如 D:\SmartDNS)。

Extract the downloaded .zip file to a fixed directory (e.g., D:\SmartDNS).

方式一:前台测试运行(适合测试排障)

Method 1: Foreground Test Execution (Best for troubleshooting)

.\smartdns.exe run -c .\smartdns.conf -v

(注:-v 表示开启调试日志输出,方便直观查看解析过程)

(Note: -v enables debug log output to visually inspect the resolution process)

方式二:后台服务运行(推荐,开机自启)

Method 2: Background Service Execution (Recommended, Autostart)

请以管理员身份运行终端(PowerShell),执行以下命令,系统将全自动接管进程并配置好防火墙规则:

Run your terminal (PowerShell) as Administrator and execute the following commands. The system will automatically register the background process and configure the local firewall rules:

# 1. 安装服务
.\smartdns.exe service install

# 2. 启动服务
.\smartdns.exe service start

# 3. 随时查看运行状态 (带 🟢/🔴 指示灯)
.\smartdns.exe service status
# 1. Install service
.\smartdns.exe service install

# 2. Start service
.\smartdns.exe service start

# 3. Inspect service status (with 🟢/🔴 indicators)
.\smartdns.exe service status

(如需彻底清理,执行 .\smartdns.exe service uninstall 即可)

(To uninstall, simply execute .\smartdns.exe service uninstall)

🐧 Linux & 🍎 macOS (通用绿色运行)

🐧 Linux & 🍎 macOS (Generic Execution)

将下载的压缩包解压到目标目录。打开终端,赋予执行权限即可直接启动:

Extract the archive to your target directory. Open your terminal, grant execution permissions, and run:

# 赋予执行权限
chmod +x ./smartdns

# 启动服务
sudo ./smartdns run -c ./etc/smartdns/smartdns.conf
# Grant execution permissions
chmod +x ./smartdns

# Start service
sudo ./smartdns run -c ./etc/smartdns/smartdns.conf

(注:Linux 系统绑定 53 等特权端口需要 sudo root 权限)

(Note: Binding to privileged ports like 53 on Linux requires sudo/root privileges)

🐳 Docker / NAS (容器化一键部署)

🐳 Docker / NAS (One-Click Container Deployment)

我们提供原生支持 amd64 与 arm64 双架构的极简容器镜像。极其适合部署在群晖 (Synology) 等支持 Docker 的环境中。使用 CLI 快速启动:

We provide minimal container images natively supporting both amd64 and arm64 architectures. Perfect for Synology Docker setups or similar environments. Quick start using the CLI:

docker run -d --name smartdns --restart always --network host -v /你的本地路径/smartdns.conf:/etc/smartdns/smartdns.conf ghcr.io/gdxz-linus/smartdns-edge:v1.0.1
docker run -d --name smartdns --restart always --network host -v /your/local/path/smartdns.conf:/etc/smartdns/smartdns.conf ghcr.io/gdxz-linus/smartdns-edge:v1.0.1