- WSL默認nat模式,別動了
- 防火墻放行,見圖1
- git導入[bash1],ip為你wsl上linxu通過ifconfig獲取的本機ip,端口對好
- 某alcsh軟件開啟tun模式【經過測試,不開也行】
- 應該成了,如果不行,修改.wslconfig為下面這種[bash2] 【路徑:C:\Users\你的用戶名.wslconfig】
[bash1]
git config --global http.https://github.com.proxy http://172.24.19.109:7890
git config --global https.https://github.com.proxy http://172.24.19.109:7890
[bash2]
[wsl2]
nestedVirtualization=true
ipv6=true
[experimental]
autoMemoryReclaim=gradual # gradual | dropcache | disabled
dnsTunneling=true
firewall=true
autoProxy=true
圖1
- 參考
https://blog.csdn.net/zengaliang/article/details/135661812
https://zhuanlan.zhihu.com/p/153124468
https://blog.csdn.net/2301_77554343/article/details/145757260
https://zhuanlan.zhihu.com/p/15762609815
https://blog.csdn.net/weixin_57253447/article/details/145724156
https://zhuanlan.zhihu.com/p/15762609815
https://blog.csdn.net/Desecrater/article/details/133581868