Skip to content

Instantly share code, notes, and snippets.

@mashirozx
Created August 31, 2021 08:35
Show Gist options
  • Save mashirozx/beb63969c718eba4d0ddc9d77949e094 to your computer and use it in GitHub Desktop.
Save mashirozx/beb63969c718eba4d0ddc9d77949e094 to your computer and use it in GitHub Desktop.
clash wsl2
host_ip=$(cat /etc/resolv.conf |grep "nameserver" |cut -f 2 -d " ")
export ALL_PROXY="http://$host_ip:7890"
sed -i -E "s/((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\:7890/$host_ip:7890/" ~/.ssh/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment