git下载编译proxychains实现socks代理使用
1. 使用git下载和编译
yum -y install git gcc
cd /opt
git clone https://github.com/haad/proxychains
cd proxychains
./configure
make
make install
cp src/proxychains.conf /etc/proxychains.conf
2. 配置代理
vi /etc/proxychains.conf
1).修改最后一行为代理的类型 ip 端口
[ProxyList]
socks5 127.0.0.1 1080
2).把quiet_mode前面的#号去掉。这样就不会显示代理的详细连接过程。
# Quiet mode (no output from library)
quiet_mode
3).这个步骤是可选的,如果socks代理支持代理dns,那么就不要注释。
如果socks代理不支持代理dns,那么需要把proxy_dns前面加上#号。
加上#号后,本机的DNS请求数据会直接到达/etc/resolv.conf定义的DNS服务器。
# Proxy DNS requests - no leak for DNS data
#proxy_dns
3. 使用proxychains
proxychains4 命令 参数
[root@localhost ~]# proxychains4 yum install dev86
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.zju.edu.cn
* epel: ca.mirror.babylon.network
* extras: mirrors.sohu.com
* updates: centos.vwtonline.net
Resolving Dependencies
--> Running transaction check
---> Package dev86.x86_64 0:0.16.21-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================================
Package Arch Version Repository Size
===================================================================================================================
Installing:
dev86 x86_64 0.16.21-2.el7 epel 348 k
Transaction Summary
===================================================================================================================
Install 1 Package
Total download size: 348 k
Installed size: 991 k
Is this ok [y/d/N]:
智能防污染DNS服务器需要自己搭建,下面说个简单的方法。
在一台拥有外网、内网双网卡电脑上安装BIND,设置BIND转发DNS请求到上级的智能防污染路由器即可,假设192.168.1.1为路由器的ip地址,那么named.conf如下:
options {
forwarders { 192.168.1.1; };
forward only;
allow-query { any; };
};