客户端配置
# 先在程序坞 ⌘Q 完全退出 ChatGPT,否则复用旧实例、参数不生效
open -a ChatGPT --args --proxy-server=socks5://47.103.153.32:10801 --disable-quic
Chromium 的 --proxy-server 不接受带认证的 SOCKS URL,所以这里不能写用户名密码。
:: 存成 chatgpt-proxy.cmd,双击启动
set "GPT=%LOCALAPPDATA%\Programs\ChatGPT\ChatGPT.exe"
start "" "%GPT%" --proxy-server=socks5://47.103.153.32:10801 --disable-quic
桌面端自动更新可能重写快捷方式、清掉参数,用 .cmd 更稳。
export ALL_PROXY=socks5h://47.103.153.32:10801
export HTTP_PROXY=socks5h://47.103.153.32:10801
export HTTPS_PROXY=socks5h://47.103.153.32:10801
export NO_PROXY=127.0.0.1,localhost,::1
codex login status
CLI 必须用 socks5h(h = 域名在代理侧解析,绕开本地 DNS 污染)。变量跟着终端窗口走,新窗口要重设。
{
"type": "socks",
"tag": "us2",
"server": "47.103.153.32",
"server_port": 10801
}
sing-box / Clash.Meta 的 socks 出站片段。入口本身无认证,不需要 username/password 字段。
socks://47.103.153.32:10801
Shadowrocket / Stash 里新增 SOCKS5 节点,服务器 47.103.153.32、端口 10801、认证留空。手机出口 IP 需先加进白名单。
白名单管理
AK 只在你的 Mac 与 ECS 上,这个页面不持有云凭据。加/删一条来源:
# 加
aliyun ecs AuthorizeSecurityGroup --RegionId cn-shanghai \
--SecurityGroupId sg-uf62672033m4bmreb6lq --IpProtocol tcp --PortRange 10801/10801 \
--SourceCidrIp <你的公网IP>/32 --Policy accept \
--Description "us2-10801:<你的公网IP>" --profile firewall-audit
# 删(先查再删)
aliyun ecs DescribeSecurityGroupAttribute --RegionId cn-shanghai \
--SecurityGroupId sg-uf62672033m4bmreb6lq --profile firewall-audit | grep -A3 10801
改完立即生效,不需要重启任何服务。只允许改 10801,不要动 10800 / 28673 / 80 / 443。
自检
# 1. 隧道到出口(期望输出 50.116.12.25)
curl -s --socks5-hostname 47.103.153.32:10801 https://api.ipify.org; echo
# 2. 服务端(aliyun)
ssh aliyun 'systemctl is-active sing-box-us2; ss -lnt | grep :1081; ss -lnt | grep :10801'
# 3. 出口端(akamai-us2)
ssh akamai-us2 'systemctl is-active sing-box-us2 hysteria-server; ss -lnt | grep ":80 "'