CCP Local Proxy
本地 CCP API 反向代理服务。当用户需要启动/停止/检查本地大模型代理、需要通过本地地址 http://127.0.0.1:8257 访问中国移动 CCP 平台(qwen-3.5 等模型)、或提到"ccp 代理"、"本地转发 ptest.cmccsim.com"时使用此技能。服务以守护进程方式常驻运行,不随会话关闭。
wangyongjie
@wangyongjie
Install
$ openclaw skills install @wangyongjie/ccp-proxyCCP 本地反向代理
Overview
在本地 127.0.0.1:8257 启动一个 OpenAI 兼容的反向代理,将所有请求原样转发到中国移动 CCP 平台 https://ptest.cmccsim.com/ccp/v1。服务以守护方式常驻运行,不随 WorkBuddy 会话关闭而退出。启动后本地地址即为 WorkBuddy 自定义模型(qwen-3.5)的上游。
脚本为可移植版本:所有路径基于脚本自身位置动态展开,不依赖特定用户目录;Python 解释器用本机 python3 即可。
Quick Start
PY=$(command -v python3 || echo /usr/bin/python3)
SCRIPT="$HOME/.workbuddy/skills/ccp-proxy/scripts/ccp_proxy.py"
$PY $SCRIPT status # 查看状态
$PY $SCRIPT start # 启动(幂等,已在运行则跳过)
$PY $SCRIPT test # 连通性测试(key 自动从 models.json 读取,也可 test sk-xxx 指定)
$PY $SCRIPT configure sk-xxx # 将 qwen-3.5(指向本地代理)写入 ~/.workbuddy/models.json
$PY $SCRIPT stop # 停止
服务详情
| 项目 | 值 |
|---|---|
| 本地地址 | http://127.0.0.1:8257 |
| Chat 接口 | http://127.0.0.1:8257/v1/chat/completions |
| 上游 | https://ptest.cmccsim.com/ccp/v1 |
| PID 文件 | 脚本同目录 .ccp_proxy.pid |
| 日志文件 | 脚本同目录 ccp_proxy.log |
任务执行流程
- 运行
status判断服务状态;未运行则start。 - 若
models.json中无 qwen-3.5 条目或 key 为空,询问用户自己的 API Key(不要内置任何 key),用户提供后执行test sk-xxx验证,通过后执行configure sk-xxx写入配置。 - 告知用户:重启 WorkBuddy 后在模型选择器中切换到 Qwen-3.5 (Local Proxy)。
注意事项
- 代理仅监听 127.0.0.1,不暴露到外部网络。
- 支持 SSE 流式转发与状态码透传,转发时透传 Authorization 头。
- 本地
/v1前缀会被剥掉后再拼到上游(上游 base 已含/ccp/v1),避免路径重复。 - 端口 8257 被占用且 PID 不匹配时,提示用户确认后处理。
- 服务意外退出后重新执行
start即可恢复。
Top skills in this category
API Gateway
@byungkyuCall third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, run a query through a connected
Marketing Mode
@thesethroseMarketing Mode combines 23 comprehensive marketing skills covering strategy, psychology, content, SEO, conversion optimization, and paid growth. Use when users need marketing strategy, copywriting, SEO help, conversion optimization, paid advertising, or any marketing tactic.
Blogwatcher
@steipeteMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Marketing Skills
@jchopard69Access 23 marketing modules offering checklists, frameworks, and ready-to-use deliverables for CRO, SEO, copywriting, analytics, launches, ads, and social me...
diagram-generator
@matthewyinGenerate and edit diagrams with the mcp-diagram-generator MCP server. Use this skill for new diagrams, existing .drawio/.mmd/.excalidraw edits, network topology, architecture, flowchart, swimlane, sequence, class, ER, and Excalidraw whiteboard work. Always use this skill when the user asks to draw,