DEV Community

Cover image for SSL wrong version number proxy: the https:// scheme mistake
proxymint
proxymint

Posted on Originally published at proxymint.com

SSL wrong version number proxy: the https:// scheme mistake

Originally published on proxymint.

SSL wrong version number through a proxy usually means TLS hit a plain HTTP port. See the error in each client, tested, and how to fix the proxy URL.

TL;DR

  • Check for https:// in your proxy URL first. Behind a proxy, wrong version number usually means your client spoke TLS to a port that only speaks HTTP. Changing it to http:// doesn't weaken the encryption to the site.
  • Your client may not say wrong version number at all. The same mistake, in a test on 2026-11-05, gave ERR_SSL_PACKET_LENGTH_TOO_LONG in Node and tlsv1 alert protocol version in macOS curl. Go said first record does not look like a TLS handshake.
  • A timeout can be the same bug. tinyproxy and proxy.py stayed silent when they got TLS, so requests just reported Read timed out, which sends you off debugging the network instead of the URL.
  • A config that used to work isn't proof. For https:// sites, Python's urllib ignored the https:// in the proxy URL on every version tested and urllib3 1.25.11 did too, which is why the same URL can run for years and then break on an upgrade.

Key takeaways

  • Search your environment as well as your code. HTTPS_PROXY alone broke requests in the test, and HTTP_PROXY set to an https:// URL broke a plain http:// site too.
  • Run the request once with no proxy. The same error with the proxy gone means your target URL is pointing TLS at a plain port, and the proxy was never involved.
  • Probe the port with openssl s_client and a raw CONNECT. An HTTP line back from the CONNECT settles that the port wants http://, even when that line is a 407.
  • Get axios to 1.17.0 or later. Versions up to 1.16.0 either hit EPROTO or sent the HTTPS request to the proxy as readable text, depending on how the proxy was set.
  • Leave verification on. verify=False and curl -k gave the identical error in the test, because no certificate ever arrives in this failure.

Read the full guide on proxymint, with the commands, tables and sources.

Top comments (0)