Skip to main content

Anthropic Claude Code

Set up Claude Code with KeepKite

Configure Anthropic Claude Code with KeepKite — TUN mode, proxy variables in settings.json, and handling region restrictions.

Updated 2026-10-11

Claude Code is sensitive to the region your traffic exits from: even when the connection works, requests from an unsupported region are rejected. Follow these steps for a stable setup.

Before you start

  1. Import your KeepKite subscription into a proxy client as described in the Codex CLI guide.
  2. Open the status page and pick a node where Claude shows "Reachable". Don't use nodes marked "Region blocked" for Claude.
  3. Install Claude Code:
# Official installer (macOS / Linux / WSL)
curl -fsSL https://claude.ai/install.sh | bash
# or with npm
npm install -g @anthropic-ai/claude-code
claude --version

Turn on TUN mode in your client with rule-based routing, open a new terminal and run claude. The browser sign-in goes through the proxy too.

Option B: Proxy environment variables

Claude Code supports the standard HTTPS_PROXY, HTTP_PROXY and NO_PROXY variables. Claude Code does not support SOCKS proxies — use your client's HTTP / mixed port.

For the current terminal:

export HTTPS_PROXY=http://127.0.0.1:7897
export NO_PROXY=localhost,127.0.0.1,::1
claude

Better: put them in Claude Code's settings so they apply no matter which terminal or IDE starts it. Edit ~/.claude/settings.json:

{
  "env": {
    "HTTPS_PROXY": "http://127.0.0.1:7897",
    "NO_PROXY": "localhost,127.0.0.1,::1"
  }
}

7897 is Clash Verge Rev's default mixed port; use the port your client shows.

Verify

curl -fsSL https://app.keepkite.com/check.sh | bash
claude doctor

Once the Claude check passes, run claude and ask a simple question.

Common issues

Request not allowed, 403, or "not available in your region"? The exit region isn't supported by Anthropic. Switch to a node where Claude is "Reachable" (usually US, Japan or Singapore) and make sure requests actually use the proxy.

ECONNRESET or fetch failed? The proxy isn't active or the node is unstable. Check the env block in settings.json, or use TUN mode.

Corporate network with a custom root certificate? Point Node.js at it with NODE_EXTRA_CA_CERTS=/path/to/ca.pem.

More steps in Troubleshooting.

No subscription yet?

Sign up for KeepKite and get Codex connected in minutes.

Get started