Claude Code CLI Static Residential IP Proxy Guide

To configure a Claude Code CLI static residential IP proxy cleanly, route both your browser (claude.ai) and your terminal (claude) through the same static residential (ISP) proxy using HTTPS_PROXY and HTTP_PROXY (or ~/.claude/settings.json).

Avoid two common mistakes: running the browser on a commercial VPN while the terminal exits through your local ISP, or relying on ALL_PROXY=socks5h://.... Per Anthropic's official docs, Claude Code CLI targets HTTP/HTTPS forward proxies and does not natively support SOCKS5 environment variables.

Figure 1: Aligning browser and Claude Code CLI traffic behind one static residential (ISP) proxy avoids split-location requests and SOCKS5 bypasses across the same session.


How to Configure a Claude Code CLI Static Residential IP Proxy

Documented Proxy Behavior vs. Commonly Reported Risks

It helps to separate officially documented CLI behavior from operational risks commonly reported by users:

  • Documented behavior (per Anthropic's Claude Code network configuration docs): Claude Code reads proxy environment variables once at process startup in precedence order—https_proxy, HTTPS_PROXY, http_proxy, HTTP_PROXY—and supports standard HTTP/HTTPS forward proxies (including USER:PASS basic authentication). It does not natively support SOCKS5 via ALL_PROXY.
  • Commonly reported operational risks: International developers frequently report 403 region errors, unexpected OAuth re-authentication prompts, or automated account reviews when claude.ai runs on a shared commercial VPN while claude CLI sends traffic from a different local ISP or datacenter ASN. Routing both surfaces through one dedicated consumer-ISP IP removes that mismatch.

Quick Decision Tree: Direct HTTPS_PROXY vs. Privoxy Bridge

  • Does your proxy include an HTTP/HTTPS port (http://USER:PASS@IP:PORT)? → Skip Privoxy and set HTTPS_PROXY and HTTP_PROXY directly in Step 1 and Step 2.
  • Does your proxy provide a SOCKS5 port only? → Run a local Privoxy bridge bound to 127.0.0.1:8118 below, then point HTTPS_PROXY and HTTP_PROXY to http://127.0.0.1:8118.

The SOCKS5 Trap (and Minimal Privoxy HTTP-to-SOCKS5 Forwarder)

Many developers export ALL_PROXY="socks5h://USER:PASS@IP:PORT", test with curl https://ipinfo.io/json, and assume Claude Code is proxied. Because curl honors ALL_PROXY while Claude Code reads HTTPS_PROXY / HTTP_PROXY, claude can silently bypass the SOCKS5 tunnel.

  • Direct HTTP/HTTPS path (recommended): Use the HTTP/HTTPS endpoint from a dedicated residential proxy such as the US Dual-ISP Dedicated Static Residential IP (check the live listing for current per-IP rates, ISP/ASN, exclusivity, and supported protocol details).
  • If your proxy is SOCKS5-only: Bridge it locally with Privoxy listening on 127.0.0.1:8118 and forwarding to your SOCKS5 endpoint (per the Privoxy configuration manual):
# Minimal /etc/privoxy/config (Linux/macOS) or config.txt (Windows)
# Keep listen-address bound strictly to 127.0.0.1 — never 0.0.0.0 — so the bridge is not exposed on your LAN.
listen-address  127.0.0.1:8118
forward-socks5t / USER:PASS@STATIC_ISP_IP:SOCKS5_PORT .

Start or reload the Privoxy service for your OS:

  • macOS (Homebrew): brew services restart privoxy
  • Ubuntu / Debian: sudo systemctl restart privoxy
  • Windows: Restart the Privoxy service in services.msc (or run privoxy.exe config.txt from the install folder)

Then point Claude Code's HTTP/HTTPS variables to the local loopback bridge:

export HTTPS_PROXY="http://127.0.0.1:8118"
export HTTP_PROXY="http://127.0.0.1:8118"
export NO_PROXY="localhost,127.0.0.1,::1"

Step 1: Set Shell Proxy Variables (Before Launching claude)

Export your variables before launching claude—changing them inside an already-running session will not take effect.

#### macOS / Linux (Bash or Zsh)

export HTTPS_PROXY="http://USER:PASS@STATIC_ISP_IP:HTTP_PORT"
export HTTP_PROXY="http://USER:PASS@STATIC_ISP_IP:HTTP_PORT"
export NO_PROXY="localhost,127.0.0.1,::1"

#### Windows (PowerShell)

$env:HTTPS_PROXY="http://USER:PASS@STATIC_ISP_IP:HTTP_PORT"
$env:HTTP_PROXY="http://USER:PASS@STATIC_ISP_IP:HTTP_PORT"
$env:NO_PROXY="localhost,127.0.0.1,::1"

Tips: (1) Always include NO_PROXY="localhost,127.0.0.1,::1" so local dev servers, MCP servers, or build tools on loopback do not get sent to your remote proxy. (2) If your proxy password contains reserved URL characters (@, :, #, %), URL-encode them (e.g., @ → %40) so the proxy URL parses cleanly.

Step 2: Persist Configuration in ~/.claude/settings.json

IDE terminals (VS Code, Cursor, JetBrains) and background tasks often skip interactive shell profiles. Persist the variables in ~/.claude/settings.json so every claude invocation inherits the same static residential IP:

{
  "env": {
    "HTTPS_PROXY": "http://USER:PASS@STATIC_ISP_IP:HTTP_PORT",
    "HTTP_PROXY": "http://USER:PASS@STATIC_ISP_IP:HTTP_PORT",
    "NO_PROXY": "localhost,127.0.0.1,::1"
  }
}

Step 3: 4-Point Pre-Login IP & ASN Verification Checklist

Complete all four checks before running claude /login:

  1. Test HTTP/HTTPS routing explicitly (ignoring ALL_PROXY):
   curl --noproxy "" -x "$HTTPS_PROXY" -s https://ipinfo.io/json

Illustrative expected output (using an RFC 5737 documentation IP; confirm ip matches your assigned IP and org shows a consumer telecom ISP rather than AWS/OVH/DigitalOcean):

   {
     "ip": "203.0.113.45",
     "city": "Ashburn",
     "region": "Virginia",
     "country": "US",
     "org": "AS7922 Comcast Cable Communications, LLC",
     "timezone": "America/New_York"
   }
  1. Match your browser IP 1-to-1: Open https://ipinfo.io/json inside the browser profile you use for claude.ai and confirm ip, city, and org are identical to the terminal output above.
  2. Check WebRTC & timezone alignment: Confirm WebRTC is locked or disabled in your browser profile and that the browser timezone matches the timezone field returned by ipinfo.io.
  3. Confirm Claude Code CLI itself uses the proxy (not just curl):
  • Check active env & settings syntax: In the exact shell or IDE terminal where you will run claude, inspect your live environment (env | grep -i proxy on macOS/Linux, or Get-ChildItem Env:PROXY in PowerShell) to confirm HTTPS_PROXY and HTTP_PROXY point to your http:// endpoint with no conflicting lowercase https_proxy. Run claude doctor (per Anthropic's Claude Code troubleshooting docs) to validate ~/.claude/settings.json syntax so malformed JSON does not silently drop your "env" block.
  • Verify process-level tunneling (definitive check): If you bridge through Privoxy (or any local HTTP proxy), enable debug 1 in your Privoxy config (per the Privoxy manual) and watch the Privoxy log while launching claude—a CONNECT api.anthropic.com:443 (or claude.ai:443) log line proves the claude binary itself is routing through the proxy. On direct remote proxies, launching claude --debug lets you inspect outbound connection and TLS/proxy errors directly.

Step 4: Claude Code CLI Proxy Troubleshooting Matrix

Symptom / ErrorLikely CauseExact Fix
curl shows proxy IP, but claude hits 403 / region errorOnly ALL_PROXY=socks5h://... was setSet HTTPS_PROXY & HTTP_PROXY to the HTTP/HTTPS port, or bridge SOCKS5 via Privoxy on 127.0.0.1:8118
407 Proxy Authentication RequiredWrong credentials or unencoded @, :, # in passwordURL-encode special characters and re-verify with curl --noproxy "" -x "$HTTPS_PROXY" https://ipinfo.io/json
Works in Terminal, fails in VS Code / IDEIDE subprocesses did not inherit shell exportsMove HTTPS_PROXY and HTTP_PROXY into ~/.claude/settings.json under "env" and restart the IDE
ECONNREFUSED or TLS handshake timeoutUsing https:// scheme on an HTTP-connect port, or unreachable proxySwitch the URL prefix from https:// to http:// (http://USER:PASS@IP:PORT). If the endpoint still fails, save the failing curl output and your order ID and submit a replacement request per the Admall Replacement & Refund Policy

Dual-ISP Static Residential IP vs. Datacenter & Rotating Proxies

When evaluating proxies for persistent logins (Claude Code CLI, Claude Pro/Max, ChatGPT Plus, or ad platforms), three properties matter most: ASN registration type, IP stability, and user exclusivity.

Evaluation CriteriaDatacenter Proxy / Shared VPNRotating Residential ProxyDedicated Dual-ISP Static Residential IP
ASN RegistrationCommercial cloud/hosting (AWS, OVH, DigitalOcean, Vultr)Consumer ISP peer devicesTypically consumer telecom ISP ASNs (e.g., AT&T, Comcast, Verizon; check the live listing for specific ISP/ASN details)
IP ConsistencyStatic per serverRotates per request or every few minutesStatic assignment (same IPv4 across sessions)
User ExclusivityShared across many usersShared rotating poolDedicated single-user tiers available (check the live listing for exclusivity details)
Claude Code CLI FitElevated 403 / shared-subnet block riskFrequent location jumps may trigger re-authBest fit for Claude Code CLI: consistent consumer-ISP exit without session geo-jumping (check the live listing for protocol details)
Uptime & LatencyFast, stableVariable latency; peer dropoutsStatic residential routing without peer-device churn (check the live listing for routing and uptime details)
Best Use CaseGeneral privacy browsing or low-trust scrapingHigh-volume scraping & SERP collectionClaude Code CLI & paid AI seats requiring persistent sessions

When to Choose Dual-ISP vs. Single-ISP for Claude Code CLI

  • Choose a Dual-ISP Static Residential IP when you run long-lived Claude Code CLI terminal sessions paired with claude.ai OAuth logins and want both typical residential-ISP ASN trust and consistent static routing.
  • A standard Single-ISP Static Proxy may suffice for lower-sensitivity terminal tasks where occasional routing variance is acceptable, whereas Datacenter / Shared VPNs should be reserved for non-sensitive browsing rather than authenticated Claude Code sessions.

For a provider-by-provider pricing and 1-to-100 seat Total Cost of Ownership breakdown, see our static residential proxy pricing and TCO benchmark.


Warranty & Compliance Boundaries

All orders on Admall are governed by platform escrow and the current terms published in the Admall Replacement & Refund Policy:

  • Dedicated Static Residential (ISP) Proxies: Protected by a 24-hour coverage window from activation for a free IP swap or full escrow refund if an IP is dead/unreachable, wrong country/ISP type, or blacklisted on initial connection test—submit your Order ID plus a connection-error screenshot or IP geo/fraud-score check output via My Orders → Report Issue / Support (prorated refunds after active use and third-party platform bans caused by account behavior or scraping abuse are not covered).
  • AI Subscription Top-Ups (Claude Pro/Max & ChatGPT Plus/Pro): 100% Subscription Activation Guaranteed (Post-Activation Account Bans Not Covered). Always pair upgraded AI accounts with a dedicated static residential IP rather than shared VPNs or unproxied CLI setups.
  • Facebook Profiles & Business Managers: Covered under Admall's first-login warranty boundary upon delivery verification (prior to credential changes or ad launch); teams running multi-account ad operations can apply the same static IP isolation discipline detailed in our Meta Ads anti-ban infrastructure stack.

Frequently Asked Questions (FAQ)

1. Why didn't changing HTTPS_PROXY in my shell affect an already-open Claude Code session?

Per Anthropic's network configuration docs, Claude Code reads proxy environment variables once at process startup. Export the updated variables (or save them in ~/.claude/settings.json), then fully exit and relaunch claude.

2. Can multiple developers share one static residential IP for separate Claude accounts?

It is best to maintain 1 dedicated static residential IP per Claude account (or isolated team seat). Sharing one IP across multiple unrelated accounts can link sessions if any single seat hits a rate limit or policy review.

3. Does HTTPS_PROXY in ~/.claude/settings.json also apply to remote MCP server logins?

Yes—per Anthropic's official network configuration docs, when signing in to remote Model Context Protocol (MCP) servers (such as claude mcp login), Claude Code applies your configured proxy variables while NO_PROXY keeps local localhost MCP servers direct.