ghost-proxy by ghostsecurity/skills
npx skills add https://github.com/ghostsecurity/skills --skill ghost-proxyReaper 是一款基于 CLI 的 MITM HTTPS 代理,用于应用程序安全测试。它能拦截、记录并允许检查流经它的 HTTP/HTTPS 流量。用它来捕获实时的请求/响应对,以进行安全验证。
在使用任何 reaper 命令之前,请确保已安装最新版本的二进制文件:
curl -sfL https://raw.githubusercontent.com/ghostsecurity/reaper/main/scripts/install.sh | bash
除非 ~/.ghost/bin 已在 PATH 环境变量中,否则本文档中的所有 reaper 命令都应作为 ~/.ghost/bin/reaper 调用。
| 命令 | 用途 |
|---|---|
reaper start --domains example.com |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 启动代理(前台运行) |
reaper start --domains example.com -d | 启动代理(守护进程) |
reaper logs | 显示最近捕获的条目 |
reaper search --method POST --path /api/* | 搜索捕获的流量 |
reaper get <id> | 显示完整的请求和响应 |
reaper req <id> | 仅显示原始 HTTP 请求 |
reaper res <id> | 仅显示原始 HTTP 响应 |
reaper stop | 停止守护进程 |
启动 reaper 并限定到目标域。至少需要一个 --domains 或 --hosts 标志。
# 拦截所有发往 example.com 及其子域的流量
reaper start --domains example.com
# 多个域名
reaper start --domains example.com,api.internal.co
# 精确主机名匹配
reaper start --hosts api.example.com
# 同时使用域名后缀和精确主机匹配
reaper start --domains example.com --hosts special.internal.co
# 自定义端口(默认:8443)
reaper start --domains example.com --port 9090
# 作为后台守护进程运行
reaper start --domains example.com -d
作用域行为:
--domains:后缀匹配。example.com 匹配 example.com、api.example.com、sub.api.example.com--hosts:精确匹配。api.example.com 仅匹配 api.example.com配置 HTTP 客户端以使用代理。默认监听地址是 localhost:8443。
# curl
curl -x http://localhost:8443 -k https://api.example.com/endpoint
# 环境变量(适用于许多工具)
export http_proxy=http://localhost:8443
export https_proxy=http://localhost:8443
# Python requests
import requests
requests.get("https://api.example.com/endpoint",
proxies={"http": "http://localhost:8443", "https": "http://localhost:8443"},
verify=False)
需要 -k / verify=False 标志,因为 reaper 在启动时会生成自己的 CA 证书用于 MITM TLS 拦截。
# 显示最后 50 个条目(默认)
reaper logs
# 显示最后 200 个条目
reaper logs -n 200
输出列:ID、METHOD、HOST、PATH、STATUS、MS、REQ(请求体大小)、RES(响应体大小)。
# 按 HTTP 方法
reaper search --method POST
# 按主机(支持 * 通配符)
reaper search --host *.api.example.com
# 按域名后缀
reaper search --domains example.com
# 按路径前缀(支持 * 通配符)
reaper search --path /api/v3/transfer
# 按状态码
reaper search --status 200
# 组合过滤器
reaper search --method POST --path /api/v3/* --status 200 -n 50
# 完整的请求和响应(原始 HTTP)
reaper get 42
# 仅请求
reaper req 42
# 仅响应
reaper res 42
输出是原始的 HTTP/1.1 格式,包括头部和正文,适合分析或重放。
reaper stop
与 validate 技能配合使用时(可能需要与用户协作设置测试环境):
reaper logs 验证流量是否被捕获 —— 在通过代理路由测试请求后,应至少出现一个条目reaper get <id> 捕获完整的请求/响应作为证据所有数据都存储在 ~/.reaper/ 目录中:
reaper.db - 包含捕获条目的 SQLite 数据库reaper.sock - 用于 CLI 与守护进程间 IPC 的 Unix 套接字reaper.pid - 守护进程的进程 IDCA 证书在每次启动时在内存中重新生成,不会持久化。
每周安装数
592
代码仓库
GitHub 星标数
368
首次出现
2026 年 2 月 20 日
安全审计
安装于
claude-code492
github-copilot137
gemini-cli136
codex136
kimi-cli136
amp136
Reaper is a CLI-based MITM HTTPS proxy for application security testing. It intercepts, logs, and allows inspection of HTTP/HTTPS traffic flowing through it. Use it to capture live request/response pairs for security validation.
Before using any reaper command, make sure the latest version of the binary is installed:
curl -sfL https://raw.githubusercontent.com/ghostsecurity/reaper/main/scripts/install.sh | bash
All reaper commands in this document should be invoked as ~/.ghost/bin/reaper unless ~/.ghost/bin is on PATH.
| Command | Purpose |
|---|---|
reaper start --domains example.com | Start proxy (foreground) |
reaper start --domains example.com -d | Start proxy (daemon) |
reaper logs | Show recent captured entries |
reaper search --method POST --path /api/* | Search captured traffic |
reaper get <id> | Show full request + response |
reaper req <id> | Show raw HTTP request only |
reaper res <id> | Show raw HTTP response only |
reaper stop | Stop the daemon |
Start reaper scoped to the target domain(s). At least one --domains or --hosts flag is required.
# Intercept all traffic to example.com and its subdomains
reaper start --domains example.com
# Multiple domains
reaper start --domains example.com,api.internal.co
# Exact hostname matching
reaper start --hosts api.example.com
# Both domain suffix and exact host matching
reaper start --domains example.com --hosts special.internal.co
# Custom port (default: 8443)
reaper start --domains example.com --port 9090
# Run as background daemon
reaper start --domains example.com -d
Scope behavior :
--domains: Suffix match. example.com matches example.com, api.example.com, sub.api.example.com--hosts: Exact match. api.example.com matches only api.example.comConfigure the HTTP client to use the proxy. The default listen address is localhost:8443.
# curl
curl -x http://localhost:8443 -k https://api.example.com/endpoint
# Environment variables (works with many tools)
export http_proxy=http://localhost:8443
export https_proxy=http://localhost:8443
# Python requests
import requests
requests.get("https://api.example.com/endpoint",
proxies={"http": "http://localhost:8443", "https": "http://localhost:8443"},
verify=False)
The -k / verify=False flag is needed because reaper generates its own CA certificate at startup for MITM TLS interception.
# Show last 50 entries (default)
reaper logs
# Show last 200 entries
reaper logs -n 200
Output columns: ID, METHOD, HOST, PATH, STATUS, MS, REQ (request body size), RES (response body size).
# By HTTP method
reaper search --method POST
# By host (supports * wildcard)
reaper search --host *.api.example.com
# By domain suffix
reaper search --domains example.com
# By path prefix (supports * wildcard)
reaper search --path /api/v3/transfer
# By status code
reaper search --status 200
# Combined filters
reaper search --method POST --path /api/v3/* --status 200 -n 50
# Full request and response (raw HTTP)
reaper get 42
# Request only
reaper req 42
# Response only
reaper res 42
Output is raw HTTP/1.1 format including headers and body, suitable for analysis or replay.
reaper stop
When used with the validate skill (may need to collaborate with the user to setup the test environment):
reaper logs — at least one entry should appear after routing a test request through the proxyreaper get <id> to capture the full request/response as evidenceAll data is stored in ~/.reaper/:
reaper.db - SQLite database with captured entriesreaper.sock - Unix socket for CLI-to-daemon IPCreaper.pid - Daemon process IDThe CA certificate is generated fresh in memory on each start and is not persisted.
Weekly Installs
592
Repository
GitHub Stars
368
First Seen
Feb 20, 2026
Security Audits
Gen Agent Trust HubFailSocketFailSnykFail
Installed on
claude-code492
github-copilot137
gemini-cli136
codex136
kimi-cli136
amp136
Better Auth 身份验证技能指南:为 TypeScript/JavaScript 应用添加认证
11,300 周安装