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

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.
| Variable | What it does | Format |
|---|---|---|
HTTPS_PROXY | The proxy for Claude Code's traffic; the docs recommend it | http://USER:PASS@HOST:PORT, the full URL with http:// |
HTTP_PROXY | Used if no HTTPS proxy is set | The same URL form |
| Lowercase variants | https_proxy and http_proxy work too | Order: https_proxy, HTTPS_PROXY, http_proxy, HTTP_PROXY; the first one set wins |
NO_PROXY | Hosts that go direct | Space- or comma-separated, such as localhost,192.168.1.1,.example.com; * bypasses the proxy for everything |
| SOCKS | Not supported | Use the HTTP endpoint of your proxy |
| NTLM or Kerberos | Not in the URL | The 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"
claudeAvoid 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.
- 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.
- 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. - Check the exit IP
Request
https://ipinfo.io/jsonthrough the same proxy with curl. That is the address the Claude API sees. - Allow the hosts Claude Code needs
Behind a restrictive proxy, allow
api.anthropic.com,claude.ai,platform.claude.comand 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_CERTSat 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_PROXYon 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.
| Question | Answer | Where 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.
| IPs | Price per IP | What you get |
|---|---|---|
| 1 to 10 | $3.80/IP | Dedicated static IPs, unlimited bandwidth |
| 101 and more | $2.50/IP | The 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.
- Claude Code Docs: Enterprise network configurationHTTPS_PROXY, HTTP_PROXY, NO_PROXY, basic authentication in the URL, no SOCKS support, settings.json, /status and --debug, background agents, Claude Desktop sessions, required hosts
- Claude Platform Docs: IP allowlistingthe organization IP allowlist, up to 1,000 entries, the 403 permission_error, up to 15 minutes to apply, the warning about shared proxy addresses
- Anthropic Supported Regions Policyuse while physically located in an unsupported region is unsupported
- RFC 9110, HTTP Semantics: the CONNECT methodan HTTPS request through an HTTP proxy is a tunnel: the proxy relays the encrypted bytes