iTerm2终端配置VPN网络代理
2023-06-12 本文已影响0人
jeffrey_hjf
- 打开bash_profile,vi ~/.bash_profile
- 增加如下配置
alias disable_proxy='unset http_proxy https_proxy'
alias enable_lantern_proxy='export http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890'
- 变更生效
source ~/.bash_profile
- 应用
enable_lantern_proxy
- 测试
curl -i https://google.com
- 禁用
disable_proxy