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