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

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

## 安装

```sh
sudo av install brew:strongswan
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install strongswan
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add strongswan
```

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

- Debian apt (92%):

```sh
sudo apt install strongswan
```

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

- dnf (92%):

```sh
sudo dnf install strongswan
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#strongswan
```

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

- pacman (92%):

```sh
sudo pacman -S strongswan
```

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

- zypper (92%):

```sh
sudo zypper install strongswan
```

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

## 软件包事实

- **软件包键:** brew:strongswan
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/strongswan>
- **版本:** 6.0.7
- **来源摘要:** VPN based on IPsec
- **主页:** <https://www.strongswan.org>
- **仓库:** <https://github.com/strongswan/strongswan>
- **上游文档:** <https://www.strongswan.org>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://download.strongswan.org/strongswan-6.0.7.tar.bz2>
- **最后更新:** 2026-06-08T08:40:44Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- charon-cmd (cli)
- ipsec (cli)
- pki (cli)
- swanctl (cli)
- charon-cmd (别名)
- ipsec (别名)
- pki (别名)
- swanctl (别名)

## 依赖

- openssl@3

## macOS 提供的库

- curl

## 安装行为

- post-install 钩子: 未定义
- 注意事项: You will have to run both "ipsec" and "charon-cmd" with "sudo".
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 6.0.7
- 管理器更新时间: 2026-06-08
- 本地数据: OK
- 上游仓库: https://www.strongswan.org
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

strongSwan is a long-running open source IPsec and IKE implementation used to build policy- and route-based VPNs. In package-manager culture it is a substantial security package: a suite of daemons, plugins, and command-line tools such as `ipsec`, `swanctl`, `pki`, and `charon-cmd` rather than a single small executable.

### 项目历史

The official strongSwan history says the project launched in 2005 as a fork of the discontinued FreeS/WAN project, integrating the X.509 patch its authors had contributed since 2000. The project later replaced inherited FreeS/WAN code with a new modular IKE daemon written in a modern object-oriented C style.

strongSwan initially used the new daemon for IKEv2 while IKEv1 remained handled by an extended FreeS/WAN pluto daemon. Because IKEv2 adoption by other vendors was slower than expected, strongSwan added IKEv1 support to the new daemon in strongSwan 5.0 in 2012 and removed pluto and other legacy components.

### 采用历史

The project documents more than 400,000 lines of code, more than 400 automated tests, and more than 110 contributors on its official about page. The input package facts show broad packaging across Homebrew, Debian and Ubuntu components, Fedora, Nix, pacman, APK, and zypper, reflecting its role as infrastructure software rather than a niche CLI.

### 使用方式

Administrators use strongSwan to configure, control, and monitor IPsec/IKE VPNs. Official documentation describes `swanctl` as the command-line utility for configuring, controlling, and monitoring the IKE charon daemon through the vici interface, while the broader documentation covers configuration files, certificates, kernel integration, and platform-specific builds.

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

Package nerds care about strongSwan because it sits at the intersection of kernel networking, cryptography, service management, plugin selection, and distro policy. Packaging it correctly means handling default configuration paths, private-key directories, optional plugins, service startup, and compatibility across Linux, macOS, FreeBSD, Android, and other supported environments.

### 时间线

- 2000: strongSwan authors were contributing an X.509 patch to FreeS/WAN.
- 2005: strongSwan launched as a fork of the discontinued FreeS/WAN project.
- 2012: strongSwan 5.0 added IKEv1 support to the new daemon and removed pluto and other legacy components.
- 2022: secunet Security Networks AG acquired intellectual property rights to the strongSwan project.

### Related projects

- FreeS/WAN is the direct ancestor named by the official project history. The official documentation also positions `swanctl`, `charon`, `pki`, and the vici interface as core parts of the modern strongSwan toolchain.

### 来源

- <https://docs.strongswan.org/docs/latest/devs/devs.html>
- <https://docs.strongswan.org/docs/latest/swanctl/swanctl.html>
- <https://strongswan.org/about.html>
- source_facts.package-manager


## 安全说明

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: /etc/strongswan.conf, /etc/strongswan.d/, /etc/swanctl/swanctl.conf, /etc/swanctl/conf.d/*.conf

## Credential files

- Unix: /etc/swanctl/private/, /etc/swanctl/rsa/, /etc/swanctl/ecdsa/, /etc/swanctl/pkcs8/, /etc/swanctl/pkcs12/, /etc/swanctl/swanctl.conf
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** strongswan
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - charon-cmd - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: charon-cmd from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | standalone IPsec client | http://www.strongswan.org
- Debian apt - charon-systemd - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: charon-systemd from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan IPsec client, systemd support | http://www.strongswan.org
- Debian apt - libcharon-extauth-plugins - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: libcharon-extauth-plugins from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan charon library (extended authentication plugins) | http://www.strongswan.org
- Debian apt - libcharon-extra-plugins - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: libcharon-extra-plugins from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan charon library (extra plugins) | http://www.strongswan.org
- Debian apt - libstrongswan - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: libstrongswan from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan utility and crypto library | http://www.strongswan.org
- Debian apt - libstrongswan-extra-plugins - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: libstrongswan-extra-plugins from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan utility and crypto library (extra plugins) | http://www.strongswan.org
- Debian apt - libstrongswan-standard-plugins - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: libstrongswan-standard-plugins from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan utility and crypto library (standard plugins) | http://www.strongswan.org
- Debian apt - strongswan - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: strongswan from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | IPsec VPN solution metapackage | http://www.strongswan.org
- Debian apt - strongswan-charon - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: strongswan-charon from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan Internet Key Exchange daemon | http://www.strongswan.org
- Debian apt - strongswan-libcharon - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: strongswan-libcharon from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan charon library | http://www.strongswan.org
- Debian apt - strongswan-nm - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: strongswan-nm from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan plugin to interact with NetworkManager | http://www.strongswan.org
- Debian apt - strongswan-pki - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: strongswan-pki from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan IPsec client, pki command | http://www.strongswan.org
- Debian apt - strongswan-starter - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: strongswan-starter from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan daemon starter and configuration file parser | http://www.strongswan.org
- Debian apt - strongswan-swanctl - 6.0.1-6+deb13u6: normalized package name match | Debian stable package indexes: strongswan-swanctl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | strongSwan IPsec client, swanctl command | http://www.strongswan.org
- Nix - strongswan: normalized package name match | nixpkgs package indexes: pkgs/by-name/st/strongswan/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - charon-cmd - 5.9.13-2ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: charon-cmd from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | standalone IPsec client | http://www.strongswan.org


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [openssl@3](https://pkg.so/zh-hans/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [ike-scan](https://pkg.so/zh-hans/brew/ike-scan/) - Shares pkgdb curated category or tags: cli, ike, security, vpn.
- [killswitch](https://pkg.so/zh-hans/brew/killswitch/) - Shares pkgdb curated category or tags: cli, network-security, security, vpn.
- [openssh](https://pkg.so/zh-hans/brew/openssh/) - Shares pkgdb curated category or tags: cli, network-security, security.
- [bettercap](https://pkg.so/zh-hans/brew/bettercap/) - Shares pkgdb curated category or tags: cli, network-security, security.
- [easy-rsa](https://pkg.so/zh-hans/brew/easy-rsa/) - Shares pkgdb curated category or tags: cli, security, vpn.
- [zeek](https://pkg.so/zh-hans/brew/zeek/) - Shares pkgdb curated category or tags: cli, network-security, security.
- [snort](https://pkg.so/zh-hans/brew/snort/) - Shares pkgdb curated category or tags: cli, network-security, security.
- [ettercap](https://pkg.so/zh-hans/brew/ettercap/) - Shares pkgdb curated category or tags: cli, network-security, security.

## Combined YAML source

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


## 来源

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