# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 sslh

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

## 安装

```sh
sudo av install brew:sslh
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sslh
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install sslh
```

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

### Linux

- apk (92%):

```sh
sudo apk add sslh
```

  证据: Alpine Linux edge package indexes: sslh from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install sslh
```

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

- dnf (92%):

```sh
sudo dnf install sslh
```

  证据: Fedora Rawhide package metadata: sslh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#sslh
```

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

- pacman (92%):

```sh
sudo pacman -S sslh
```

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

- zypper (92%):

```sh
sudo zypper install sslh
```

  证据: openSUSE Tumbleweed package metadata: sslh from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:sslh
- **软件包管理器:** Homebrew
- **版本:** 2.3.1
- **来源摘要:** Forward connections based on first data packet sent by client
- **主页:** <https://www.rutschle.net/tech/sslh.shtml>
- **仓库:** <https://github.com/yrutschle/sslh>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- sslh (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

sslh is a small Unix daemon for sharing one public port among several backend protocols by looking at the first bytes sent by a client. Its classic package-manager appeal is that it lets administrators keep SSH, HTTPS, OpenVPN, WireGuard, XMPP, SOCKS5, and similar services reachable in constrained networks without deploying a full reverse-proxy stack.

### 项目历史

The upstream changelog records basic functionality in version 1.0, with privilege dropping and configurable targets already present, followed by daemon behavior in 1.1 in 2007. Through the late 2000s and early 2010s sslh accumulated the operational traits expected of a packaged system service: libwrap support, init scripts, a manual page, inetd mode, FreeBSD fixes, IPv6 support, foreground mode, a test suite, and systemd-friendly behavior.

The project later expanded from an SSL/SSH splitter into a general protocol demultiplexer. Upstream documentation now describes probes for HTTP, TLS/SSL including SNI and ALPN, SSH, WireGuard, OpenVPN, tinc, XMPP, SOCKS5, syslog, and regular-expression based protocols, plus transparent proxying, proxyprotocol support, Docker examples, and several process models including fork, select, and libev.

### 采用历史

The official download page notes that sslh has been packaged for Debian, Gentoo, FreeBSD, and many other operating systems, while the supplied package metadata shows it in Homebrew, apk, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE package sets. That broad packaging footprint is the main sign of adoption: it is the kind of small network utility distributions carry because it solves a recurring administrator problem.

Upstream also maintains a mailing list for announcements, usage discussion, and feature requests, and directs development to GitHub, where patches and features may appear before formal releases.

### 使用方式

Common usage is to listen on a public address and port, often 443, then forward traffic to local services such as sshd, an HTTPS server, OpenVPN, or other backends based on protocol detection. The configuration guide says packaged scripts read configuration from /etc/sslh.cfg, and the systemd generator can also read /etc/sslh/sslh.cfg if present.

Package users care about build-time and runtime options because sslh can be compiled with libconfig, systemd socket activation, POSIX capabilities, libwrap, transparent proxying support, and different event models. Those knobs determine whether a distro package feels like a drop-in service or just a source build.

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

sslh is package-nerd material because it sits at the boundary between networking policy, init systems, and distro defaults. Small differences in config paths, capabilities, service files, and compile flags decide whether it works cleanly on a stock server.

It also preserves an old but still useful Unix pattern: one focused daemon, a readable config file, init/systemd integration, and behavior that can be composed with sshd, httpd, OpenVPN, stunnel, fail2ban, and container runtimes.

### 时间线

- 2007: Version 1.1 added more daemon-like behavior such as PID-file support and startup forking.
- 2008: Versions 1.3 through 1.5 added local listen-interface parsing, syslog logging, libwrap support, support scripts, and Makefile work.
- 2009: Version 1.6 added a man page and install targets.
- 2011: Version 1.8 added OpenVPN probing, a select-based implementation, foreground mode, tests, and Mac OS X documentation; version 1.9 added IPv6 support.
- 2012: Version 1.11 changed defaults to better fit systemd and launchd and added an HTTP probe.
- 2020: Version 1.21 moved configuration and command-line handling to conf2struct and changed TLS naming and config defaults.
- 2021: Version 1.22 added UDP protocol support.
- 2025: Versions 2.2.4 and later addressed SUSE security-review findings and added connection-limit controls.

### Related projects

- sslh is commonly used alongside sshd, web servers, OpenVPN, WireGuard, stunnel, proxytunnel, corkscrew, fail2ban, and systemd socket activation.
- It overlaps conceptually with reverse proxies and TLS terminators, but it is focused on early protocol detection rather than HTTP routing or TLS certificate management.

### 来源

- <https://github.com/yrutschle/sslh/blob/master/ChangeLog>
- <https://github.com/yrutschle/sslh/blob/master/doc/config.md>
- <https://www.rutschle.net/tech/sslh/README.html>
- <https://www.rutschle.net/tech/sslh/download.html>
- input source_facts.package-manager


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## 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: /etc/sslh.cfg, /etc/sslh/sslh.cfg
## 其他软件包管理器记录

- Debian apt - sslh - 2.1.4-1+b1: normalized package name match | Debian stable package indexes: sslh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Applicative protocol multiplexer | http://www.rutschle.net/tech/sslh/README.html
- Nix - sslh: normalized package name match | nixpkgs package indexes: pkgs/by-name/ss/sslh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - sslh - 1.22c-1: normalized package name match | Ubuntu 24.04 LTS package indexes: sslh from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Applicative protocol multiplexer | http://www.rutschle.net/tech/sslh/README.html
- apk - sslh - 2.3.1-r0: normalized package name match | Alpine Linux edge package indexes: sslh from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port) | https://www.rutschle.net/tech/sslh/README.html
- apk - sslh-doc - 2.3.1-r0: normalized package name match | Alpine Linux edge package indexes: sslh-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port) (documentation) | https://www.rutschle.net/tech/sslh/README.html
- apk - sslh-fail2ban - 2.3.1-r0: normalized package name match | Alpine Linux edge package indexes: sslh-fail2ban from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port) | https://www.rutschle.net/tech/sslh/README.html
- apk - sslh-openrc - 2.3.1-r0: normalized package name match | Alpine Linux edge package indexes: sslh-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port) (OpenRC init scripts) | https://www.rutschle.net/tech/sslh/README.html
- dnf - sslh - 2.3.1-6.fc45: normalized package name match | Fedora Rawhide package metadata: sslh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Applicative protocol(SSL/SSH) multiplexer | https://github.com/yrutschle/sslh
- pacman - sslh - 2.3.1-1: normalized package name match | Arch Linux sync databases: sslh from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | SSL/SSH/OpenVPN/XMPP/tinc port multiplexer | https://www.rutschle.net/tech/sslh/README.html
- zypper - sslh - 2.3.1-1.4: normalized package name match | openSUSE Tumbleweed package metadata: sslh from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | SSL/SSH multiplexer | https://www.rutschle.net/tech/sslh.shtml
- MacPorts - sslh: normalized package name match | MacPorts ports tree: net/sslh/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/sslh.yml](https://github.com/mxcl/pkgdb/blob/main/combined/sslh.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
