I have a Linux system which is behind a firewall, but it can connect to a HTTP proxy which passes all CONNECT commands through. How can I configure the Linux system to make DNS requests over TCP over the HTTP CONNECT, and to establish all outgoing TCP connections (except for those to the HTTP proxy) over the HTTP CONNECT?
I'm looking for a solution which works in any process, including statically linked binaries which call
connect(2) directly. (So
LD_PRELOAD is not an acceptable solution, because it doesn't work with statically linked binaries.)