Topic: connecting to secure web proxy
I am writing an http client with secure web proxy support (stunnel) using wolfssl.
I am able to connect to the proxy server and complete the Tls handshake successfully, then basic HTTP application data (port 80 sites) can be transfered without issues.
but after asking the proxy to forward tcp data from a secure website (Port 443) ("CONNECT HOST:PORT HTTP/1.1"), how do I make a hand shake with the site's sever if the socket is already transporting encrypted data from the Proxy.
1- Tcp connect to Proxyhost:Port
2- initialize wolffssl and setfd
4- Tls handshake with proxy success.
5- Send a connect Command to a websites server (Ex. "CONNECT google.com:443 HTTP/1.1")
6- proxy replies 200 OK
7- how to negotiate TLS now ?????
plz if you could answer with an example .