mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
f0e62e4d9cc39528df9255268830d756cd0830c5
codex-proxy-rs
Rust rewrite of Codex Proxy focused only on ChatGPT/Codex accounts and the Codex backend.
Included
/v1/chat/completions/v1/responses/v1/models- ChatGPT/Codex OAuth and refresh-token based account pool
- Codex Desktop-style TLS, headers, Cookies, and fingerprint updates
- SQLite storage with sqlx-managed schema
- Structured logs with pagination and file rotation
Excluded
- OpenAI official API Key upstream
- Anthropic, Gemini, custom providers, OpenRouter-style routing
- Ollama bridge
- Per-account proxy assignment
- Electron app
- Legacy compatibility layers and old-project data migration scripts
Auth Model
- Admin login uses admin password and HttpOnly session Cookie.
- Client API keys call
/v1/*and start withcpr_. - Codex account tokens are internal upstream credentials.
Development
Runtime config is loaded from config.yaml in the project root, then optional
local.yaml / local.yml.
cargo fmt --check
cargo clippy --all-targets --all-features --locked -- -D warnings
cargo test
cargo run
Health check:
curl -s http://127.0.0.1:8080/health
Languages
Rust
90%
Vue
5.7%
TypeScript
3.7%
PLpgSQL
0.4%
Ruby
0.1%