Last Updated: December 26, 2018
· richoh

Transparent socks proxy in bash

If you need to catch what's happening on the wire, this little hack might help you.
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

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