mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 08:06:19 +00:00
32f9f3675da479d22b45b248ee3d6ef6c6faa3a7
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.41.0` | `1.45.0` | | [dompurify](https://github.com/cure53/DOMPurify) | `3.4.14` | `3.4.15` | | [marked](https://github.com/markedjs/marked) | `18.0.11` | `18.0.13` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.4.1` | `26.5.1` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.2.2` | `8.3.0` | Updates `@lucide/vue` from 1.41.0 to 1.45.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.45.0/packages/vue) Updates `dompurify` from 3.4.14 to 3.4.15 - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/3.4.14...3.4.15) Updates `marked` from 18.0.11 to 18.0.13 - [Release notes](https://github.com/markedjs/marked/releases) - [Commits](https://github.com/markedjs/marked/compare/v18.0.11...v18.0.13) Updates `@types/node` from 26.4.1 to 26.5.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `vite` from 8.2.2 to 8.3.0 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/create-vite@8.3.0/packages/vite) --- updated-dependencies: - dependency-name: "@lucide/vue" dependency-version: 1.45.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: dompurify dependency-version: 3.4.15 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: marked dependency-version: 18.0.13 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@types/node" dependency-version: 26.5.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: vite dependency-version: 8.3.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>
Note
本项目提供 Responses API,不支持
/v1/chat/completions。接入前请确认客户端支持 Responses 协议。
快速开始
使用 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
install -d -m 0750 .runtime/postgres .runtime/redis
sudo install -d -m 0770 -o "$(id -u)" -g 10001 .runtime/data .runtime/logs
sudo install -m 0640 -o "$(id -u)" -g 10001 deploy/config.example.yaml deploy/config.yaml
分别生成数据库和 Redis 密码:
openssl rand -hex 24
openssl rand -hex 24
编辑 deploy/config.yaml,填好以下三项:
| 配置项 | 填写内容 |
|---|---|
store.database.password |
第一个生成的 48 位十六进制密码 |
store.redis.password |
第二个生成的 48 位十六进制密码 |
admin.default_password |
管理员初始密码,至少 12 位,不能包含 $ |
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. 添加账号与客户端密钥
- 在「账号」中添加账号,完成授权或导入。
- 按需建立账号分组,再创建客户端密钥并选择可用分组。不选分组表示可使用全部账号。
- 打开密钥的「使用密钥」,复制客户端配置。
客户端接入
Codex CLI / 桌面端:在「使用密钥」中按操作系统复制配置,或通过 CCSwitch 导入。 合并到客户端配置后重启 Codex。完整步骤、生图配置与排障见客户端配置。
其他 Responses API 客户端:填写以下信息。
| 配置 | 值 |
|---|---|
| Base URL | http://127.0.0.1:8080/v1;远程接入使用服务器的 HTTPS 地址 |
| API Key | 管理端创建的客户端密钥 |
可用模型以该密钥查询到的模型列表为准:
curl http://127.0.0.1:8080/v1/models \
-H 'Authorization: Bearer <client-api-key>'
文档
社区
感谢 LINUX DO 社区提供开放、友善的技术交流平台。
许可证
本项目基于 Apache License 2.0 开源。
Languages
Rust
90%
Vue
5.7%
TypeScript
3.7%
PLpgSQL
0.4%
Ruby
0.1%