icebear0828 Claude Opus 4.6 commited on
Commit
79118b7
·
1 Parent(s): c208090

docs: reorganize README quick start by platform

Browse files

Merge the separate Deployment section into Quick Start with
per-platform instructions (Docker / macOS+Linux / Windows).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. README.md +32 -35
README.md CHANGED
@@ -16,7 +16,6 @@
16
  <a href="#-快速开始-quick-start">快速开始</a> •
17
  <a href="#-核心功能-features">核心功能</a> •
18
  <a href="#-技术架构-architecture">技术架构</a> •
19
- <a href="#-部署方式-deployment">部署方式</a> •
20
  <a href="#-客户端接入-client-setup">客户端接入</a> •
21
  <a href="#-配置说明-configuration">配置说明</a>
22
  </p>
@@ -37,21 +36,44 @@
37
  ## 🚀 快速开始 (Quick Start)
38
 
39
  ```bash
40
- # 1. 克隆仓库
41
  git clone https://github.com/icebear0828/codex-proxy.git
42
  cd codex-proxy
 
 
 
 
 
 
 
 
43
 
44
- # 2. 安装依赖(也支pnpm / bun
45
- npm install
46
- cd web && npm install && cd ..
47
 
48
- # 3. 启动代理(开发模式,支持热重载)
49
- npm run dev
50
 
51
- # 4. 打开浏览器访问控制面板,使用 ChatGPT 账号登录
52
- # http://localhost:8080
 
 
 
 
53
 
54
- # 5. 测试请求
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  curl http://localhost:8080/v1/chat/completions \
56
  -H "Content-Type: application/json" \
57
  -d '{
@@ -208,30 +230,6 @@ for await (const chunk of stream) {
208
  }
209
  ```
210
 
211
- ## 🐳 部署方式 (Deployment)
212
-
213
- ### Docker 部署(推荐,所有平台通用)
214
-
215
- ```bash
216
- git clone https://github.com/icebear0828/codex-proxy.git
217
- cd codex-proxy
218
- docker compose up -d
219
- # 打开 http://localhost:8080 登录
220
- ```
221
-
222
- 数据持久化通过 volume 映射:`data/`(账号、Cookie)和 `config/`(配置文件)。
223
-
224
- ### 原生部署(macOS / Linux)
225
-
226
- ```bash
227
- git clone https://github.com/icebear0828/codex-proxy.git
228
- cd codex-proxy
229
- npm install && cd web && npm install && cd .. && npm run build && npm start # 也支持 pnpm / bun
230
- # 打开 http://localhost:8080 登录
231
- ```
232
-
233
- > Docker 部署自动安装 curl-impersonate(Linux 版)和 unzip(自动更新用)。原生部署依赖 `npm install` 的 postinstall 脚本自动下载 curl-impersonate。
234
-
235
  ## ⚙️ 配置说明 (Configuration)
236
 
237
  所有配置位于 `config/default.yaml`:
@@ -300,7 +298,6 @@ server:
300
 
301
  - Codex API 为**流式输出专用**,设置 `stream: false` 时代理会内部流式收集后返回完整 JSON
302
  - 本项目依赖 Codex Desktop 的公开接口,上游版本更新时会自动检测并更新指纹
303
- - 建议在 **Linux / macOS** 上部署以获得完整 TLS 伪装能力(Windows 下 curl-impersonate 暂不可用,降级为系统 curl)
304
  - `config/default.yaml` 中的注释在自动更新后会丢失(使用结构化 YAML 写入)
305
 
306
  ## 📄 许可协议 (License)
 
16
  <a href="#-快速开始-quick-start">快速开始</a> •
17
  <a href="#-核心功能-features">核心功能</a> •
18
  <a href="#-技术架构-architecture">技术架构</a> •
 
19
  <a href="#-客户端接入-client-setup">客户端接入</a> •
20
  <a href="#-配置说明-configuration">配置说明</a>
21
  </p>
 
36
  ## 🚀 快速开始 (Quick Start)
37
 
38
  ```bash
 
39
  git clone https://github.com/icebear0828/codex-proxy.git
40
  cd codex-proxy
41
+ ```
42
+
43
+ ### Docker(推荐,所有平台通用)
44
+
45
+ ```bash
46
+ docker compose up -d
47
+ # 打开 http://localhost:8080 登录
48
+ ```
49
 
50
+ 数据久化通过 volume 映射:`data/`(账号、Cookie)和 `config/`(配置文件
 
 
51
 
52
+ ### macOS / Linux
 
53
 
54
+ ```bash
55
+ npm install # 安装后端依赖 + 自动下载 curl-impersonate
56
+ cd web && npm install && cd .. # 安装前端依赖
57
+ npm run dev # 开发模式(热重载)
58
+ # 或:npm run build && npm start # 生产模式
59
+ ```
60
 
61
+ > 也支持 `pnpm` 或 `bun`,将上方 `npm` 替换即可。
62
+
63
+ ### Windows
64
+
65
+ ```bash
66
+ npm install # 安装后端依赖
67
+ cd web && npm install && cd .. # 安装前端依赖
68
+ npm run dev # 开发模式(热重载)
69
+ ```
70
+
71
+ > Windows 下 curl-impersonate 暂不可用,自动降级为系统 curl(无 Chrome TLS 伪装)。建议搭配本地代理使用,或通过 Docker / WSL 部署以获得完整 TLS 伪装能力。
72
+
73
+ ### 验证
74
+
75
+ ```bash
76
+ # 打开 http://localhost:8080 使用 ChatGPT 账号登录,然后:
77
  curl http://localhost:8080/v1/chat/completions \
78
  -H "Content-Type: application/json" \
79
  -d '{
 
230
  }
231
  ```
232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  ## ⚙️ 配置说明 (Configuration)
234
 
235
  所有配置位于 `config/default.yaml`:
 
298
 
299
  - Codex API 为**流式输出专用**,设置 `stream: false` 时代理会内部流式收集后返回完整 JSON
300
  - 本项目依赖 Codex Desktop 的公开接口,上游版本更新时会自动检测并更新指纹
 
301
  - `config/default.yaml` 中的注释在自动更新后会丢失(使用结构化 YAML 写入)
302
 
303
  ## 📄 许可协议 (License)