WSL: WSL cannot use proxy with networkingMode=mirrored

Windows Version

Microsoft Windows [Version 10.0.22631.2715]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu20.04

Other Software

No response

Repro Steps

  • Set .wslconfig:
[experimental]
autoMemoryReclaim=gradual
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
  • wsl --shutdown to stop WSL
  • Set proxy port to 7890 in clash for windows and open system proxy image
  • Restart WSL

Expected Behavior

Both WSL and Windows can successfully access google.com(banned in my place) by curl

Actual Behavior

  1. Execute curl in Wondows(Powershell)
    • curl google.com succeeded image
  2. Excute curl in WSl
  • curl google.com failed image

Diagnostic Logs

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18

Most upvoted comments

升级到 22.04 就没问题了🤣

Try deleting the Linux distribution and reinstalling it. wsl --unregister <DistributionName> wsl --install