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
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
WSL2中使用网络代理配置
背景
最近电脑升级了windows11且卸载了ubuntu系统,家里开发环境就顺带移步到WSL2。之前就听说wsl2的整体网络设计不同于wsl1非常麻烦,一直在逃避搞代理这回事儿。现在由于npm publish速度实在堪忧,设置代理这关是逃不掉了,前后折腾了2个小时总算搞明白了。在此记录。
过程
.bashrc
或.zshrc
执行
proxy
设置代理每次重启wsl后, /etc/resolv.conf中的内容会被重置,所以需要执行以下内容:
为代理软件设置防火墙放行
win11下通过
防火墙和网络保护
-允许应用通过防火墙
,将v2ray(根据个人情况而定,我用得是v2ray)设置为放行v2ray设置允许局域网访问
使用curl测试是否成功
References
Troubleshooting
netsh winsock reset
重启电脑解决。The text was updated successfully, but these errors were encountered: