实现方式1:
vi ~/.zshrc
alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1086"
alias unsetproxy="unset ALL_PROXY"
setproxy
实现方式2
alias goproxy='export http_proxy=http://127.0.0.1:1087 https_proxy=http://127.0.0.1:1087'
alias disproxy='unset http_proxy https_proxy'
goproxy
最后执行 source ~/.zshrc