Skip to content

Instantly share code, notes, and snippets.

@Postroggy
Created January 26, 2023 18:52
Show Gist options
  • Save Postroggy/f8f65eee7f105d6d50a54f8858d7ecb1 to your computer and use it in GitHub Desktop.
Save Postroggy/f8f65eee7f105d6d50a54f8858d7ecb1 to your computer and use it in GitHub Desktop.
wsl使用windows的clash代理
在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