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.
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.
Write http://USERNAME:PASSWORD@HOST:PORT. Claude Code does not support SOCKS. If the password has special characters, percent-encode them.
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.
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.
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. 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.
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.
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.
Check the exit IP, country and ISP your proxy really gives you in 30 seconds — and why IP databases disagree on the city. With our own test of three lookup services.
Reference links
6
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.
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.
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.
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.
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.