By starbaser
Intercept and transform LLM API traffic with a mitmproxy-based server that supports OAuth authentication, sentinel key substitution, and model routing for OpenAI and Anthropic SDKs, and debug traffic flows through CLI tools or WireGuard capture.
Guides users through ccproxy as an OpenAI-compatible and Anthropic-compatible LLM API server with SDK integration, OAuth authentication, sentinel key substitution, model routing, and troubleshooting. Use when installing ccproxy, configuring SDK clients (Anthropic, OpenAI, LiteLLM, Agent SDK) against ccproxy, setting up per-project instances, debugging authentication errors, setting up OAuth token forwarding, or understanding the hook pipeline and shaping system.
Operates the ccproxy inspector MITM system for intercepting, inspecting, and transforming LLM API traffic. Covers running CLI tools through the reverse proxy or permissive WireGuard namespace capture path, checking namespace status and doctor output, inspecting flows with client-vs-forwarded request comparison, understanding the inbound/transform/outbound pipeline, capturing and auditing shape artifacts, applying the privacy guide, and diagnosing flow issues. Use when running CLI applications through ccproxy, inspecting intercepted flows, comparing client request vs forwarded request, checking shaping profile status, using WireGuard namespace capture, explaining privacy behavior, or debugging the hook pipeline.
ccproxy — CLI Proxy ccproxy is a transparent network interceptor for LLM tooling and AI harnesses,
built on mitmproxy and WireGuard with full TLS inspection and Wireshark keylog
export. Originally purpose-built for Claude Code, ccproxy now works with any LLM
client: Aider, Cursor, OpenAI SDK, or anything else that speaks HTTP. It jails a
process inside a rootless WireGuard namespace, intercepts at the network layer,
and feeds it through a DAG-driven pipeline that can decompose, transform, and
re-route traffic between providers.
Cross-provider request and response transformation is handled by lightllm, a
surgical adapter and streaming-FSM layer inside ccproxy — no LiteLLM proxy
subprocess, no gateway server.
New in 2.0: Codex/OpenAI Responses support with packaged request shaping,
plus DeepSeek V4 routing for Anthropic-format requests through DeepSeek's
/anthropic/v1/messages endpoint. See Configuration for
the routing setup.
The hook pipeline is your extension point for building mods and taking control of your LLM usage while respecting terms of service:
/mcp endpoint, and experimental
tasks
support.Feedback and contributions welcome — open an issue or submit a PR.
| Platform | Reverse proxy (ccproxy start) | WireGuard namespace jail (ccproxy run --capture) |
|---|---|---|
| Linux | ✅ | ✅ |
| Windows (WSL2) | ✅ | ✅ |
| macOS | ✅ | ❌ — requires Linux namespaces |
WSL2 is fully supported because it is Linux. Native Windows is not — use WSL2.
On macOS, the reverse proxy listener (ccproxy start + SDK use) works fine, but
the namespace jail (ccproxy run --capture) requires Linux kernel features
(unprivileged user/net namespaces, slirp4netns, iptables NAT) that have no
macOS equivalent.
The recommended Windows install is the ccproxy.wsl distro artifact. It is
built on NixOS-WSL and includes ccproxy plus the Linux namespace tools required
by ccproxy run --capture.
# Requires Store WSL 2.4.4 or newer.
wsl --update
wsl --version
wsl --install --from-file ccproxy.wsl
wsl -d ccproxy
Inside the distro:
ccproxy init
ccproxy start
ccproxy namespace status --json
ccproxy namespace doctor --json
Tier 1 Windows support is Windows 11 22H2+ with Store-distributed WSL2, systemd enabled, and mirrored networking recommended. Windows 10 and older WSL networking are best-effort. WSL1 and native Windows without WSL are unsupported.
Advanced users can still use Ubuntu on WSL2 with systemd and Nix, but the release artifact is the primary out-of-box path.
The WireGuard namespace jail needs a small set of system tools on PATH:
slirp4netns, wireguard-tools (wg), iproute2 (ip), iptables,
util-linux (unshare, nsenter), and procps (sysctl).
# Debian / Ubuntu
sudo apt update
sudo apt install -y slirp4netns wireguard-tools iproute2 iptables procps
# Fedora
sudo dnf install -y slirp4netns wireguard-tools iproute iptables-nft procps-ng
# Arch
sudo pacman -S slirp4netns wireguard-tools iproute2 iptables procps-ng
# NixOS — provided via the project devShell (`nix develop`)
Then install ccproxy:
# Recommended: uv tool (isolated venv, console scripts on PATH)
uv tool install ai-ccproxy
# Alternative: pip
pip install ai-ccproxy
On Ubuntu 24.04+, unprivileged user namespaces are restricted by AppArmor by default. Either run once:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
…or add a path-scoped AppArmor profile (see rootless-containers/rootlesskit).
Only the reverse proxy is supported. No system packages are required.
uv tool install ai-ccproxy
# or
pip install ai-ccproxy
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub starbaser/ccproxyRun any model with an Anthropic- or OpenAI-compatible API (e.g. DeepSeek, GLM, Kimi, Qwen, MiniMax) — even your Codex subscription — as real Claude Code workflows, agent-team teammates, or one-shot subagents, driven exactly like native ones. Your main session's own auth is untouched (OAuth subscription or API key, either works); API-key providers bill the provider key via apiKeyHelper, while a Codex subscription bills through a local OAuth daemon — each worker receives its credential on demand, never through its env or argv. Requires the `cc-fleet` binary on PATH, installed separately.
Flagship+ skill pack for OpenRouter - 30 skills for multi-model routing, fallbacks, and LLM gateway mastery
Inject SubagentStart marker context for copilot-api initiator override.
When calling LLM APIs from Python code. When connecting to llamafile or local LLM servers. When switching between OpenAI/Anthropic/local providers. When implementing retry/fallback logic for LLM calls. When code imports litellm or uses completion() patterns.
TrueFoundry AI Gateway plugin — onboarding, model routing, MCP servers, prompts, Skills Registry workflows, observability, guardrails, and codebase migration. Works across Claude Code, Codex, and Cursor.
Smart LLM routing with Claude subscription monitoring, complexity-first model selection, and 20+ AI providers