tcpdump, wireshark can capture packets.
haproxy can be a proxy of many networking protocols
mitmproxy can help see encrypted traffic by acting as a literal man in the middle.
ssh with certain parameters can become a SOCKS5 proxy to encrypt and tunnel traffic out of a hostile network