美文网首页
Linux设置代理

Linux设置代理

作者: 超级大柱子 | 来源:发表于2018-05-31 23:46 被阅读17次

1.安装配置shadowsock客户端版本

安装客户端shadowsocks

其实shadowsocks安装时是不分客户端还是服务器端的,只不过安装后有两个脚本一个是sslocal代表以客户端模式工作,一个是ssserver代表以服务器端模式工作。

yum install python-pip (如果没有pip)
pip install shadowsocks

然后执行sslocal命令(记得替换ip和密码和加密条件)后台启动:

nohup sslocal -s your_server_ip -p your_server_port -l 1080 -k your_server_passwd -t 600 -m origin > /dev/null 2>&1 &`

执行查看后台sslocal是否运行
ps aux |grep sslocal |grep -v "grep"

2.安装proxychains-ng

安装

git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng  
./configure --prefix=/usr --sysconfdir=/etc

make #需要gcc环境  
sudo make install  
sudo make install-config

配置

sudo vi /etc/proxychains.conf  

[ProxyList]  
# add proxy here ...  
# meanwile  
# defaults set to "tor"  
socks5  127.0.0.1 1080

使用

proxychains4 ping www.google.com 

参考文章:

https://blog.csdn.net/yanzi1225627/article/details/51121507

相关文章

网友评论

      本文标题:Linux设置代理

      本文链接:https://www.haomeiwen.com/subject/epncsftx.html