CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

Tor

$ tor 基金会 中风险
The Tor Project · 浏览器与网页抓取 · BSD-3-Clause · macos / linux / windows

tor 在本地运行洋葱路由客户端守护进程,开放 SOCKS5 代理端口(tor -f torrc --SocksPort 9050)并支持访问 .onion 服务。提供 --verify-config 用于离线校验 torrc 语法以及 --list-torrc-options 自省支持,但启动构建链路通常需要数秒。

FCRS-1.0 综合评分
76 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install tor
CLI vs MCP 选型建议 仅 CLI 可用

负责在本地运行 Tor 链路路由与 SOCKS5 监听端口(--SocksPort 9050)供 curl --socks5-hostname 或浏览器使用;MCP 服务器无法运行洋葱路由。

Agent 友好度体检单

— 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
✓ 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 16 / 25

提供 --verify-config、--list-torrc-options 与确定性命令行参数,但守护进程会阻塞并仅输出纯文本启动日志,无 JSON 支持。

  • --verify-config validates torrc offline
  • Blocking daemon with text bootstrap logs
安全与权限边界 18 / 25

仅客户端 SOCKS5 模式较为安全且无需外部凭据,但会向 DataDirectory 写入共识状态,若误配中继节点则存在网络风险。

  • Client SOCKS5 mode does not expose inbound ports when bound to 127.0.0.1
安装与运行摩擦 13 / 15

覆盖 macOS(brew install tor)、各 Linux 发行版及 Windows 平台 Tor Expert Bundle。

  • Official cross-platform Tor Expert Bundle and Homebrew formula
能力覆盖与边际价值 11 / 15

提供独特的匿名洋葱路由传输与 .onion 访问能力,但链路初始化会带来数秒启动延迟。

  • Multi-second circuit bootstrap delay before serving SOCKS5 requests
维护与来源背书 9 / 10

由非营利基金会 The Tor Project(torproject/tor)基于 BSD-3-Clause 协议长期维护。

  • Foundation-backed torproject/tor (BSD-3-Clause)
文档与可验证性 9 / 10

具备详尽的 tor(1) 官方手册与 --list-torrc-options 自省能力。

  • Official tor man page and --list-torrc-options

安全边界、鉴权与放权指南

鉴权方式
无需鉴权 本地配置文件
凭证存储位置

读取 torrc 配置文件;在 DataDirectory(如 ~/.tor)中缓存 Tor 网络共识、微描述符及可选的 ControlPort Cookie 认证文件。

潜在副作用
只读查询 本地写入
费用与配额提示

免费,由 The Tor Project 基于 BSD-3-Clause 协议维护的开源软件。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Tor Agent Rules
- Run `tor --verify-config -f torrc` before starting `tor` with custom configs.
- Keep `SocksPort` bound to `127.0.0.1` and never enable `ORPort` or `ExitRelay` unless explicitly building a relay.
- Wait for `Bootstrapped 100%` in logs before routing requests through `socks5h://127.0.0.1:9050`.

Agent 高频安全命令配方

只读查询(安全推荐)

在不启动 Tor 的情况下校验 torrc 配置
tor --verify-config -f torrc

验证 torrc 中的指令语法并立即退出,不打开任何网络套接字。

列出所有受支持的 torrc 配置项
tor --list-torrc-options

打印当前安装的 tor 构建版本所识别的全部 torrc 选项名。

受控写入与预演

启动本地 Tor 客户端 SOCKS5 代理
tor --SocksPort 127.0.0.1:9050 --DataDirectory /tmp/tor-data

初始化 Tor 链路并在 127.0.0.1:9050 监听本地 SOCKS5 连接。

核心优势

  • + --verify-config 可在启动守护进程前安全校验 torrc 配置。
  • + 提供标准本地 SOCKS5 代理(--SocksPort),可直接配合 curl --socks5-hostname 使用。

注意事项与踩坑点

  • ! 启动后需等待数秒直至日志出现 Bootstrapped 100% 才能正常代理请求。
  • ! 除非通过 ControlPort 协议控制,否则缺少 JSON 日志或状态输出。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI