21天精品區塊鏈課程免費學習,深入實戰行家帶路,助力開發人員輕鬆玩轉區塊鏈!>>>
背景:
1.運用包管理工具dep管理引用包2.有些包需要代理,有包是內部包不能用代理
實現:
1.配置socks5代理(略過)
2.安裝privoxy
通過brew install privoxy進行安裝安裝成功後,通過brew info privoxy查看安裝過後的資訊 privoxy: stable 3.0.26 (bottled) ******省略****** To have launchd start privoxy now and restart at login: brew services start privoxy Or, if you don't want/need a background service you can just run: privoxy /usr/local/etc/privoxy/config 從資訊中可以看出來設定檔在/usr/local/etc/privoxy/config
3. 配置設定(配置協助文檔: https://www.privoxy.org/user-manual/config.html)
# privoxy 監聽配置listen-address 127.0.0.1:1087# privoxy 代理到socks的地址上forward-socks5 / 127.0.0.1:1086 .# 不需要走http代理的IP或者網域名稱forward 192.168.*.* .forward 10.*.*.* .forward 127.*.*.* .forward *.com .儲存配置,啟動privoxy
讓終端走privoxy的http代理
export http_proxy="http://127.0.0.1:1087"export https_proxy="http://127.0.0.1:1087"終端代理的N中方法: https://blog.fazero.me/2015/09/15/%E8%AE%A9%E7%BB%88%E7%AB%AF%E8%B5%B0%E4%BB%A3%E7%90%86%E7%9A%84%E5%87%A0%E7%A7%8D%E6%96%B9%E6%B3%95/