1.11.2. A SSL Connection over a Proxy Server

When using SSL connections it is not possible to send the authentication credentials within the HTTP header. Since the connection is encrypted the proxy server can't extract the credentials. For that reason proxies support a special mode called HTTP CONNECT. In this mode the client sends an unencrypted CONNECT header with the credentials to the proxy server. The proxy then establishes a basic connection with the server. Afterwards the client turns encryption on and continues as usual.


The only thing you have to do is to turn this behaviour on.

  TcpIpConnection conn (false, host, port);
  conn.setProxy("sonne", 8080);

  HttpProtocol prot(&conn);
  prot.setProxyAuthentication("proxyuser", "proxypassword");

  prot.enableConnect(); 1