You open WSL and there it is again: “An HTTP proxy change has been detected.” Sometimes it’s just a warning, sometimes your git clone, npm install, or apt update straight-up fails because WSL can’t reach the internet through your proxy.

Quick fix: This warning means your Windows proxy settings changed and WSL hasn’t caught up. The permanent solution is to enable mirrored networking + autoProxy in .wslconfig. Create or edit C:\Users\YourUsername\.wslconfig:

[wsl2]
networkingMode=mirrored

[experimental]
autoProxy=true

Then run wsl --shutdown and restart WSL. Your proxy now syncs automatically — no more warnings.

What “An HTTP Proxy Change Has Been Detected” Means

WSL runs in a virtual machine with its own network stack. By default, it uses NAT networking, which means:

  • WSL has a different IP address than your Windows host
  • WSL has its own localhost (127.0.0.1), separate from Windows
  • Changes to Windows proxy settings don’t automatically propagate to WSL

When you start WSL, it checks Windows’ proxy configuration. If the proxy has changed since the last time WSL ran (or if WSL can’t access the proxy at all), you get this warning.

Common triggers:

TriggerWhy It Happens
You toggled your VPN or proxy app on/offThe Windows system proxy changed
You switched Wi-Fi networksDifferent network, different proxy settings
Your proxy app (Clash, V2Ray, etc.) restartedThe proxy port or address changed
WSL was suspended and resumedProxy state might have changed during sleep

The Permanent Fix: Mirrored Networking + AutoProxy

This is the recommended approach for 2026 and beyond. It makes WSL share Windows’ network stack entirely — same IP, same localhost, same proxy.

Step 1: Create or Edit .wslconfig

Open C:\Users\YourUsername\.wslconfig in Notepad or any text editor. If it doesn’t exist, create it.

[wsl2]
networkingMode=mirrored

[experimental]
autoMemoryReclaim=gradual
autoProxy=true
dnsTunneling=true
firewall=true

Step 2: Restart WSL

wsl --shutdown

Then open your WSL distribution (e.g., Ubuntu). The warning should be gone.

Step 3: Verify It’s Working

Inside WSL, check that the proxy is active:

echo $http_proxy
echo $https_proxy

With autoProxy=true, these should automatically reflect your Windows proxy settings. If they’re empty, your Windows system proxy might not be set — that’s fine, the warning won’t appear either.

If Mirrored Mode Isn’t Available (NAT Mode Workaround)

If you’re on an older Windows build that doesn’t support mirrored networking, you need to manually configure the proxy inside WSL.

Find Your Windows Host IP

In WSL (NAT mode), run:

cat /etc/resolv.conf | grep nameserver | awk '{print $2}'

This gives you the Windows host IP (typically something like 172.x.x.1).

Set Proxy Environment Variables

Add these to your ~/.bashrc or ~/.zshrc, replacing 172.x.x.1 with your host IP and 1080 with your proxy port:

export http_proxy="http://172.x.x.1:1080"
export https_proxy="http://172.x.x.1:1080"
export no_proxy="localhost,127.0.0.1"

Then source ~/.bashrc to apply.

The problem with this approach: Your host IP can change on every WSL restart. For a more robust solution, add a function to your .bashrc that auto-detects the host IP:

get_wsl_host() {
    cat /etc/resolv.conf | grep nameserver | awk '{print $2}'
}

export http_proxy="http://$(get_wsl_host):1080"
export https_proxy="http://$(get_wsl_host):1080"
export no_proxy="localhost,127.0.0.1"

Proxy Still Not Working After the Fix?

Check 1: Is Your Proxy Actually Running?

Make sure your proxy app (Clash, V2Ray, Shadowsocks, etc.) is running on Windows and listening on the correct port. You can verify in Windows:

netstat -ano | findstr :1080

Replace 1080 with your proxy port. If nothing shows up, your proxy isn’t running.

Check 2: Allow WSL Through Windows Firewall

In mirrored mode, WSL traffic goes through the Windows firewall. If you have strict firewall rules, WSL’s outbound connections might be blocked:

  1. Open Windows Defender Firewall
  2. Click Allow an app through firewall
  3. Make sure your proxy app is allowed for both Private and Public networks

Check 3: Git-Specific Proxy Settings

Git uses its own proxy config, independent of environment variables:

# Check current git proxy
git config --global http.proxy

# Set git proxy (mirrored mode — just use localhost)
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080

# Or unset if autoProxy is working
git config --global --unset http.proxy
git config --global --unset https.proxy

Check 4: npm/yarn Proxy

# Set npm proxy
npm config set proxy http://127.0.0.1:1080
npm config set https-proxy http://127.0.0.1:1080

# Or clear it if autoProxy works
npm config delete proxy
npm config delete https-proxy

How This Relates to Other WSL Proxy Warnings

WSL has a whole family of proxy-related warnings. Here’s how they connect:

WarningCauseOur Fix
“An HTTP proxy change has been detected”Windows proxy changed, WSL didn’t syncThis guide — mirrored + autoProxy
“localhost proxy configuration detected but not mirrored to WSL”Localhost proxy in NAT mode can’t reach WSLWSL localhost proxy fix
“Could not resolve proxy”DNS or proxy address is unreachable from WSLCould not resolve proxy fix
“Mirrored networking mode is not supported”Windows version too old for mirrored modeMirrored networking fix

All of these share the same root cause: WSL’s NAT mode isolates its network from Windows. Mirrored networking fixes them all at once.

FAQ

Q: Is “An HTTP proxy change has been detected” an error or just a warning? A: It’s technically a warning — WSL is telling you it noticed a proxy change. But if your internet doesn’t work inside WSL after seeing this, it’s effectively an error that needs fixing.

Q: Do I need both networkingMode=mirrored AND autoProxy=true? A: They solve different parts of the problem. networkingMode=mirrored makes WSL share Windows’ network (so localhost is the same). autoProxy=true makes WSL automatically pick up Windows proxy settings. Use both for the complete fix.

Q: Will this break my Docker setup? A: Docker Desktop for Windows works well with mirrored mode. If you’re using Docker inside WSL directly (without Docker Desktop), you may need to adjust Docker’s network config. See our WSL2 Docker GPU guide for more.

Q: I don’t use a proxy. Why am I seeing this? A: Some VPN apps (like Cisco AnyConnect or GlobalProtect) set a system proxy when they connect. Even if you didn’t explicitly configure a proxy, one might be active. Check Windows Settings → Network & Internet → Proxy to see if anything is set.

Q: Can I suppress the warning without fixing the underlying issue? A: Technically yes — you could add suppressWarnings=true to your .wslconfig. But we strongly recommend against it. If the proxy isn’t working, suppressing the warning just hides the symptom while your internet remains broken inside WSL.

Reference: