- 1232026-09-02147
RT,本帖旨在分享如何使用cpa反代gpt,新手畅享版。
前提
本教材需要全程使用魔法上网工具,并打开虚拟网卡模式(Tun 模式)。
cli proxy api
安装 cli proxy api(CPA 反代工具)
下载下载地址:https://github.com/router-for-me/CLIProxyAPI/releases
解压修改配置文件
我们修改一下 config.yaml 文件
可以参考一下官方的文档:https://help.router-for.me/cn/configuration/options.html,简单使用跟着我下面的修改参数即可
服务器绑定主机/接口,默认空字符串同时绑定 IPv4/IPv6。
使用 "127.0.0.1" 或 "localhost" 可限制仅本机访问。
host: ""
服务器端口
port: 8317
管理 API 设置
remote-management:
是否允许远程(非 localhost)访问管理接口。
为 false 时仅允许 localhost,仍需管理密钥。
allow-remote: true
管理密钥。若填写明文,启动时会自动哈希后生效。
所有管理请求(包括本地)都需要该密钥。
留空则完全禁用管理 API(所有 /v0/management 路由返回 404)。
secret-key: "你的密码"
认证目录(支持 ~ 展开为主目录)
./.cli-proxy-api 为当前目录下创建一个 .cli-proxy-api 文件
auth-dir: "./.cli-proxy-api"
是否启用调试日志
debug: true
为 false 时禁用内存用量统计聚合
usage-statistics-enabled: true
运行并配置认证文件
运行
修改完成之后点击 cli-proxy-api.exe 启动即可,运行完打开:http://localhost:8317/management.html#/login
就可以看见我们的登录页面了配置认证文件
OAuth 登录
我们点开 OAuth 登录菜单,点击开始 Codex 登录,之后的步骤请在虚拟网卡模式(Tun 模式)进行认证文件
配额管理
配置面板
使用 Codex 并配置 API Key
手动配置
配置 Codex (~/.codex/config.toml)新版codex也就是chatgpt通过api使用已经不能用auth.json认证了,所以只修改config.toml一个文件就行。
model_provider = "cpaapi"
model = "gpt-5.6-sol"
model_reasoning_effort = "medium"[model_providers.cpaapi]
name = "cpaapi"
base_url = "http://localhost:8317/v1"
experimental_bearer_token = "<cpaapi的Key>"
wire_api = "responses"
experimental_bearer_token注意这个一定要配置,并且在config.toml内!!! 沙发
那么问题来了 codex哪里领 我要领得到codex还需要cpa
巔峰標杆『夜魅館日本外送』!每一次互動都超乎想象
飛機@y5278不怕封号么