Confirm your egress network is trustworthy first
Claude Code works over home broadband, corporate networks, controlled proxies, or compliant enterprise gateways. For regular accounts, a long-stable network with clear ownership is usually better than public VPNs, shared proxy pools, or frequently changing VPS egress IPs. Before configuring, check your current IP type and risk score with a cleanliness check.
Stable IP vs. frequent switching
IP drift from a natural ISP redial is usually different from an account jumping across countries. What matters more is frequently switching between multiple countries, ASNs, and devices in a short time — this increases the odds of triggering an account security review.
Force TCP, avoid UDP/QUIC
QUIC (UDP 443) is more prone to packet loss, timeouts, or unexpected forwarding under some proxies or corporate firewalls. If you see intermittent disconnects, try disabling QUIC or forcing Claude-related traffic to TCP-only and retest.
"network": "tcp" # or disable QUIC at the client level
TLS fingerprint should look like a browser
Different clients can have different TLS handshake characteristics. If a proxy chain alters TLS behavior, injects certificates, or uses an unusually abnormal client fingerprint, it can trigger connection failures or extra verification. Prefer mature clients and standard TLS configurations.
"tls": {
"fingerprint": "chrome"
}Keep DNS and HTTP paths consistent
The DNS resolver, HTTP egress, and browser egress should ideally come from the same network path. If DNS resolves locally while HTTP goes through a proxy, the resolved region and the access region may not match. Trusted DoH/DoT can be used, but the key is confirming your routing rules actually cover DNS traffic.
"dns": {
"servers": ["https://1.1.1.1/dns-query"]
}Check the IPv6 dual-stack path
If a proxy or routing rule only covers IPv4, IPv6 traffic may take a different path, causing HTTP / DNS / WebRTC to see an inconsistent egress. You don't always need to disable IPv6, but it's worth checking dual-stack consistency first. See IPv6 dual-stack risks for details.
ipv6 = false # or proxy domainStrategy: "UseIPv4"
Dedicated routing rules for Claude domains
The official documentation lists Claude Code network access as including at least api.anthropic.com, claude.ai, statsig.anthropic.com, and sentry.io. It's recommended to create dedicated routing rules for these domains to make troubleshooting and auditing easier. See Claude Code routing rules.
Proxy CDN / auth / monitoring traffic too
Claude Web, login, docs, and static assets may use different CDNs or third-party services as versions change. Don't hardcode just one primary domain — treat the official required domains as the baseline, then use local packet captures or logs to add the actual static asset domains being accessed.
Keep connections alive
Frequent disconnect-reconnect cycles add latency and make the proxy chain harder to troubleshoot. Proxy clients can enable a reasonable TCP keep-alive; whether to enable connection multiplexing (mux) depends on line quality — if you see multiplexing stalls or single-connection throttling, disable it and compare.
Keep concurrent requests under 5
Don't wrap Claude Code calls with a large number of concurrent workers on top. Excessive concurrency may trigger rate limits, connection queuing, or enterprise gateway throttling; the actual threshold depends on your account plan, organization policy, and API responses.
Optimize the network path
Prioritize egress with low packet loss, low jitter, and a stable path to the Anthropic API — don't just look at geographic distance. Use a leak check together with actual Claude Code request latency to judge.
Summary
Claude Code stability = official network requirements + proxy configuration + DNS/IPv6 path consistency. First make sure api.anthropic.com, claude.ai, statsig.anthropic.com, and sentry.io are reachable, then check proxy, certificates, and dual-stack paths.