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

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

## 安装

```sh
sudo av install brew:socat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install socat
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install socat
```

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

### Linux

- apk (92%):

```sh
sudo apk add socat
```

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

- Debian apt (92%):

```sh
sudo apt install socat
```

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

- dnf (92%):

```sh
sudo dnf install socat
```

  证据: Fedora Rawhide package metadata: socat 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#socat
```

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

- pacman (92%):

```sh
sudo pacman -S socat
```

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

- zypper (92%):

```sh
sudo zypper install socat
```

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

## 软件包事实

- **软件包键:** brew:socat
- **软件包管理器:** Homebrew
- **版本:** 1.8.1.3
- **来源摘要:** SOcket CAT: netcat on steroids
- **主页:** <http://www.dest-unreach.org/socat/>
- **最后更新:** 2026-06-27T07:44:31Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- filan (别名)
- procan (别名)
- socat (别名)
- socat-broker.sh (别名)
- socat-chain.sh (别名)
- socat-mux.sh (别名)
- socat1 (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

socat is a classic Unix command-line relay for connecting two bidirectional byte streams. Its own homepage describes it as netcat++: an extended-design, new implementation command for TCP, UDP, Unix sockets, PTYs, files, SSL, proxies, raw sockets, and many other address types.

### 项目历史

The official git repository's earliest imported commit is from January 27, 2008 for socat 1.6.0.0, while the project homepage continues to publish release notes, source tarballs, checksums, documentation, and security advisories.

socat's development history is long and conservative by CLI standards: releases add transport/address families, fix portability issues, and preserve compatibility for scripts. Version 1.8.0.0 in 2023 added network namespaces, POSIX message queues, systemd inetd-style ACCEPT-FD, SOCKS5 client support, and helper scripts for chained, muxed, and brokered connections.

### 采用历史

The supplied package-manager facts show socat packaged across Homebrew, Alpine, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE. That breadth is consistent with its role as an administrator's network Swiss army knife, often installed as a dependency or debugging aid rather than as an end-user application.

### 使用方式

Official docs and homepage examples show socat relaying between address specifications such as TCP listeners, proxies, Unix sockets, PTYs, files, stdio, SSL endpoints, and command execution. Users value it because a single invocation can replace small custom relay programs or awkward shell glue.

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

Package nerds care about socat because it is one of the canonical small tools that makes Unix packaging feel powerful: install one binary and gain a laboratory for sockets, pipes, terminals, tunnels, proxies, namespaces, and service debugging. Its release notes also matter to maintainers because networking and parser bugs can be security-sensitive.

### 时间线

- 2008: Initial imported git commit for socat 1.6.0.0.
- 2008: 1.7.0.0 tagged in the official repository.
- 2023: 1.8.0.0 added network namespaces, POSIX message queues, SOCKS5, and helper scripts.
- 2024: 1.8.0.2 fixed CVE-2024-54661.
- 2026: 1.8.1.2 fixed CVE-2026-56123 in the SOCKS5 reply parser.
- 2026: 1.8.1.3 fixed the test for the recent SOCKS5 parser issue on platforms with non-bash default shells.

### Related projects

- socat is commonly discussed as an extended netcat-style relay, and its homepage explicitly positions it as netcat++.

### 来源

- <http://www.dest-unreach.org/socat/>
- <http://www.dest-unreach.org/socat/doc/socat.html>
- <https://repo.or.cz/socat.git>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

## 其他软件包管理器记录

- Debian apt - socat - 1.8.0.3-1: normalized package name match | Debian stable package indexes: socat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | multipurpose relay for bidirectional data transfer | https://www.dest-unreach.org/socat/
- Nix - socat: normalized package name match | nixpkgs package indexes: pkgs/by-name/so/socat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - socat - 1.8.0.0-4build3: normalized package name match | Ubuntu 24.04 LTS package indexes: socat from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | multipurpose relay for bidirectional data transfer | https://www.dest-unreach.org/socat/
- apk - socat - 1.8.1.3-r0: normalized package name match | Alpine Linux edge package indexes: socat from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Multipurpose relay for binary protocols | http://www.dest-unreach.org/socat/
- apk - socat-doc - 1.8.1.3-r0: normalized package name match | Alpine Linux edge package indexes: socat-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Multipurpose relay for binary protocols (documentation) | http://www.dest-unreach.org/socat/
- apk - socat-scripts - 1.8.1.3-r0: normalized package name match | Alpine Linux edge package indexes: socat-scripts from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Multipurpose relay for binary protocols (helper scripts) | http://www.dest-unreach.org/socat/
- dnf - socat - 1.8.1.1-5.fc45: normalized package name match | Fedora Rawhide package metadata: socat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Bidirectional data relay between two data channels ('netcat++') | http://www.dest-unreach.org/socat/
- pacman - socat - 1.8.1.3-1: normalized package name match | Arch Linux sync databases: socat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Multipurpose relay | http://www.dest-unreach.org/socat/
- zypper - socat - 1.8.1.3-1.3: normalized package name match | openSUSE Tumbleweed package metadata: socat from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Multipurpose relay for bidirectional data transfer | http://www.dest-unreach.org/socat/
- zypper - socat-extra - 1.8.1.3-1.3: normalized package name match | openSUSE Tumbleweed package metadata: socat-extra from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Additional scripts for socat | http://www.dest-unreach.org/socat/
- MacPorts - socat: normalized package name match | MacPorts ports tree: sysutils/socat/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/socat.yml](https://github.com/mxcl/pkgdb/blob/main/combined/socat.yml)


## 来源

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