First check the port of Clash. Here is7890.
In the local PowerShell, enter ipconfig,
Find the vEthernet (WSL (Hyper-V firewall)) at the bottom, and remember the IPv4 address here. Mine is 172.20.0.1 .
Next, in WSL, add the following code to ~/.bashrc:
alias proxy='export all_proxy=http://172.20.0.1:7890' alias unproxy='unset all_proxy'Save, then execute the following code to activate:
source ~/.bashrc 
Leave a Reply