cc-switch overrides DNS cache and resolves api.deepseek.com to 127.0.0.1 when enabled (Unexpected DNS hijacking behavior)
Quick fix
Disable proxy takeover in the affected application to restore network connectivity; cc-switch does not modify system DNS records.
Symptom
Section titled “Symptom”When enabling cc-switch, it unexpectedly interferes with the local AD DNS (or system DNS cache/resolution), forcefully hijacking domains such as api.deepseek.com and platform.deepseek.com and resolving them to 127.0.0.1.Users observed DeepSeek-related domains resolving to 127.0.0.1 after enabling cc-switch and suspected that cc-switch had hijacked DNS. However, code review found that cc-switch’s built-in proxy works by starting a local HTTP listener and modifying the proxy’s API base URL. This can cause a loopback URL to appear in the proxy configuration, but it does not cause public domains to resolve to a loopback address in nslookup. The issue is therefore more likely caused by rules in an external DNS filtering component, such as AdGuard or Active Directory DNS, rather than cc-switch directly modifying system DNS records.
Disable proxy takeover in the affected application to continue using configuration switching without local HTTP routing.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- #3300rectify_anthropic_request unnecessarily removes thinking blocks in Anthropic→Anthropic passthrough mode
- #5969ProxyChat 模式下 baseInstructions 无法覆盖,导致第三方模型仍自称 based on GPT-5
- #7125`cc-switch` overrides DNS cache and resolves `api.deepseek.com` to `127.0.0.1` when enabled (Unexpected DNS hijacking behavior)
- Does cc-switch modify system DNS records?
- According to code review, cc-switch does not modify system DNS records, the hosts file, or AdGuard / Active Directory DNS settings.
- How can I check DNS resolution issues?
- Use the nslookup command to check DNS resolution, for example: nslookup -type=A api.deepseek.com
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.