配置curl,wget,pip代理

在~/.zshrc 中添加setproxyunsetproxy, 在需要时启用或者禁用

  1. vim ~/.zshrc
  2. ##添加如下指令
  3. alias setproxy="export http_proxy=http://127.0.0.1:41091; export https_proxy=http://127.0.0.1:41091; echo 'HTTP Proxy on';"
  4. alias unsetproxy="unset http_proxy; unset https_proxy; echo 'HTTP Proxy off';"
  5. ## update
  6. source ~/.zshrc

配置git 代理

  1. ##禁用ssl验证
  2. git config --global http.sslVerify false
  3. ### 设置http代理
  4. git config --global http.proxy http://127.0.0.1:41091
  5. ## 设置https代理
  6. git config --global https.proxy http://127.0.0.1:41091