mac配置终端代理

git太慢,怀疑人生怎么办?

小飞机开起来,复制终端代理命令却无效,又怀疑人生了怎么办?

socks5监听端口代理命令无效,又又怀疑人生了怎么办?

安装privoxy

安装

brew install privoxy

配置

vim /usr/local/etc/privoxy/config

# 可选,默认监听本地连接
listen-address 0.0.0.0:8118
# 把本地 HTTP 流量转发到本地 1086 SOCKS5 代理
forward-socks5 / localhost:1086 .

注:8118为privoxy的默认监听端口; 1086为ssNG-偏好设置-高级-本地socks5监听端口。

启动

# 启动并开机自启
brew services start privoxy 

配置代理

配置全局sock5代理

export ALL_PROXY=socks5://127.0.0.1:1086

配置github代理

git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
git config --global https.https://github.com.proxy socks5://127.0.0.1:1086

你可能感兴趣的:(效率)