Bumps the minor-and-patch group in /frontend with 5 updates: | Package | From | To | | --- | --- | --- | | [@lucide/vue](https://github.com/lucide-icons/lucide/tree/HEAD/packages/vue) | `1.37.0` | `1.41.0` | | [vue-router](https://github.com/vuejs/router) | `5.3.0` | `5.3.1` | | [@antfu/eslint-config](https://github.com/antfu/eslint-config) | `9.3.0` | `9.5.1` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.4.0` | `26.4.1` | | [eslint](https://github.com/eslint/eslint) | `10.9.1` | `10.10.0` | Updates `@lucide/vue` from 1.37.0 to 1.41.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.41.0/packages/vue) Updates `vue-router` from 5.3.0 to 5.3.1 - [Release notes](https://github.com/vuejs/router/releases) - [Commits](https://github.com/vuejs/router/compare/v5.3.0...v5.3.1) Updates `@antfu/eslint-config` from 9.3.0 to 9.5.1 - [Release notes](https://github.com/antfu/eslint-config/releases) - [Commits](https://github.com/antfu/eslint-config/compare/v9.3.0...v9.5.1) Updates `@types/node` from 26.4.0 to 26.4.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `eslint` from 10.9.1 to 10.10.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v10.9.1...v10.10.0) --- updated-dependencies: - dependency-name: "@lucide/vue" dependency-version: 1.41.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: vue-router dependency-version: 5.3.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@antfu/eslint-config" dependency-version: 9.5.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/node" dependency-version: 26.4.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: eslint dependency-version: 10.10.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
功能
- 在网页中添加账号,查看额度、请求记录和费用,刷新或重新授权过期账号。
- 用账号分组控制不同密钥可使用的账号,设置并发和请求频率。
- 接入 Codex CLI、桌面端和支持 Responses API 的客户端。
- 支持流式对话、WebSocket、图片生成与编辑、Codex 独立搜索。
- 支持 S3/R2 数据库备份、同大版本在线更新和回滚。
支持 OpenAI、xAI 账号,但图片与独立搜索目前仅通过 OpenAI 提供。模型和功能是否可用取决于上游账号权限。
不支持 /v1/chat/completions;仅支持该接口的客户端不能直接接入。
快速开始
使用 Docker Compose 部署发布镜像 ghcr.io/zyycn/codex-proxy-rs:latest,同时启动 PostgreSQL 和 Redis。
以下命令适用于 Linux amd64/arm64,需要 Docker Engine、Docker Compose Plugin、curl 和 OpenSSL。已有部署请先看
升级说明,不要覆盖原配置。
1. 下载部署文件并配置
mkdir -p codex-proxy-rs/deploy
cd codex-proxy-rs
curl -fsSL https://raw.githubusercontent.com/zyycn/codex-proxy-rs/main/deploy/compose.yaml \
-o deploy/compose.yaml
curl -fsSL https://raw.githubusercontent.com/zyycn/codex-proxy-rs/main/deploy/config.example.yaml \
-o deploy/config.example.yaml
mkdir -p .runtime/data .runtime/logs
install -d -m 0750 .runtime/postgres .runtime/redis
cp deploy/config.example.yaml deploy/config.yaml
sudo chown "$(id -u):10001" deploy/config.yaml
chmod 0640 deploy/config.yaml
sudo chown -R "$(id -u):10001" .runtime/data .runtime/logs
chmod 0770 .runtime/data .runtime/logs
分别生成数据库和 Redis 密码:
openssl rand -hex 24
openssl rand -hex 24
编辑 deploy/config.yaml,填好以下三项:
| 配置项 | 填写内容 |
|---|---|
store.database.password |
第一个生成的 48 位十六进制密码 |
store.redis.password |
第二个生成的 48 位十六进制密码 |
admin.default_password |
管理员初始密码,至少 12 位,不能包含 $ |
不需要创建 .env。管理员初始密码只在首次创建账号时使用。
2. 启动服务
docker compose -f deploy/compose.yaml config --quiet
docker compose -f deploy/compose.yaml pull
docker compose -f deploy/compose.yaml up -d --no-build --wait
curl -i http://127.0.0.1:8080/healthz
健康检查返回 204 No Content 后,打开 http://127.0.0.1:8080,
使用 admin@cpr.local 和刚设置的管理员密码登录。
默认地址只能在服务器本机访问。从其他设备使用时,需要配置 HTTPS 反向代理。
3. 添加账号和密钥
- 在「账号」中添加 OpenAI 或 xAI 账号。OpenAI 支持 OAuth 授权、AT/RT 和账号 JSON;xAI 支持 OAuth 授权和账号 JSON。
- 按需创建账号分组,并把账号加入分组。
- 创建客户端密钥,选择可用分组。不选分组表示可使用全部账号。
- 点击该密钥的「使用密钥」,复制客户端配置。
只导入 AT 的账号不能自动续期。xAI 暂不支持用 API Key 导入上游账号。
客户端接入
Codex CLI 和桌面端
在「使用密钥」中按系统复制 config.toml 和 auth.json,也可以通过 CCSwitch 导入。
已有文件先备份,再合并配置并重启 Codex。客户端使用代理密钥,OpenAI 账号登录状态由服务端管理。
新配置已启用原生生图。可以直接提出需求,例如:
帮我做一个咖啡店首页,生成一张咖啡主题配图并用到页面中。
是否调用生图由 Codex 根据任务决定,也可以明确要求生成图片。需要支持生图的客户端、模型和 OpenAI 账号; 普通对话可用不代表账号一定有生图额度。
完整配置和旧版配置迁移见 客户端配置。
其他客户端
选择支持 Responses API 的客户端,填写:
| 配置 | 值 |
|---|---|
| Base URL | http://127.0.0.1:8080/v1,远程使用时换成服务器的 HTTPS 地址 |
| API Key | 管理端创建的 sk_... 密钥 |
可先检查密钥是否能读取模型列表:
curl http://127.0.0.1:8080/v1/models \
-H 'Authorization: Bearer <client-api-key>'
接口列表与请求示例见 接口文档。
常见问题
仍然要求登录,或无法生成图片
重新从管理端复制配置,确认修改的是客户端实际读取的用户配置目录,然后完全退出并重启客户端。
保留仅含代理密钥的 auth.json 不会使新配置失效。详细检查步骤见
登录与生图排查。
没有可用账号或模型
检查账号是否启用、凭据是否过期、额度是否耗尽,以及密钥绑定的分组是否包含可用账号。 「恢复账号」只清除本地错误状态,不能恢复上游权限或增加额度。
如何更新或查看日志
同一大版本内拉取发布镜像并重建应用容器:
docker compose -f deploy/compose.yaml pull codex-proxy-rs
docker compose -f deploy/compose.yaml up -d --no-build codex-proxy-rs
docker compose -f deploy/compose.yaml logs --tail=100 -f codex-proxy-rs
Warning
升级前先备份。跨大版本需使用新的数据目录重新部署,不支持直接沿用旧库在线升级。
.runtime/包含数据库和运行数据,请勿删除;账号文件、密钥和日志也不要公开分享。