vim ~/.zshrc
插入这个:
export ME="/Users/zalss" #你的目录
source $ME/.start.sh
新建~/.start.sh
chmod -x ~/.start.sh
~/.start.sh 内容为:
--------------------------------
export http="http://127.0.0.1:7890"
export https=$http
export socks5="socks5://127.0.0.1:7891"
export reslove="
🌈🌈🌈🌈
开启代理
🌈🌈🌈🌈
"
export reject="
🌈🌈🌈🌈
已关闭!
🌈🌈🌈🌈
"
alias mymac="neofetch"
alias setp="
git config --global http.proxy $http;
git config --global https.proxy $http;
npm config set proxy $http;
npm config set https-proxy $http;
yarn config set proxy $http;
yarn config set https-proxy $http;
export ALL_PROXY=$socks5
export http_proxy=$http;
export https_proxy=$http;
echo -e '\033[32m $reslove \033[0m'
"
alias unsetp="
git config --global --unset http.proxy;
git config --global --unset https.proxy;
npm config delete proxy;
npm config delete https-proxy;
yarn config delete proxy;
yarn config delete https-proxy;
unset http_proxy;
unset https_proxy
unset ALL_PROXY
echo -e '\033[31m $reject \033[0m'
"
alias ip="curl
ipinfo.io"
--------------------------------