终端代理解决方案

2020-05-17  本文已影响0人  lsh的学习笔记
export HTTP_PROXY="http://127.0.0.1:8001"; 
export HTTPS_PROXY="http://127.0.0.1:8001"
source ~/.zshrc
export ALL_PROXY=socks5://127.0.0.1:1080
source ~/.zshrc

通过设置alias简写来简化操作,每次要用的时候输入 setproxy,不用了就 unsetproxy;

alias setproxy="export ALL_PROXY=socks5://127.0.0.1:8001"
alias unsetproxy="unset ALL_PROXY"
alias ip="curl cip.cc"
上一篇 下一篇

猜你喜欢

热点阅读