cpa

1
2
3
4
5
6
7
8
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

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配置

代理

.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