常用的一些网络代理工具
- socat
- dante
socat
轻量级端口转发工具,支持linux、mingw
# 安装socat
sudo apt-get install socat# 将本机1080端口的tcp请求转发到192.168.1.100的1082端口
socat tcp-listen:1080,fork tcp:192.168.1.100:1082
dante
轻量级socks5代理工具,包含dante-server和dante-client,支持linux
使用dante-server搭建socks5代理服务
1、安装dante-server
sudo apt install dante-server
2、编辑/etc/danted.conf
文件,修改或添加以下内容
internal: eth0 port = 1080 #表示socks5服务在eth0网卡的1080端口接受请求,这里的网卡可以写成其对应的ip地址
external: eth0 #表示数据从eth0网卡出去。在有多个网卡的情况下,可以实现一张网卡提供代理服务,另一张网卡提供网络数据# methods for socks-rules.
socksmethod: none #rfc931
# methods for client-rules.
clientmethod: none
# userid:
user.privileged: proxy
# when running as usual, it will use the unprivileged userid of:
user.unprivileged: nobody
#user.libwrap: libwrap
user.libwrap: nobody# Allow our clients, also provides an example of the port range command.
client pass {from: 0.0.0.0/0 to: 0.0.0.0/0# clientmethod: rfc931 # match all idented users that also are in passwordfile
}
pass {from: 0.0.0.0/0 to: 0.0.0.0/0protocol: tcp udpcommand: bind connect# clientmethod: rfc931 # match all idented users that also are in passwordfile
}
3、重启服务
sudo systemctl restart danted