ProxyChains is redirecting packets destined to local machine to the proxy server

The following patch has been included in this fork.

Build with

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

Create the following config file in /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

(See src/proxychains.conf for a commented example).

Start the SOCKS proxy on local port 8080 to send traffic via a proxy-free server:

ssh -D 8080 -f -C -q -N <proxy-free server>