Share

外观
风格

cliproxy

2026年2月7日 · 技术

CLIProxyAPIPlus 本地部署

本地运行的 AI API 代理服务,聚合多个 OAuth 账号和 API Key。

服务信息

项目
二进制 <REDACTED_PATH>
启动脚本 <REDACTED_PATH>
管理脚本 <REDACTED_PATH>
更新脚本 <REDACTED_PATH>
配置目录 <REDACTED_PATH>
日志 <REDACTED_PATH>

服务管理

cliproxy start     # 启动
cliproxy stop      # 停止
cliproxy restart   # 重启
cliproxy status    # 状态 + 模型数
cliproxy log       # 实时日志
cliproxy err       # 错误日志
cliproxy models    # 列出模型

API 访问

# 代理 API(给客户端用)
curl -H "Authorization: Bearer <REDACTED_TOKEN>" http://localhost:8317/v1/models

# 管理 API(需要 base64 解码密码避免 ! 转义)
KEY=$(echo "<REDACTED_SECRET>" | base64 -d)  # <REDACTED_COMMENT_SECRET>
curl -H "Authorization: Bearer $KEY" http://localhost:8317/v0/management/usage

常用管理 API

操作 路径
使用统计 GET /v0/management/usage
认证文件列表 GET /v0/management/auth-files
配置 GET /v0/management/config
OAuth 登录 GET /v0/management/{provider}-auth-url

R2 同步

# 上传认证到 R2
rclone sync <REDACTED_PATH>auths r2:cliproxy/auths

# 从 R2 下载
rclone sync r2:cliproxy/auths <REDACTED_PATH>auths

更新

update-cli-proxy

项目来源