Last Updated: December 26, 2018
·
6.181K
· richoh

Transparent socks proxy in bash

If you need to catch what's happening on the wire, this little hack might help you.

host=hostnamegoeshere.com
while true; do
    mkfifo /tmp/socks_proxy.fifo
    nc -l 8085 < /tmp/socks_proxy.fifo | tee /dev/stderr | nc $host 80 | tee /tmp/socks_proxy.fifo
    rm /tmp/socks_proxy.fifo
done

It creates a fifo and then uses it as a collector for http transactions, while dumping the data to your terminal.