以安装telenet工具nally为例:
$ brew cask install nally
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (phinze/cask, homebrew/cask).
==> Satisfying dependencies
==> Downloading https://yllan.github.com/nally/download/Nally-1.4.9.app.zip
######################################################################## 100.0%
curl: (56) Recv failure: Connection reset by peer
Error: Download failed on Cask 'nally' with message: Download failed: https://yllan.github.com/nally/download/Nally-1.4.9.app.zip
如果有ssr代理,则可以通过输入:
$ export ALL_PROXY=socks5://127.0.0.1:1080
并查看是代理否设置成功:
$ curl ip.gs
然后就可以愉快地看到:
Updating Homebrew...
==> Satisfying dependencies
==> Downloading https://yllan.github.com/nally/download/Nally-1.4.9.app.zip
######################################################################## 100.0%
==> Verifying checksum for Cask nally
==> Installing Cask nally
==> Moving App 'Nally.app' to '/Applications/Nally.app'.
🍺 nally was successfully installed!
参考方法:
让终端走代理的几种方法