mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 08:06:19 +00:00
Capture first semantic output and transport timing, then surface concise latency values with safe phase details in dashboard and usage records. Keep the Codex Desktop request profile synchronized with successful appcast checks at runtime, without rewriting configuration or evicting existing WebSocket connections. Co-authored-by: Codex <noreply@openai.com>
105 lines
2.7 KiB
YAML
105 lines
2.7 KiB
YAML
# Codex Proxy RS 应用配置模板。
|
|
#
|
|
# 使用:
|
|
# cp deploy/config.example.yaml deploy/config.yaml
|
|
# sudo chown "$(id -u):10001" deploy/config.yaml
|
|
# chmod 640 deploy/config.yaml
|
|
#
|
|
# 三个密码建议分别执行 `openssl rand -hex 24` 生成。
|
|
|
|
x-cpr:
|
|
schema_version: 1
|
|
|
|
server:
|
|
# 本地 cargo run 使用;Docker 内由 compose.yaml 固定覆盖为 0.0.0.0:8080。
|
|
host: '127.0.0.1'
|
|
port: 8080
|
|
|
|
api:
|
|
base_url: 'https://chatgpt.com/backend-api'
|
|
|
|
database:
|
|
# 本地连接地址;Docker 内由 compose.yaml 固定改用 postgres 服务名。
|
|
# 密码不要写进 URL。
|
|
url: 'postgres://codex_proxy@127.0.0.1:5432/codex_proxy'
|
|
# 必填:48 位十六进制字符。
|
|
password: &postgres_password ''
|
|
|
|
redis:
|
|
# 本地连接地址;Docker 内由 compose.yaml 固定改用 redis 服务名。
|
|
# 密码不要写进 URL。
|
|
url: 'redis://127.0.0.1:6379/'
|
|
# 必填:48 位十六进制字符。
|
|
password: &redis_password ''
|
|
|
|
runtime:
|
|
# 相对路径以 deploy/config.yaml 所在目录为基准。
|
|
data_directory: '../.runtime/data'
|
|
|
|
quota:
|
|
refresh_interval_minutes: 5
|
|
skip_exhausted: true
|
|
|
|
ws_pool:
|
|
enabled: true
|
|
max_age_ms: 3300000
|
|
max_per_account: 8
|
|
# 首个真实输出的绝对超时,单位毫秒;0 表示禁用。
|
|
initial_event_timeout_ms: 20000
|
|
|
|
wire_profile:
|
|
# 该画像来自 Desktop 制品与 bundled Codex Core 的联合审计。
|
|
# appcast 成功检查后会自动同步 Desktop 版本和 Build;其余字段保持此处配置。
|
|
originator: 'Codex Desktop'
|
|
codex_version: '0.144.2'
|
|
desktop_version: '26.707.72221'
|
|
desktop_build: '5307'
|
|
# 固定参考主机画像;必须在重新抓包核验后再修改。
|
|
os_type: 'Mac OS'
|
|
os_version: '15.7.1'
|
|
arch: 'arm64'
|
|
terminal: 'unknown'
|
|
verified_at: '2026-07-15T02:25:50+08:00'
|
|
|
|
admin:
|
|
session_ttl_minutes: 1440
|
|
default_username: 'admin@cpr.local'
|
|
# 仅首次创建管理员时使用;至少 12 个字符且不能包含 `$`。
|
|
default_password: ''
|
|
|
|
logging:
|
|
level: 'info'
|
|
stdout: true
|
|
file:
|
|
enabled: true
|
|
# 相对路径以 deploy/config.yaml 所在目录为基准。
|
|
directory: '../.runtime/logs'
|
|
retention_days: 14
|
|
max_file_size_mb: 20
|
|
max_files: 20
|
|
|
|
telemetry:
|
|
enabled: true
|
|
|
|
# Compose 凭据桥接区。通常不需要修改。
|
|
services:
|
|
postgres-credentials:
|
|
environment:
|
|
POSTGRES_PASSWORD: *postgres_password
|
|
|
|
redis-credentials:
|
|
command:
|
|
- redis-server
|
|
- --appendonly
|
|
- 'yes'
|
|
- --requirepass
|
|
- *redis_password
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- redis-cli
|
|
- --no-auth-warning
|
|
- -a
|
|
- *redis_password
|
|
- ping
|