WSL2 设置代理

添加到 ~/.bashrc

export HOSTIP=$(cat /etc/resolv.conf | grep "nameserver" | cut -f 2 -d " ")
export http_proxy="http://$HOSTIP:7890"
export https_proxy="http://$HOSTIP:7890"
export all_proxy="socks5://$HOSTIP:7890"
export ALL_PROXY="socks5://$HOSTIP:7890"
posted @ 2023-03-15 19:14  浅渊  阅读(157)  评论(0)    收藏  举报