curl 使用 socks5 代理
curl --socks5-hostname 127.0.0.1:1080 http://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/13.04/x86_64/chef_11.16.0-1_amd64.deb -O
SSH 代理
ssh -D7070 -p443 -N -v user@serveraddress
這時你就已經(jīng)擁有了一個地址為 127.0.0.1:7070 的sock5代理了!
簡單解釋一下ssh命令參數(shù)的含義:
-
-D7070
這里7070是你要轉(zhuǎn)發(fā)的本機sock5端口,可以任意修改 -
-p443
這里443是遠(yuǎn)程ssh主機的端口,根據(jù)遠(yuǎn)程主機的設(shè)置進行修改 -
-N
這個參數(shù)指的是告訴ssh僅作端口轉(zhuǎn)發(fā) -
-v
本參數(shù)可加可不加篮幢,加了提供了詳細(xì)的debug信息
注:參考資料地址忘記保存了
socks 轉(zhuǎn) http 代理
macOS 安裝 privoxy
brew install privoxy
privoxy 默認(rèn)監(jiān)聽 8118 端口
netstat -an | grep 8118
修改配置文件,添加
forward-socks5 / 127.0.0.1:1080 .
參考資料
- http://www.cnblogs.com/another-wheel/archive/2011/11/16/setup-http-proxy-via-socks-and-privoxy.html
- http://blog.devtang.com/blog/2012/12/08/use-privoxy/
apt-get 使用代理
export http_proxy=http://yourproxyaddress:proxyport
apt-get install <pkg>
brew 使用代理
socks5 代理
ALL_PROXY=socks5://127.0.0.1:1080 brew update
http 代理
http_proxy=http://IP:PORT https_proxy=http://IP:PORT brew update
pip 使用代理
pip install mitmproxy --proxy=127.0.0.1:8087
git 設(shè)置代理
cat ~/.gitconfig
[http]
proxy = socks5://127.0.0.1:7777
[https]
proxy = socks5://127.0.0.1:7777
臨時用
export http_proxy="http://IP:PORT"
export https_proxy="http://IP:PORT"