git下载编译proxychains实现socks代理使用

本文介绍如何通过git下载并编译proxychains工具来实现socks代理,并配置proxychains.conf文件来指定代理服务器的类型、IP及端口。此外还介绍了如何使用proxychains4命令来确保所有网络请求都通过指定的代理进行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

git下载编译proxychains实现socks代理使用

1. 使用git下载和编译

编译proxychains

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; };
};
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值