给iTerm终端设置代理

独奏

技术分享|2015-11-6|最后更新: 2023-2-23|
type
status
date
slug
summary
tags
category
icon
password

1.设置代理

使用 curl,wget,brew等http应用程序会调用http_proxy和https_proxy这两环境变量进行代理,通过下面方式设置:

2.取消设置

3.快速切换

可以在 ~/.zshrc 或者 ~/.bash_profile 中添加这样的alias:
这样下次就可以很方便地切换proxy了!

参考