Skip to content

轻量级 Claude API 反向代理,Web UI 即时切换供应商,自动发现模型,批量测试模型是否可用。Lightweight Claude API reverse proxy with Web UI for instant provider switching, auto model discovery, batch testing.

Notifications You must be signed in to change notification settings

QAA-Tools/ccproxy

Repository files navigation

Claude Code Proxy

简体中文

A lightweight Claude API reverse proxy providing Web UI to manage multiple providers with auto model discovery and instant switching.

demo

Core Features

  • Instant Switching - Switch providers via Web UI without restarting Claude Code
  • Auto Discovery - Automatically fetch model lists from provider's /v1/models
  • HTTP Overrides - Spoof client characteristics to bypass site detection
  • Batch Testing - Refresh & Test all providers in one click
  • Hot Reload - Reload config changes via UI

Quick Start

# 1. Copy config
cp config.in.json config.json

# 2. Edit config.json to add provider info

# 3. Start proxy
python ccproxy.py --config config.json

# 4. Configure Claude Code (~/.claude/settings.json)
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_APIKEY>",
    "ANTHROPIC_BASE_URL": "http://127.0.0.1:3456"
  }
}

# 5. Access Web UI
# http://127.0.0.1:3456 (password is your APIKEY)

Full Documentation

For detailed configuration, button functions, HTTP overrides, FAQ, etc., visit:

📖 Full Documentation or local access http://127.0.0.1:3456/docs

Background Run (Linux)

Use run.sh script to manage background process:

./run.sh start    # Start
./run.sh stop     # Stop
./run.sh restart  # Restart
./run.sh status   # Status

Logs: ccproxy.log | PID: ccproxy.pid

Tools

ccp_update_model.py - Update model list in ccproxy config.json

python tools/ccp_update_model.py --timeout 5 --filter "4-5,sonnet"

ccp2ccr.py - Convert config to claude-code-router format

bash tools/ccp2ccr.sh

ccp2ccswitch.py - Convert config to CC Switch SQL format

bash tools/ccp2ccswitch.sh

ccp2cliproxy.py - Convert config to CLIProxyAPI YAML format

bash tools/ccp2cliproxy.sh

See tools/README.md for details.

Credits

Claude Code, Codex, Antigravity

License

MIT

About

轻量级 Claude API 反向代理,Web UI 即时切换供应商,自动发现模型,批量测试模型是否可用。Lightweight Claude API reverse proxy with Web UI for instant provider switching, auto model discovery, batch testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published