My organisation directs all traffic through a proxy. As proxy settings, we are required to use an http proxy setting for both the http_proxy & https_proxy environment variables.

If I set the https_proxy variable to an https version of the same proxy, some programs the use the https_proxy env variable cease to work.

So does this mean that the proxy does not support https connections? What about https websites that load normally in my browser?

  • The common settings of a proxy to deny all https (CONNECT) request other than destination tcp port 443. – Ipor Sircer Nov 29 '16 at 14:41

Beware when you set http_proxy and https_proxy, normally you should set them at the same URL including the schema part, example:


Notice that both are in HTTP. That tells you the protocol your proxy uses, not the target website's schema, which can be HTTP or HTTPS, that is not related.

When, using the proxy for connecting to a HTTPS website, the proxy works in TCP mode, and (I'm simplifying here) your TCP connection passes through the proxy carrying encrypted packets from your client to the target website.

So, try setting your https_proxy environment variable the same as your http_proxy and hope you're allowed to use the CONNECT method.

  • Yes, that is how I use it right now, and it works. I was just worried that that means that the connection is http upto the proxy and maybe https only after. So is this related to me not being able to connect to port 443s of external machines? For eg., keyservers. – physkets Nov 29 '16 at 15:20
  • As for my reply, the HTTP in http(s)_proxy exnv var is the protocol you use to connect to your proxy. When, using the proxy you connect to a HTTPS website, the proxy works in TCP mode, and (in short) your TCP connection carries encrypted packet from your client to the target website. If this is what you asked, tell me so i can update my answer – Fredi Nov 29 '16 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.