I created on golang double HTTP proxy server. Server receives request, adds additional headers in this request and sends this changed request to another proxy server, which read this headers, remove it from request, and finally make request into destination.
With HTTP it works perfect. But how create this with HTTPS ?!
In HTTPS request browser send http CONNECT request, and then send encrypted data. Can i decrypted this data with CA signed server certificate, then add headers, send HTTPS request to another server, and then send HTTPS request to destination !?