# 使用 Homebrew, apt, dnf, Nix 安装 ocproxy

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

## 安装

```sh
sudo av install brew:ocproxy
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ocproxy
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install ocproxy
```

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

- dnf (92%):

```sh
sudo dnf install ocproxy
```

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

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

## 软件包事实

- **软件包键:** brew:ocproxy
- **软件包管理器:** Homebrew
- **版本:** 1.60
- **来源摘要:** User-level SOCKS and port forwarding proxy
- **主页:** <https://github.com/cernekee/ocproxy>
- **仓库:** <https://github.com/cernekee/ocproxy>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ocproxy (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

ocproxy is a user-level SOCKS and port-forwarding proxy designed for OpenConnect VPN sessions. Instead of sending all host traffic through a VPN interface, it lets users route only selected connections through forwarded ports or a SOCKS5 proxy.

### 项目历史

The project changelog lists an initial release on 2012-11-20, version 1.50 on 2014-07-06, and version 1.60 on 2017-01-08. The authors file credits David Edmondson and Kevin Cernekee for ocproxy/vpnns work in 2012-2014 and Google Inc. for 2016 contributions, with lwIP credited separately.

Version 1.50 fixed stability issues seen under SOCKS browsing load, added a man page, moved the build to GNU autotools, updated lwIP, and added Ubuntu PPA packaging scripts. Version 1.60 added an experimental `vpnns` helper for Linux network namespaces and refined SOCKS binding behavior.

### 采用历史

ocproxy is niche but broadly recognizable in VPN packaging: Homebrew, Debian/Ubuntu, Fedora, Nix, and related package sets carry it. Its presence in these package managers reflects a practical sysadmin need rather than a large application ecosystem: selective VPN routing without root-level host network changes.

### 使用方式

The README says ocproxy should be started by OpenConnect with `--script-tun`, commonly with `-D` for a SOCKS5 listener and `-L` for local-to-remote port forwarding. Users then point SSH, RDP, SOCKS-aware tools, browser proxy rules, tsocks, or Dante at the local proxy or forwarded ports.

The documentation also describes use cases such as routing different applications or browser profiles through different VPNs, connecting to multiple VPNs with overlapping address ranges, and working on multiuser systems or machines where root access is unavailable or undesirable.

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

ocproxy is a compact example of a network utility whose packaging value comes from composition: OpenConnect supplies the VPN transport, lwIP supplies a userland TCP/IP stack, and ocproxy exposes a Unix-friendly proxy/port-forwarding surface.

### 时间线

- 2012-11-20: initial release.
- 2014-07-06: version 1.50 improved SOCKS stability, added a man page, adopted autotools, and refreshed lwIP.
- 2017-01-08: version 1.60 added experimental `vpnns` and local SOCKS bind-address support.

### Related projects

- ocproxy is closely tied to OpenConnect, lwIP, SOCKS tooling such as tsocks and Dante, and the Linux network-namespace helper `vpnns` included in the same repository.

### 来源

- <https://github.com/cernekee/ocproxy>
- <https://manpages.ubuntu.com/manpages/bionic/man1/ocproxy.1.html>
- <https://raw.githubusercontent.com/cernekee/ocproxy/master/AUTHORS>
- <https://raw.githubusercontent.com/cernekee/ocproxy/master/CHANGES>
- <https://raw.githubusercontent.com/cernekee/ocproxy/master/README.md>
- source_facts.executables
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - ocproxy - 1.60-1+b3: normalized package name match | Debian stable package indexes: ocproxy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SOCKS proxy for openconnect | https://github.com/cernekee/ocproxy
- Nix - ocproxy: normalized package name match | nixpkgs package indexes: pkgs/by-name/oc/ocproxy/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ocproxy - 1.60-1build6: normalized package name match | Ubuntu 24.04 LTS package indexes: ocproxy from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | SOCKS proxy for openconnect | https://github.com/cernekee/ocproxy
- dnf - ocproxy - 1.60-17.20190728gitc98f06d.fc45: normalized package name match | Fedora Rawhide package metadata: ocproxy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | OpenConnect Proxy | https://github.com/cernekee/ocproxy


## Combined YAML source

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