https 是在 http 协议下面加了一层 ssl 协议。root ca's public key is preinstalled into the OS/browser. server and client exchange metadata, server send its certs, the certs is issued by the root ca and contains the sites's public key
http proxy is simple, skip.
one thing to notice is that, browser use persistent connections by default, so a connection or only a few connections are created to the proxy server, and then the browser reuse all the connections.
https protocol is basically ssl layer on port 443 + http protocol
if a http proxy server support the CONNECT method, and forward the following binary bytes as is, then it's considered a tunneling http proxy.
if a http proxy supports tunneling, then it can be used in https, then it's a https proxy. however, the proxy does not know anything about the traffic.
要想在代理上能够劫持或者篡改的 https 的流量，需要在客户端预先按照自己的根证书，一些能够查看网络流量的工具，像是 charles、fiddler 都是这么做的