cc-switch local proxy problems: 502 Bad Gateway, timeouts, cannot delete a provider, missing UI, inconsistent failover state
Quick fix
Usually caused by unsupported official providers, config not applying, or UI state drift. Check proxy mode, provider type, and takeover state.
Symptom
Section titled “Symptom”unexpected status 502 Bad Gateway:This cluster groups several proxy-related problems. The main mechanisms are: 1) the local proxy does not support official providers, as a ban-risk precaution, so reaching official models with the proxy on times out or errors; 2) the last remaining provider cannot be deleted — that is a design limit, add another provider first, then delete; 3) once the proxy is on it takes over the local config file, so reading that file does not tell you where requests actually go; 4) in some versions the failover toggle is decoupled from local-proxy takeover state, so the UI accepts input while the backend semantics disagree; 5) under WSL the proxy may need to be turned off and on again before it takes effect. The error variants — timeout, 502, missing UI, cannot delete — have different root causes and there is no single fix.
If you are on an official provider (OAuth sign-in), turn the local proxy off or switch to a third-party provider. The local proxy does not support official providers.
If the last remaining provider cannot be deleted, add an official or third-party provider first, then delete the original one.
When switching provider with the proxy on, do not judge success by the contents of the local config file. Go by the actual requests, the usage panel, or the provider dashboard. If it did not take effect, turn the proxy off and on again.
If the proxy does nothing under WSL, try turning it off and on again. If it still does nothing, confirm the proxy works on the Windows side and note the known problem with non-127.0.0.1 addresses under WSL.
If the local-proxy or failover toggle disappeared from the main page, open local proxy settings and turn on 在主页面显示本地代理开关 (show the local proxy toggle on the main page). For failover display problems, upgrade to v3.12.3 or newer and check again.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 26 real issues
- #266开发透明代理的时候,是不是要可以顺便开发一下 429 自动负载均衡 或者有好几种策略 主备啊 随机负载啊
- #390啥时候出本地代理+自动切换啊
- #395添加skill时连接超时
- #499skill管理这里访问非常慢,这个访问会走系统代理吗?
- #632proxy 问题
- #688proxy 设置非127地址会开启失败 wsl
- #737设置了全局代理后,通过本地代理访问openai官方模型超时
- #776无法自动切换配置
- #788Linux虚拟机可以访问主机上CCS代理吗?
- #789claude原生安装,设置里面检测不到版本环境,实际开启代理不影响使用
- #808怎么删除所有的codex的代理配置;codex的配置无法停用也无法删除
- #811codex使用官方代理不能弹出oauth登陆界面,导致官方渠道无法使用
- #844为什么反代理 Claude official 的时候400 报错,单独使用的时候没问题?
- #912Windows WSL环境 v3.10.0版本,代理无效
- #1011[BUG] OpenAI 兼容模式代理到服务端时会在 url 加上 ?beta=true,一些服务商会报错
- #1151怎么代理gemini,现在报错
- #1158本地代理相关 UI 消失
- #1169同时支持wsl和window的配置修改
- #1228'在主页面显示本地代理开关',但实际还会显示'故障转移开关'
- #1242启动代理服务失败
- #1394首页故障转移开关与本地代理前置条件存在一致性问题(UI 独立显示,命令层也允许写入未接管状态)
- #1398打开 代理总开关 按钮弹窗错误
- #1444请求未被代理
- #1560Bug发现:在cloud code里面使用gpt 5.4模型的时候选择open ApI格式,不能调用多个子代理完成任务
- #1611[BUG] WebDAV 本地连接问题
- #1712自定义不同模型供应商
- Why do official models time out or return 502 with the proxy on?
- The local proxy does not support official providers, as a ban-risk precaution. Calls made through an official sign-in have no direct relationship with cc-switch proxy takeover. Turn the proxy off, or switch to a third-party provider.
- How do I delete all the Codex proxy configuration?
- The last remaining provider cannot be deleted. Create another provider first, then delete the current one. If you do not want to use it, add an empty official provider as a placeholder.
- I switched provider with the proxy on and the config file didn't change. Why?
- With the proxy on, it takes over the local config file, so the request address and provider recorded there may be meaningless. Go by the actual request data or the usage panel.
- The local proxy UI disappeared from the main page. What now?
- From v3.11.0 on, the local proxy UI may have to be enabled manually with 在主页面显示本地代理开关 (show the local proxy toggle on the main page) in local proxy settings. The failover toggle display problem was fixed after v3.12.0; upgrade to v3.12.3 or newer and check again.
- The proxy does nothing under WSL. What now?
- Some users fixed it by turning the proxy off and on again. Configuring a non-127 address under WSL still has known problems; if the proxy runs on the Windows host, mind the WSL network address limits.
- Why is the failover toggle shown and operable even when the proxy is off?
- In some versions the failover toggle on the home page is decoupled from local-proxy takeover state, which can leave the two inconsistent. The docs and most backend logic still assume the proxy is started and the app has been taken over. Upgrade and confirm your version has the fix.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.