You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your work about wsl.
Firstly, I have tried some updates about "networkingMode=mirrored", but failed. My system version is 22H2 which is not "Release Preview Channel".
So, I delete .wslconfig file.
Finally, when I start new terminal, I see "wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。" on the terminal.
The key point is "Release Preview Channel" is requisite for mirrored network in wsl2 ?
Expected Behavior
wsl2 can be visited by other machine in local area network.
Actual Behavior
wsl2 can not be visited by other machine in local area network.
Diagnostic Logs
No response
Reacted by kwin, Zeke Zhang, 原俊杰, Artur Khusainov, klklk09, weizhi, maizer and Typed SIGTERM
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=8GB
# Sets the VM to use two virtual processors
processors=6
# Sets amount of swap storage space to 8GB, default is 25% of available RAM
swap=4GB
uname -a
Linux almalinux 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
If you have set up a proxy before, you also need to delete the code that set up the proxy before. I understand that mirrored has done the same network mapping for the host and virtual machine, and no additional settings are needed. I successfully solved the problem through this method. You can try it
[wsl2]
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
[experimental]
# requires dnsTunneling but are also OPTIONAL
bestEffortDnsParsing=true
useWindowsDnsCache=true
哈哈,并不是这个错误,我的问题是文件编码,
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2024年11月29日 13:53 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***>,
***@***.***> |
| 主题 | Re: [microsoft/WSL] wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。 (Issue #10753) |
Open or create the wsl configuration file (located at %USERPROFILE%\.wslconfig), and enter the following content:
[experimental]
autoMemoryReclaim=gradual # gradual | dropcache | disabled
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
Open the command prompt and execute wsl --shutdown
ref: https://github.com/microsoft/WSL/releases/tag/2.0.0
妙手回春呀大夫
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
Activity
github-actions commentedon Nov 15, 2023
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
Closed similar issues:
You can give me feedback by thumbs upping or thumbs downing this comment.
MikeWang000000 commentedon Nov 15, 2023
English translation:
I can reproduce this issue.
wsl.exe.This error message displays every time I type
bashorwslthen press enter. It's a bit annoying.Can we have a config option to turn off this message?
Btw, I'm not using WSL in NAT mode. Here's my
.wslconfig:Edit:
Workarounds: Set this config in
.wslconfigwill suppress the error message:However this config will completely disable the auto proxy feature.
gh73962 commentedon Nov 16, 2023
same
dreamjz commentedon Nov 16, 2023
same +1
Dorado607 commentedon Nov 16, 2023
一样的问题
Vixb1122 commentedon Nov 16, 2023
%USERPROFILE%\.wslconfig), and enter the following content:wsl --shutdownDorado607 commentedon Nov 16, 2023
Works to me, also fix my problem of Pycharm debugging from wsl, thanks!
wzhuo2022 commentedon Nov 17, 2023
thanks~
FlowerBirds commentedon Nov 17, 2023
Not works for me.
FlowerBirds commentedon Nov 17, 2023
#10650 The problem still occurs in the 2.0.9 version.
mancuoj commentedon Nov 17, 2023
By the way:
zhaoqiu-china commentedon Nov 18, 2023
mirrored目前是只有预览版有是吧?
wzhuo2022 commentedon Nov 18, 2023
If you have set up a proxy before, you also need to delete the code that set up the proxy before. I understand that mirrored has done the same network mapping for the host and virtual machine, and no additional settings are needed. I successfully solved the problem through this method. You can try it
haoenz commentedon Nov 19, 2023
Thanks a lot! It works!
FlowerBirds commentedon Nov 20, 2023
wzhuo2022 mancuoj # experimental feature has moved to [wsl2] (https://github.com/microsoft/WSL/releases/tag/2.0.5), but networkingMode does not works for me:bug:.
21 remaining items
QuantProcessing commentedon Apr 23, 2024
THX!
jytang0621 commentedon Apr 27, 2024
THANK YOU!!!!
HajerZhang commentedon Jul 2, 2024
If using this
wslconfig, you can't use MPI anymore in wsl, may because the firewall stop the communication or something(i dont know),如果要用MPI别用这个Homura59 commentedon Jul 5, 2024
感谢!解决了
strongman2015 commentedon Jul 8, 2024
感谢。 由于一开始.wslconfig文件是txt文件类型,尝试了很久。后续把.txt去掉就可以了
C2jeremy commentedon Aug 14, 2024
折腾了好久,感谢!
wenzhuo4657 commentedon Oct 24, 2024
docker代理对这个有影响吗?
wenzhuo4657 commentedon Oct 24, 2024
糟糕,我不能找到我的代理配置,我貌似只在主机上开启了代理设置
wenzhuo4657 commentedon Oct 24, 2024
当我尝试关闭了主机上的代理,报错消失了,但是我必须使用这些代理
sleepy-shawn commentedon Nov 21, 2024
配置完这个之后报错貌似消失了
FanTacyTutu commentedon Nov 29, 2024
妙手回春呀大夫
wenzhuo4657 commentedon Dec 4, 2024
hz-xiaxz commentedon Jan 29, 2025
Thanks for this post! According to the newest release of WSL2 for win11, the
networkingMode,dnsTunneling,firewall,autoProxysettings are not experimental now, ref: https://learn.microsoft.com/en-us/windows/wsl/wsl-configLyxien commentedon Jun 13, 2025
没有人说 %USERPROFILE% 怎么获取吗?
gongfuture commentedon Jun 21, 2025
你 win+r 输入 %USERPROFILE% 就行