brew with a socks5 proxy

Technology ,

Finally, I find the right way to use homebrew.

  1. Let http requests of git go through a socks5 proxy
git config --global http.proxy 'socks5://127.0.0.1:1081'
  1. Since homebrew doanloads files using curl, set a socks proxy for curl: just add proxy=socks5://127.0.0.1:1081 to ~/.curlrc.

Too much time has been wasted because of the poor network.