我们使用ProxyChains进行终端的SSH代理服务
下载
在GitHub中获取源代码
git clone https://github.com/haad/proxychains
或者使用release
ZIP格式:
wget https://github.com/haad/proxychains/archive/4.3.0.zip
TAR格式:
wget https://github.com/haad/proxychains/archive/4.3.0.tar.gz
解压J进入文件目录即可
编译
./configure --prefix=/usr --sysconfdir=/etc
make
sudo make install
sudo make install-config
配置
proxychains会按如下顺序查找配置文件:
./proxychains.conf
$(HOME)/.proxychains/proxychains.conf
/etc/proxychains.conf
我在Ubuntu的时候寻找到配置文件目录是/usr/etc/proxychains.conf
还有一种快速查看配置文件目录的方法就是直接运行proxychains
pi@raspberrypi:~ $ proxychains4 curl ip.cn
[proxychains] config file found: /usr/etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
[proxychains] DLL init
可以在config file found里寻找到目前使用的配置文件路径,然后使用VIM编辑即可
sudo vim /usr/etc/proxychains.conf
找到 [ProxyList],在其后面追加如下如下的代理服务器配置信息:
socks5 [IP] [Port]
使用
proxychains4 [命令] [参数列表]