Repository navigation
Description
Windows Version
Microsoft Windows [Version 10.0.26200.9711]
WSL Version
2.7.3.0
Are you using WSL 1, WSL 2, or WSLC?
- WSL 2
- WSL 1
- WSLC
Kernel Version
No response
Distro Version
No response
Other Software
No response
Repro Steps
-
Enable a Windows HTTP proxy with bypass entries such as
localhost;127.*;10.*;192.168.*(included in Clash Verge Rev's Windows defaults). -
Enable these settings in
.wslconfig:[wsl2] networkingMode=mirrored autoProxy=true
-
Once those settings are active, open a fresh WSL session and inspect
no_proxy/NO_PROXY. The imported list contains127.*. -
Start a local server in WSL:
python3 -m http.server 18080 --bind 127.0.0.1
-
In a second fresh WSL session, compare the imported bypass list with a CIDR override, keeping the proxy enabled:
printf 'no_proxy=%s\nNO_PROXY=%s\n' "$no_proxy" "$NO_PROXY" # loopback get proxied unexpectedly curl -q -v --max-time 5 http://127.0.0.1:18080/ -o /dev/null # We need to set no_proxy manually to make loopback not being proxied no_proxy=127.0.0.0/8 NO_PROXY=127.0.0.0/8 \ curl -q -v --max-time 5 http://127.0.0.1:18080/ -o /dev/null
Expected Behavior
Windows IP-range bypass rules should retain their meaning for Linux clients such as curl after import.
Suggested minimal fix: normalize unambiguous numeric IPv4 prefix wildcards when building ProxyBypassesComma, preserving the original ProxyBypasses entries:
127.* -> 127.0.0.0/8
10.* -> 10.0.0.0/8
192.168.* -> 192.168.0.0/16
172.16.* -> 172.16.0.0/16
Leave other patterns unchanged. This improves compatibility for CIDR-capable clients such as curl.
Precedent: hyper-util PR #309 implements the same normalization when importing WinINET proxy exclusions, fixing hyper #4128.
Actual Behavior
WSL changes the separators but exports the wildcard entries unchanged:
Windows ProxyOverride: localhost;127.*;10.*;192.168.*
WSL NO_PROXY/no_proxy: localhost,127.*,10.*,192.168.*
IP wildcards are valid Windows native proxy bypass notation, but not well-supported in Linux (e.g., curl's NO_PROXY parser does not interpret 127.* as an IP range).
The first request connects through the proxy; the second request (i.e., CIDR override) connects directly.
Without CIDR override, local or private API requests can consequently fail with 502 or connection errors, depending on the proxy.
Relevant source (WSL 2.7.3):
LxssHttpProxy.cpp:109–120: copies WinHTTP bypass entries through encoding conversion and joins them intoProxyBypassesComma; no wildcard normalization.LxssUserSession.cpp:4078–4081: exports that string directly to bothno_proxyandNO_PROXY.
Diagnostic Logs
No response
Activity
github-actions commentedon Oct 15, 2026
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done.
If this is a networking issue, please use
.\collect-wsl-logs.ps1 -LogProfile networkinginstead, following the instructions in Collect WSL logs for networking issuesOnce completed please upload the output files to this GitHub issue.
See Collect WSL logs (recommended method).
If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.
Camsyn commentedon Oct 16, 2026
I think this issue is somewhat of a feature request, aiming to have WSL follow the IP-range bypass rules in Windows when
autoproxyis enabled.If the reviewers also consider this a problem and agree with my suggested fix, I would be happy to submit a PR (#41941) to address it.
Camsyn commentedon Oct 17, 2026
/feature
github-actions commentedon Oct 17, 2026
Diagnostic information
proxy CIDR for address wildcards; WSL005 sparseVhd and swiotlb; data …
proxy CIDR for address wildcards; WSL005 sparseVhd and swiotlb; data …