export http_proxy=socks5://127.0.0.1:1086
export https_proxy=socks5://127.0.0.1:1086
export all_proxy=socks5://127.0.0.1:1086
仅对当前终端窗口有效,关闭自动失效
在使用cocoapods遇到timed out,基本都能是终端没有挂上代理的问题
例如下面这种Error
[!] Error installing libwebp
[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/p6/t42f8nmd7332018zm9m2s3d80000gn/T/d20180415-42656-1hjxh43 --template= --single-branch --depth 1 --branch v0.6.0
Cloning into '/var/folders/p6/t42f8nmd7332018zm9m2s3d80000gn/T/d20180415-42656-1hjxh43'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out