1. 安裝Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. 使用Homebrew安裝proxychains-ng
brew install proxychains-ng
3. 修改/usr/local/etc/proxychains.conf
文件
在文件末尾[ProxyList]
后面,
把原來的socks4 127.0.0.1 9050
刪掉,添加socks5 127.0.0.1 1080
...
[ProxyList]
socks5 127.0.0.1 1080
4. 使用方法
重新打開一個(gè)命令行窗口会涎,
用法就是在常規(guī)命令之前加上proxychains4
~ proxychains4 curl google.com
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.12_1/lib/libproxychains4.dylib
[proxychains] DLL init: proxychains-ng 4.12
[proxychains] Strict chain ... 127.0.0.1:1080 ... google.com:80 ... OK
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A >here</A>.
</BODY></HTML>
對(duì)比一下讳窟,不用proxychains4
的情況
~ curl google.com
curl: (7) Failed to connect to google.com port 80: Operation timed out
參考
Mac下安裝及配置 ProxyChains-NG 實(shí)現(xiàn)終端下代理
Github: proxychains-ng