-
-
Save levihuayuzhang/9201fe5d8b3375dbb7fcc96f91235a16 to your computer and use it in GitHub Desktop.
WSL2使用代理
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wsl2] | |
dnsTunneling=false | |
networkingMode=NAT # mirrored | |
dnsProxy=true | |
autoProxy=true | |
firewall=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hostip=$(cat /etc/resolv.conf | grep -oP '(?<=nameserver\ ).*') | |
export https_proxy="http://${hostip}:7890" | |
export http_proxy="http://${hostip}:7890" | |
export all_proxy="socks5://${hostip}:7891" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment