cpa
1
2
3
4
5
6
7
8
9
10
11
| curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash
cd /root/cliproxyapi
vi config.yaml
cp /root/cliproxyapi/cliproxyapi.service /etc/systemd/system/
systemctl enable cliproxyapi.service
systemctl start cliproxyapi.service
# 更新
curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash
|
caddy
1
2
3
4
5
6
7
8
9
10
11
12
| vi /etc/caddy/sites/cpa.yzlc233.win.conf
cpa.yzlc233.win {
# 反向代理到本地 CLIProxyAPI 服务
reverse_proxy localhost:8317
# 可选:开启日志便于排查问题
log {
output file /var/log/caddy/cpa.log
}
}
systemctl restart caddy
|
代理
.codex/.env
1
2
3
4
| HTTP_PROXY=http://127.0.0.1:10808
HTTPS_PROXY=http://127.0.0.1:10808
ALL_PROXY=socks5://127.0.0.1:10808
NO_PROXY=localhost,127.0.0.1,::1
|
Claude Desktop配置
- 代理:快捷方式-目标: –proxy-server=“socks5://127.0.0.1:10808”
- Help -> Troubleshooting -> Enable Developer Mode
- Developer -> Configure Third-Party Inference
Claude配置
.claude/settings.json
1
2
3
4
5
6
7
8
9
10
| {
"env": {
"ANTHROPIC_BASE_URL": "https://xxxx",
"ANTHROPIC_AUTH_TOKEN": "sk-xxx",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"CLAUDE_CODE_ATTRIBUTION_HEADER": "0"
"HTTP_PROXY": "http://127.0.0.1:10808",
"HTTPS_PROXY": "http://127.0.0.1:10808"
}
}
|
文章作者
lim
上次更新
2026-07-07
(2873850)
许可协议
CC BY-NC-ND 4.0