# 使用 Homebrew, apt, MacPorts, Nix 安装 dns2tcp

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

## 安装

```sh
sudo av install brew:dns2tcp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dns2tcp
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dns2tcp
```

  证据: MacPorts ports tree: net/dns2tcp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install dns2tcp
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#dns2tcp
```

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

## 软件包事实

- **软件包键:** brew:dns2tcp
- **软件包管理器:** Homebrew
- **版本:** 0.5.2
- **来源摘要:** TCP over DNS tunnel
- **主页:** <https://packages.debian.org/sid/dns2tcp>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dns2tcpc (别名)
- dns2tcpd (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

dns2tcp is a client/server tool for relaying TCP connections over DNS. It belongs to the older family of DNS-tunneling utilities used for constrained networks, demonstrations, and security testing rather than general-purpose VPN service.

### 项目历史

The upstream ChangeLog marks version 0.3 as the public release and records later fixes for 64-bit architectures, DNS decoding, privilege dropping, client authentication, and Windows client support. The README is explicit that DNS encapsulation is not encrypted and should be treated as an insecure transport.

### 采用历史

dns2tcp stayed visible because it solves one very specific network problem with small C tools: a client, a server, and simple resource mappings. Distribution packaging kept it available for administrators and security testers who need a TCP-over-DNS tunnel without a broader VPN stack.

### 使用方式

The README shows using dns2tcpc to list available remote resources, bind a local port to a remote service, or run from ~/.dns2tcprc. Server use centers on ~/.dns2tcpdrc, where the operator defines the DNS domain, key, and named resources such as ssh or smtp targets.

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

Package nerds care about dns2tcp because it is a classic small-network-tool package: narrow, risky if misunderstood, but valuable in labs and incident-response toolboxes because it demonstrates TCP-over-DNS behavior with minimal moving parts.

### 时间线

- 0.3: Public release.
- 0.4: 64-bit architectures start working.
- 0.5: Client authentication, Windows client support, and proxy-style use are added.
- 0.5.2: OpenSSL includes are removed after earlier library cleanup.

### Related projects

- iodine is a related DNS-tunneling project focused on IP-over-DNS rather than TCP-over-DNS.
- ssh ProxyCommand workflows are a common adjacent use case for dns2tcpc.

### 来源

- <https://github.com/alex-sector/dns2tcp>
- <https://raw.githubusercontent.com/alex-sector/dns2tcp/master/README>
- <https://raw.githubusercontent.com/alex-sector/dns2tcp/master/ChangeLog>
- <https://packages.debian.org/stable/net/dns2tcp>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## 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: ~/.dns2tcprc, ~/.dns2tcpdrc

## Credential files

- Unix: ~/.dns2tcprc, ~/.dns2tcpdrc
## 其他软件包管理器记录

- Debian apt - dns2tcp - 0.5.2-3: normalized package name match | Debian stable package indexes: dns2tcp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | TCP-over-DNS tunnel server and client | http://www.hsc.fr/ressources/outils/dns2tcp/
- Nix - dns2tcp: normalized package name match | nixpkgs package indexes: pkgs/by-name/dn/dns2tcp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dns2tcp - 0.5.2-3: normalized package name match | Ubuntu 24.04 LTS package indexes: dns2tcp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | TCP-over-DNS tunnel server and client | http://www.hsc.fr/ressources/outils/dns2tcp/
- MacPorts - dns2tcp: normalized package name match | MacPorts ports tree: net/dns2tcp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/dns2tcp.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dns2tcp.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
