title: HTTP SSL Proxy with Java Apache HttpClient
body: <p>Is it possible to use an SSL Proxy with Java HttpClient (or any other client if not) ?</p>
  
  <p>My real problem is to have a direct SSL proxy to send HTTP or HTTPS connections and to check the SSL proxy and Client certificates.</p>
  
  <p>For example, for an HTTP request (we check SSL proxy certificate on client, and client certificate on proxy):</p>
  
  <p>CLIENT --- SSL socket (HTTPS) ---> SSL PROXY --- Plain socket (HTTP) ---> SERVER</p>
  
  <p>And for HTTPS request (use CONNECT request to tunnel SSL connection) (we check SSL proxy certificate and Server certificate on client, and client certificate on proxy and possibly on server if requested):</p>
  
  <p>CLIENT --- SSL socket (HTTPS tunnel) ---> SSL PROXY --- SSL socket (HTTPS) ---> SERVER</p>
  
  <p>I can't find a way to do that with HttpClient which only allows to set a plain HTTP Proxy that can tunnel HTTPS request (but that is not what I want)</p>
  
  <p>Thanks</p>