Skip to content

Instantly share code, notes, and snippets.

@levihuayuzhang
Forked from libChan/wsl_clash_proxy.sh
Last active March 20, 2025 10:05
Show Gist options
  • Save levihuayuzhang/9201fe5d8b3375dbb7fcc96f91235a16 to your computer and use it in GitHub Desktop.
Save levihuayuzhang/9201fe5d8b3375dbb7fcc96f91235a16 to your computer and use it in GitHub Desktop.
WSL2使用代理
[wsl2]
dnsTunneling=false
networkingMode=NAT # mirrored
dnsProxy=true
autoProxy=true
firewall=false
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