Documentation Python quickstart Blog Free tools Enterprise solutions hello@quanticdata.ioLog in

Claude Code · network settings

Claude Code proxy settings: HTTPS_PROXY, NO_PROXY and settings.json

Claude Code uses the standard proxy variables. Set HTTPS_PROXY to the full proxy URL, http:// included, with any username and password in it, list direct hosts in NO_PROXY, and put both in the env block of ~/.claude/settings.json so background agents get them too. SOCKS proxies are not supported. Check with /status.

4 variables
https_proxy, HTTPS_PROXY, http_proxy, HTTP_PROXY: the first one set wins
No SOCKS
Claude Code takes an HTTP or HTTPS proxy only
/status
shows the proxy URL Claude Code is using
Illustration: a settings.json file drawn in white line with its env block lit, HTTPS_PROXY and NO_PROXY inside, an arrow to a terminal, and a card listing what Claude Code reads: the first proxy variable set wins, NO_PROXY with spaces or commas, no SOCKS, and the Proxy row of /status to check it.
Where Claude Code reads its proxy, and how to see the one it is using.

The proxy settings Claude Code reads

Anthropic's network configuration page lists them. Set them before you start Claude Code: a running session reads the shell environment once, at startup.

Claude Code proxy variables
VariableWhat it doesFormat
HTTPS_PROXYThe proxy for Claude Code's traffic; the docs recommend ithttp://USER:PASS@HOST:PORT, the full URL with http://
HTTP_PROXYUsed if no HTTPS proxy is setThe same URL form
Lowercase variantshttps_proxy and http_proxy work tooOrder: https_proxy, HTTPS_PROXY, http_proxy, HTTP_PROXY; the first one set wins
NO_PROXYHosts that go directSpace- or comma-separated, such as localhost,192.168.1.1,.example.com; * bypasses the proxy for everything
SOCKSNot supportedUse the HTTP endpoint of your proxy
NTLM or KerberosNot in the URLThe docs suggest an LLM gateway that supports your authentication method

Loopback WebSocket traffic (localhost, ::1, 127.0.0.0/8) never goes through the proxy, so it needs no NO_PROXY entry. The same variables apply to the sign-in requests of remote MCP servers.

Put them in settings.json

Every variable on Anthropic's page can live in the env block of ~/.claude/settings.json. It is the place that reaches every session, background agents included.

{
  "env": {
    "HTTPS_PROXY": "http://USER:PASS@HOST:PORT",
    "NO_PROXY": "localhost,127.0.0.1"
  }
}

Or for one shell only, before you start Claude Code:

export HTTPS_PROXY=http://USER:PASS@HOST:PORT
export NO_PROXY="localhost,127.0.0.1"
claude

Avoid hardcoding passwords in scripts: the docs ask for environment variables or secure credential storage. When the launch environment already sets a variable, Claude Code ignores the value in the settings file and names the variable in the debug log.

Check that Claude Code uses the proxy

A wrong proxy address usually shows up later as a connection error. Check first.

When Claude Code cannot parse a proxy URL from your shell or ~/.claude/settings.json, it stops at launch with an error that names the variable to fix.

  1. Run /status

    In an interactive session, read the Proxy row: it shows the active proxy URL, and marks a value it cannot parse as invalid and ignored.

  2. Or start with --debug

    Run claude --debug. The log goes to ~/.claude/debug/<session-id>.txt, or to the path you set with --debug-file.

  3. Check the exit IP

    Request https://ipinfo.io/json through the same proxy with curl. That is the address the Claude API sees.

  4. Allow the hosts Claude Code needs

    Behind a restrictive proxy, allow api.anthropic.com, claude.ai, platform.claude.com and the other hosts the docs list.

Claude Desktop and background agents

  • In Claude Desktop sessions where the app manages the provider connection, Claude Code reads the proxy variables only from managed settings and ~/.claude/settings.json, not from a repository's own settings files.
  • In a local, SSH or WSL Code tab session signed in through claude.ai, you can set them in any settings file.
  • Background agents run under one shared supervisor process. A shell export reaches them only if that shell started the supervisor, so use the settings file.
  • An enterprise TLS-inspection proxy works when its root certificate is in the operating system store; otherwise point NODE_EXTRA_CA_CERTS at it.

A fixed IP for Claude Code

  • With the organization IP allowlist on, a call from an unlisted address gets a 403 permission_error.
  • A QuanticData ISP IP is dedicated and static. Set it as HTTPS_PROXY on every machine and list that one IP.
  • Bandwidth on ISP IPs is unlimited, so long Claude Code sessions cost the same as short ones.
  • Through an HTTP proxy, HTTPS is a CONNECT tunnel: the proxy carries encrypted bytes and never sees your key or your code.

More on the allowlist and the other jobs: proxies for Claude.

What these settings are not for

The proxy settings decide how Claude Code's traffic leaves your network. They do not change your account, its plan or its limits, and they do not change where Claude is offered.

Proxy settings and Anthropic's rules
QuestionAnswerWhere it is written
Can a proxy make Claude Code work from an unsupported country?No. Use by a person physically located in an unsupported region is unsupported, whatever the IP.Anthropic Supported Regions Policy
Is ANTHROPIC_BASE_URL a proxy setting?It sends API calls to another endpoint, such as an LLM gateway. It does not change the IP your traffic leaves from.Claude Code Docs, network configuration
Does a proxy lift usage limits?No. Limits follow the account and the plan.Your plan

Price of a static IP for Claude Code

Standard ISP, per IP per 30 days, as the ISP page prints it. Every IP is dedicated, static and has unlimited bandwidth.

Standard ISP proxies, per IP per 30 days
IPsPrice per IPWhat you get
1 to 10$3.80/IPDedicated static IPs, unlimited bandwidth
101 and more$2.50/IPThe lowest per-IP rate, self-serve up to 1,000 IPs

Every tier, term discounts and countries: ISP proxies. For scripts and agents that read many pages, residential starts at $5 for 5 GB.

One static IP for Claude Code

A dedicated ISP IP from $3.80 per 30 days, $2.50/IP from 101 IPs, unlimited bandwidth. No subscription.

Frequently asked questions

How do I set a proxy for Claude Code?

Set HTTPS_PROXY to the full proxy URL, such as http://USER:PASS@HOST:PORT, before you start Claude Code, or put it in the env block of ~/.claude/settings.json. Add NO_PROXY for hosts that must go direct. Then run /status and read the Proxy row.

Where does HTTP_PROXY go in settings.json?

In the env block of ~/.claude/settings.json: {"env": {"HTTPS_PROXY": "http://USER:PASS@HOST:PORT"}}. Anthropic's docs say every variable on the network configuration page can be set there, and it is the only place that reaches every background agent.

Does Claude Code support SOCKS5 proxies?

No. Anthropic's network configuration page says Claude Code does not support SOCKS proxies. Use an HTTP or HTTPS proxy; on a QuanticData line, the HTTP endpoint takes the same username and password as SOCKS5.

How do I check that Claude Code is using my proxy?

Run /status in an interactive session: the Proxy row shows the active proxy URL, or marks a value it cannot parse as invalid. For more detail, start claude --debug and read the log in ~/.claude/debug/.

Why does Claude Desktop ignore the proxy in my project settings?

In Desktop sessions where the app manages the provider connection, Claude Code reads the proxy variables only from managed settings and ~/.claude/settings.json, so a checked-out repository cannot redirect them. Put the proxy in ~/.claude/settings.json.

Which proxy should I use for Claude Code?

Your company proxy if your network requires one. If you need a fixed source IP for the Claude IP allowlist, a dedicated static ISP IP: QuanticData sells them from $3.80/IP for 1 to 10 IPs and $2.50/IP from 101 IPs, per 30 days, with unlimited bandwidth.

Sources

Official documents and terms, read on 30 November 2026. Product facts come from the QuanticData pages linked in the text.