I need to open a non standard TCP (high) port though a proxy server in order to connect via company's proxy server to another server. The proxy is Squid, but allows traffic to the specific port we need to access.
How can I open the socket from my C program in order to connect via the proxy server? My suspicion is to use 2 connections, one to the proxy server and then to the target server. If that is correct, how can I do that?