ChatGPT will not authenticate even with the global proxy on - cc-switch
Quick fix
Upgrade cc-switch to v3.16.4+ and set the proxy address under Settings > Routing > Global outbound proxy, fixing OAuth not going through the proxy.
Symptom
Section titled “Symptom”ChatGPT无法认证, 全局代理已经开了ChatGPT will not authenticate, and the global proxy is already on
cc-switch has several known defects when proxying OpenAI/Codex. The core one — authentication failing — is because the OAuth flow in early versions used a hard-coded HTTP client that ignored the in-app 全局出站代理 (global outbound proxy) setting and honoured only environment variables. Fixed in v3.16.4.
The module has other variants too: 1) reasoning effort mapping misbehaving, with Claude's max level wrongly downgraded to xhigh (some older model mappings were fixed in v3.14.0; the GPT-5.6 downgrade is still pending); 2) proxy hijacking that cannot be turned off, leaving Codex making invalid API calls continuously and burning a lot of tokens; 3) the Responses conversion path losing parallel tool calls, so each model response delivers at most one tool_use, badly slowing tasks down.
Upgrade cc-switch to v3.16.4 or newer, fixing the hard-coded client that kept OAuth authentication off the proxy.
In the cc-switch UI, go to 设置 - 路由 - 全局出站代理 (Settings > Routing > Global outbound proxy) and enter your local proxy address (127.0.0.1:7890, for example).
Make sure the proxy node exit IP is in a region OpenAI allows — Hong Kong nodes usually are not. Check your exit IP with a site such as iplark.com.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 5 real issues
- I turned the system global proxy on — why does cc-switch still fail to authenticate?
- Before v3.16.4, the OAuth flow used a hard-coded HTTP client that honoured only environment variables and ignored the in-app global outbound proxy setting. Upgrade and configure the proxy inside cc-switch separately, or launch cc-switch from a terminal that has the proxy environment variables set.
- After switching Claude reasoning effort to max, why does it not apply to OpenAI models, or error?
- cc-switch used to map max globally to xhigh. v3.14.0 fixed part of the adaptive thinking mapping, but models with native max support such as GPT-5.6 are still downgraded to xhigh, awaiting a later fix.
- Why does Codex keep burning tokens after I close cc-switch?
- A known bug introduced in v3.16.5 leaves proxy hijacking not fully disabled, so Codex keeps making invalid API calls. Quit the cc-switch process entirely for now, and check whether your system proxy settings were left modified.
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.