[medium] add CONNECT proxy support to the agent

Use the env variables HTTP_PROXY and HTTPS_PROXY for the agent to
automatically attempt to connect using HTTP CONNECT proxy tunneling