HTTPS proxy
All the other mentioned protocols to speak with the proxy are clear textprotocols, HTTP and the SOCKS versions. Using those methods could allowsomeone to eavesdrop on your traffic the local network where you or the proxyreside. Because over the connection between curl and the proxy, the data issent in the clear.
One solution for that is to use an HTTPS proxy, speaking HTTPS to the proxy,which then establishes a secure and encrypted connection that is safe fromeasy surveillance.
When an HTTPS proxy is specified, the default port used on that host is 443.
In most other ways, HTTPS proxies work likeHTTP proxies.
HTTP/2
When curl speaks with an HTTPS proxy, you have the option to use--proxy-http2
to a ask curl to try using HTTP/2 with the proxy.
By default, curl speaks HTTP/1.1 with HTTPS proxies, but if this option isused curl attempts to negotiate and use HTTP/2 instead.