# 使用 Homebrew, apt, Nix, pacman 安装 smartdns

查看 smartdns 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:smartdns
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install smartdns
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install smartdns
```

  证据: Debian stable package indexes: smartdns from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#smartdns
```

  证据: nixpkgs package indexes: pkgs/by-name/sm/smartdns/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S smartdns
```

  证据: Arch Linux sync databases: smartdns from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:smartdns
- **软件包管理器:** Homebrew
- **版本:** 0.13.1
- **来源摘要:** Rule-based DNS server for fast IP resolution, DoT/DoQ/DoH/DoH3 supported
- **主页:** <https://github.com/mokeyish/smartdns-rs>
- **仓库:** <https://github.com/mokeyish/smartdns-rs>
- **最后更新:** 2026-06-27T19:43:42Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- smartdns (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.13.1
## 项目历史与用法

SmartDNS-rs is a Rust implementation of the SmartDNS idea: a local DNS server that queries multiple upstream resolvers and returns the fastest result for the local network. In package-manager terms it sits in the same practical niche as dnsmasq-like local resolvers, but with modern encrypted DNS protocols and cross-platform packaging.

### 项目历史

The upstream SmartDNS project documents the core design: accept local DNS queries, ask multiple upstream DNS servers, test or select the fastest reachable address, and return that result. SmartDNS-rs states that it was inspired by the C SmartDNS project and was written because the original was mainly Linux-oriented while the Rust version targets Windows, macOS, Linux, and Android Termux with compatible configuration.

### 采用历史

SmartDNS-rs gained package-manager visibility through Homebrew as `smartdns`, with the README documenting `brew install smartdns` and service startup through Homebrew services. The supplied package metadata also records packages in Debian, Ubuntu, Arch, and Nix, which places it beyond a single-platform GitHub binary.

### 使用方式

Typical use is as a local DNS daemon, often listening on port 53, configured with upstream DoH, DoT, DoQ, or DoH3 resolvers and domain-specific rules. The README shows running it with `smartdns run -c ./smartdns.conf -v`, installing it as a service, and using `dig` CHAOS TXT diagnostics for server/client information.

### 为什么软件包爱好者会关心

Package maintainers care because SmartDNS-rs combines DNS daemon behavior, privileged port binding, service integration, cross-platform binaries, and Rust dependency management in one formula. It is also a small example of a C networking utility being reworked for broader package-manager portability.

### 时间线

- 2022: First GitHub release of smartdns-rs, 0.1.3, was published.
- 2020s: README documents Homebrew installation and cross-platform service management.
- 2020s: The Rust version documents compatibility with the original C SmartDNS configuration model.

### Related projects

- The README names the original C SmartDNS project as inspiration and Hickory DNS as a dependency or code source. It also positions the tool near dnsmasq-like local DNS servers.

### 来源

- GitHub releases API for mokeyish/smartdns-rs: first published release 0.1.3 on 2022-12-04.
- <https://github.com/mokeyish/smartdns-rs README: description, C SmartDNS inspiration, cross-platform rationale, install and usage examples.>
- <https://pymumu.github.io/smartdns/en/: original SmartDNS design, fastest-IP behavior, platform and protocol support.>
- input source_facts.package-manager: Homebrew, Debian, Ubuntu, Nix, and Arch package names.


## 安全说明

broad file, network, media, or database tool signal. formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- broad file, network, media, or database tool signal
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./smartdns.conf, ./etc/smartdns/smartdns.conf
## 其他软件包管理器记录

- Debian apt - smartdns - 46.1+dfsg-1.1~deb13u1: normalized package name match | Debian stable package indexes: smartdns from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | local DNS server to obtain the fastest IP for the best experience | https://github.com/pymumu/smartdns
- Nix - smartdns: normalized package name match | nixpkgs package indexes: pkgs/by-name/sm/smartdns/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - smartdns - 45+dfsg-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: smartdns from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | local DNS server to obtain the fastest IP for the best experience | https://github.com/pymumu/smartdns
- pacman - smartdns - 48.3-1: normalized package name match | Arch Linux sync databases: smartdns from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A local DNS server to obtain the fastest website IP for the best Internet experience | https://github.com/pymumu/smartdns


## Combined YAML source

View the package source record on GitHub. [combined/smartdns.yml](https://github.com/mxcl/pkgdb/blob/main/combined/smartdns.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
