1. 开启局域网
2. 查看wsl2 ip地址
3. wsl2 进行设置
直接设置
export https_proxy="http://172.22.64.1:1080"
export http_proxy="http://172.22.64.1:1080"
export all_proxy="sock5://172.22.64.1:1080"
export ALL_PROXY="sock5://172.22.64.1:1080"
别名设置
alias setp='export https_proxy="http://172.22.64.1:1080";export http_proxy="http://172.22.64.1:1080";export all_proxy="socks5://172.22.64.1:1080";export ALL_PROXY="socks5://172.22.64.1:1080";'
alias unsetp='unset https_proxy; unset http_proxy; unset all_proxy; unset ALL_PROXY;'
- setp 开启代理
- unsetp 关闭代理