title: HTTP Connect request through a cascading proxy
body: <p>I am creating a proxy server in python, which is based on BaseHTTPServer. 
  What it does is create a connection to a squid proxy, identifies the browser request(GET, CONNECT, POST etc) and adds a proxy-authorization header to it, and then forwards this request to the squid proxy.</p>
  
  <p>Problem is, as I understand, when I send a connect request, I should relay all the corresponding traffic to the squid proxy. But, as I can see in wireshark, the squid proxy doesn't reply to the 'Client Hello' part of the handshake, which I think is due to squid proxy not understanding binary data of SSL that I am just forwarding to it.</p>
  
  <p>How do I process HTTPS requests in this case?</p>
  
  <p>The code is more or less similar to TinyHTTPProxy : <a href="http://www.oki-osk.jp/esc/python/proxy/" rel="nofollow">http://www.oki-osk.jp/esc/python/proxy/</a></p>