Connection failed: error sending request for url - CC Switch
Quick fix
Most related issues remain unresolved; upgrade to v3.16.3+ to fix the SSL renegotiation bug, or restart the application to refresh proxy status.
Symptom
Section titled “Symptom”DeepSeek 检查失败: Connection failed: error sending request for url (https://api.deepseek.com/anthropic/v1/messages)DeepSeek check failed: Connection failed: error sending request for url (https://api.deepseek.com/anthropic/v1/messages)
This error is triggered by two different mechanisms and must be distinguished based on the environment:
1. **SSL/TLS handshake failure (Windows)**: In v3.16.2 and earlier versions, some providers' APIs (such as DeepSeek) trigger multiple SSL renegotiations. The built-in test client in cc-switch handles this incorrectly, causing the handshake to be rejected, while actual proxy forwarding works normally. This issue was fixed in v3.16.3 by rewriting the test logic to reuse the same HTTP client.
2. **Proxy state caching (Cross-platform)**: If the system proxy is enabled when cc-switch starts, its global `reqwest::Client` locks that proxy configuration. If the proxy is disabled or the network is switched during operation, the client does not automatically refresh the connection pool, causing subsequent requests to fail because they cannot connect to the old proxy address. Restart the application to rebuild the client.
Upgrade cc-switch to v3.16.3 or later to fix test failures caused by SSL renegotiation.
If you do not upgrade or the error persists after upgrading, completely exit the cc-switch process and restart it to clear expired proxy connection caches.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 6 real issues
- #2796DeepSeek 检查失败
- #2946检查失败: Connection failed: error sending request for url (https://api.deepseek.com/anthropic/v1/messages)
- #3437DeepSeek Anthropic 接口"测试链接"和"延迟测试"始终失败,但代理转发正常工作
- #3935有些中转的baseurl出现需要杀死cc,然后清理缓存,才能链接
- #3968macOS 15.0 上 rustls-platform-verifier 校验所有有效证书均失败(-67825),导致全部 provider 检查与应用内更新不可用
- #6041[Bug][Windows][v3.19.1] Balance query and endpoint test fail after disabling proxy/TUN until restart
- Why does the actual conversation work, but the test link keeps reporting errors?
- This is because the test function in older versions used an independent HTTP client implementation with poor support for SSL renegotiation, whereas actual proxy forwarding used a different client logic. After upgrading to v3.16.3, both are unified into the same client.
- Will restarting cc-switch resolve the issue?
- If the issue is caused by connection pool caching due to system proxy toggles (such as Clash/Karing), restarting can resolve it immediately. However, if it is a bug at the SSL handshake level, you must upgrade the software version to cure it.
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.