Skip to content

Claude Code Proxy on WSL and Windows: NO_PROXY Fixes

Claude Code ignores a proxy more often because the variable is set in the wrong place than because the proxy is wrong. This guide shows where to set it on Windows and WSL and how to check each step.

The three usual causes

Cause 1: the variable lives in the wrong place. Claude Code started in a WSL terminal is a Linux process, so a variable set in Windows PowerShell does not reach it unless you pass it through WSLENV. The reverse is also true. Variables exported in a shell are read once at startup, and background agents are started by one shared supervisor, so settings.json is the dependable place.

Cause 2: the address is only valid on Windows. In WSL's default NAT mode, 127.0.0.1 inside WSL is WSL itself, so a proxy client listening on Windows at 127.0.0.1 is not there. Use the Windows host IP, or switch WSL to mirrored mode, where 127.0.0.1 reaches Windows servers.

Cause 3: the URL is not one Claude Code accepts. SOCKS is not supported, and a URL without http:// stops the launch with an error that names the variable.

Where to set the variables

Where to set the variables
ItemWhere to set the variableReaching a proxy client on Windows
Native Windows (PowerShell)$env:HTTPS_PROXY for one session, or the env block of %USERPROFILE%\.claude\settings.jsonUse 127.0.0.1 and the proxy client's port
WSL, NAT mode (default)export in the WSL shell, or the env block of ~/.claude/settings.json inside the distro127.0.0.1 is WSL itself; use the Windows host IP and let the client accept connections from it
WSL, mirrored modeSame as above127.0.0.1 reaches Windows servers (Windows 11 22H2 and later)
Windows value into WSLWSLENV, or autoProxy=true to copy the Windows HTTP proxy informationNot needed for outside proxy hosts

From the Claude Code network and settings pages and Microsoft's WSL networking page, read on 15 November 2026. Behaviour can change with new versions.

Check in this order

  1. Step 1: Test the proxy without Claude Code

    In the same terminal where you start claude, run curl -x with the proxy URL against https://ipinfo.io/json. If this fails, the address, port, protocol or login is wrong, and Claude Code will fail too.

  2. Step 2: Use an HTTP URL

    Write http://USERNAME:PASSWORD@HOST:PORT. Claude Code does not support SOCKS. If the password has special characters, percent-encode them.

  3. Step 3: Set the variables where claude runs

    Use the commands below for WSL or PowerShell. Add NO_PROXY with the local addresses your tools call, such as localhost and 127.0.0.1.

  4. Step 4: Make it permanent

    Put the same values in the env block of settings.json inside that system. If the launch environment already sets a variable, the settings value is ignored, so do not set both with different values.

  5. Step 5: Confirm what Claude Code uses

    Start claude and run /status: the Proxy row shows the active proxy URL. For more detail start with claude --debug and read the log.

WSL: variables and a proxy check

# Inside the WSL terminal, before you start claude
export HTTPS_PROXY="http://USERNAME:PASSWORD@HOST:PORT"
export HTTP_PROXY="$HTTPS_PROXY"
export NO_PROXY="localhost,127.0.0.1"

# What does the proxy show? (a wrong login or port fails here, not in Claude Code)
curl -sS -x "$HTTPS_PROXY" https://ipinfo.io/json

claude

Example only. Replace USERNAME, PASSWORD, HOST and PORT with your own.

Windows PowerShell

# Windows PowerShell, native Claude Code on Windows
$env:HTTPS_PROXY = "http://USERNAME:PASSWORD@HOST:PORT"
$env:HTTP_PROXY  = $env:HTTPS_PROXY
$env:NO_PROXY    = "localhost,127.0.0.1"
claude

Example only. Applies to this PowerShell window.

settings.json for either system

{
  "env": {
    "HTTPS_PROXY": "http://USERNAME:PASSWORD@HOST:PORT",
    "HTTP_PROXY": "http://USERNAME:PASSWORD@HOST:PORT",
    "NO_PROXY": "localhost,127.0.0.1"
  }
}

Example only. The file is ~/.claude/settings.json; on Windows that is %USERPROFILE%\.claude\settings.json.

Mirrored mode and Windows proxy information

# C:\Users\<you>\.wslconfig   (Windows 11 22H2 or later)
[wsl2]
networkingMode=mirrored
autoProxy=true

Example only, from the Microsoft WSL page. Restart WSL after changing it.

Pass variables from Windows with WSLENV

# PowerShell: pass variables from Windows into a WSL process
$env:HTTPS_PROXY = "http://USERNAME:PASSWORD@HOST:PORT"
$env:NO_PROXY    = "localhost,127.0.0.1"
$env:WSLENV      = "HTTPS_PROXY:NO_PROXY"
wsl claude

# WSL in the default NAT mode: the Windows host as seen from WSL
ip route show | grep -i default | awk '{ print $3}'

Illustrative. The last line is the command Microsoft gives for finding the Windows host IP from WSL.

Symptoms and fixes

Claude Code starts but requests time out

Check The proxy variable is not visible to the process, or the address works only on Windows.

Fix Run /status and read the Proxy row. If it is empty, set the variable where claude runs. If it is set, test the same URL with curl from that terminal.

Stop when If curl also fails, fix the proxy first: the problem is not Claude Code.

Startup stops with an error naming a variable

Check The proxy URL cannot be parsed, for example it has no http:// at the start.

Fix Write the full URL with scheme, user, password, host and port.

Stop when Do not try a socks5:// URL: Claude Code does not support SOCKS.

Works in PowerShell, not in WSL

Check The variable was never passed into WSL.

Fix Set it in the WSL shell, in the settings.json inside the distro, or pass it with WSLENV.

Stop when Check that you did not set the same variable in two places with different values.

Local tools break after setting the proxy

Check Requests to local servers are going to the proxy.

Fix Add the local hosts to NO_PROXY, for example localhost,127.0.0.1.

Stop when Use * only if you want no request at all to use the proxy.

Using Proxy302 with Claude Code

Claude Code needs an HTTP proxy URL, which a Proxy302 HTTP proxy provides: host proxy.proxy302.com, port 2222, and the username and password from My assets. A static ISP IP stays the same for the whole lease and does not rotate, so one account keeps one address. A proxy does not change Anthropic's terms: use Claude only where it is supported, because the policy restricts use by people physically located in an unsupported region. If verification appears, complete it honestly; if pages will not open, check the network and the IP first and open a ticket with your order number.

A static ISP IP costs US$0.50 for one day and US$7.99 for 30 days, the same in every country, and the protocol is chosen per IP at purchase. Auto-renew is optional and can be switched off in My assets. There is no free trial, and the smallest purchase is one IP for one day.

Frequently asked questions

Does Claude Code support SOCKS5 proxies?

No. The Claude Code network documentation says it does not support SOCKS proxies, so use an HTTP proxy URL.

Where does Claude Code on WSL read settings.json?

From ~/.claude/settings.json in the Linux home of the distribution where claude runs. Windows uses %USERPROFILE%\.claude\settings.json.

Do I need NO_PROXY?

Only for addresses that must not go through the proxy, such as local servers. It accepts a space or comma separated list, and * means all requests.

Why does the proxy work in curl but not in Claude Code?

Usually the variable is set in a different shell or system from the one running claude, or a settings value is ignored because the launch environment sets the same variable.

Is mirrored mode required?

No. It makes 127.0.0.1 reach Windows from WSL and needs Windows 11 22H2 or later. Without it, use the Windows host IP.

Reference links

6
  1. Proxy302 product facts and price list

    Product observation · Confirmed on:

    Product facts file of the site (values checked against the console, the backend and the price table on 18-19 October 2026): prices in US$ (1 PTC = US$1), lease terms, protocols and ports, no free trial.

  2. Claude Code docs: Enterprise network configuration

    Official documentation · Confirmed on:

    Read on 15 November 2026: Claude Code reads HTTPS_PROXY, HTTP_PROXY and NO_PROXY (space or comma separated, "*" for all) and their lowercase forms; "Claude Code does not support SOCKS proxies"; credentials go in the proxy URL; variables exported in the shell are read once at startup; the same variables can be set in settings.json; background agents are hosted by one supervisor, so put the variables in the env block of ~/.claude/settings.json; /status shows a Proxy row; a proxy URL that cannot be parsed, such as one missing http://, stops launch; if the launch environment already sets a variable, the settings file value is ignored.

  3. Claude Code docs: Settings files and precedence

    Official documentation · Confirmed on:

    Read on 15 November 2026: the user settings file is ~/.claude/settings.json; on Windows ~/.claude means %USERPROFILE%\.claude; /status lists which settings files were loaded; an env block inside a settings file is an ordinary key.

  4. Microsoft Learn: Accessing network applications with WSL

    Official documentation · Confirmed on:

    Read on 15 November 2026: WSL uses NAT networking by default; from Linux the Windows host is reached by its IP, found with ip route show | grep -i default | awk '{ print $3}'; with networkingMode=mirrored (Windows 11 22H2 and later) Linux reaches Windows servers on 127.0.0.1; autoProxy=true makes WSL use the Windows HTTP proxy information.

  5. Microsoft devblogs: sharing environment variables between WSL and Windows

    Official documentation · Confirmed on:

    Read on 15 November 2026: WSLENV is a colon-delimited list of variable names that are passed between Windows and WSL processes; flags such as /u (only when WSL is started from Windows) and /w change the direction.

  6. Anthropic: supported regions

    Official documentation · Confirmed on:

    Read on 15 November 2026: the policy restricts use by persons while physically located in an unsupported region.

Ready to try it?

Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.