2026-06-14 02:19:47 +08:00
2026-06-14 02:19:47 +08:00
2026-06-14 02:19:47 +08:00
2026-06-14 02:19:47 +08:00
2026-06-14 01:26:18 +08:00
2026-06-14 01:26:18 +08:00
2026-06-14 01:26:18 +08:00

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 with cpr_.
  • 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
S
Description
基于 Rust 的低风控、高性能、自托管多账号透明代理网关
Readme Apache-2.0
45 MiB
Languages
Rust 90%
Vue 5.7%
TypeScript 3.7%
PLpgSQL 0.4%
Ruby 0.1%