我在大学时使用 ProxyChains 连接到我的代理。它工作得很好,除了它甚至将本地端口的数据包重定向到代理服务器:
|S链|-<>-172.22.2.211:3128-<><>-4.2.2.2:53-<><>-OK
|S-链|-<>-172.22.2.211:3128-<><>-127.0.0.1:57343-<--拒绝
有什么办法可以在 ProxyChains 中为 127.0.0.1 添加异常
构建
git clone https://github.com/rofl0r/proxychains
cd proxychains
git checkout v4.5
./configure
make
sudo make install
sudo rm /usr/local/etc/proxychains.conf
Run Code Online (Sandbox Code Playgroud)
在中创建以下配置文件/etc/proxychains.conf
:
strict_chain
tcp_read_time_out 15000
tcp_connect_time_out 8000
localnet 127.0.0.0/255.0.0.0
[ProxyList]
socks4 127.0.0.1 8080
Run Code Online (Sandbox Code Playgroud)
(有关src/proxychains.conf
注释示例,请参见)。
在本地端口 8080 上启动 SOCKS 代理以通过无代理服务器发送流量:
ssh -D 8080 -f -C -q -N <proxy-free server>
Run Code Online (Sandbox Code Playgroud)