Created
January 26, 2023 18:52
-
-
Save Postroggy/f8f65eee7f105d6d50a54f8858d7ecb1 to your computer and use it in GitHub Desktop.
wsl使用windows的clash代理
This file contains 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
在Windows terminal中关闭 WSL虚拟网卡的防火墙 | |
# 直接放开 `vEthernet (WSL)` 这张网卡的防火墙 | |
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow | |
----- | |
在 wsl 中。~/.bashrc | |
hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*') | |
export http_proxy=http://${hostip}:7890/ | |
export https_proxy=http://${hostip}:7890/ | |
export all_proxy=socks5://${hostip}:7890/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment