We use Google Analytics and PostHog to see which pages bring in customers and where visitors get stuck. Until you agree both run without cookies — they count the pages you open and what you click, but cannot recognise you across visits. Agreeing lets them use cookies, so we can tell repeat visitors apart, lets PostHog record a replay of your visit, with anything you type hidden, and loads OpenAI’s measurement pixel, which shows us whether a visit came from one of our ads in ChatGPT. Nothing is sent to OpenAI until you agree. Either way we never build advertising profiles or target ads. Privacy Policy

15% off your first purchase with code WELCOME15, up to 25 GB.

See pricing

Guide · Proxy basics

How to fix SSL: WRONG_VERSION_NUMBER when using a proxy

[SSL: WRONG_VERSION_NUMBER] wrong version number through a proxy almost always means the proxy URL starts with https:// while the proxy speaks plain HTTP. The client opens TLS to the proxy itself, the proxy answers in plain text, and OpenSSL reads that text as a broken TLS record. The fix is one character: proxies={"http": "http://...", "https": "http://..."}. The https key means "for HTTPS sites"; the value says how to reach the proxy, and HTTPS still runs end to end through a CONNECT tunnel. On OpenSSL 3.5 the same mistake reads [SSL] record layer failure instead.

Reviewed 2 Nov 2026

The short answer

  • The classic mistake is proxies={"https": "https://user:pass@host:port"} or HTTPS_PROXY=https://... in the environment. Both reproduced the error.
  • OpenSSL 3.0.15 printed [SSL: WRONG_VERSION_NUMBER] wrong version number; OpenSSL 3.5.5 printed [SSL] record layer failure for the identical setup.
  • urllib3 adds a hint for both: Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP.
  • An https:// proxy URL is taken literally since urllib3 1.26.0 added HTTPS-proxy support: it means TLS to the proxy, which most proxies do not offer.
  • No ProxyError in the traceback? Then you are speaking TLS to a plain-HTTP port of the site itself, for example https://host:80.

Why an https:// proxy URL breaks the handshake

There are two separate connections: yours to the proxy, and the tunnel from the proxy to the site. urllib3's documentation lists the four combinations. With an HTTP proxy and an HTTPS site it opens a plain TCP connection to the proxy, sends CONNECT, then runs TLS with the site inside the tunnel. With an https:// proxy URL it first runs TLS with the proxy itself.

ARC's connection strings use plain HTTP to the gateway: http://USERNAME:PASSWORD@proxy.arcproxies.io:8000. When the client sends a TLS ClientHello to such a port, the proxy cannot parse it and answers with a plain-text HTTP/1.1 400 Bad Request. OpenSSL reads the first bytes of that answer as a TLS record header, finds no valid version, and fails. Our local test proxy logged exactly that: a TLS ClientHello received, a 400 sent back.

The same mistake on different OpenSSL versions

Reproduced on 2026-11-02 against a local HTTP proxy with proxies={"https": "https://..."}, target https://example.com/:

Client and versionsError
requests 2.34.2, urllib3 2.8.0, Python 3.12.6, OpenSSL 3.0.15ProxyError(... SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1000)')))
requests 2.34.2, urllib3 2.8.0, Python 3.13.12, OpenSSL 3.5.5ProxyError(... SSLError(SSLError(1, '[SSL] record layer failure (_ssl.c:1032)')))
requests 2.31.0, urllib3 1.26.20, OpenSSL 3.0.15ProxyError('Your proxy appears to only use HTTP and not HTTPS...', SSLError(... WRONG_VERSION_NUMBER ...))
httpx 0.28.1, proxy="https://..."httpx.ConnectError: [SSL: WRONG_VERSION_NUMBER] wrong version number (OpenSSL 3.0) or [SSL] record layer failure (OpenSSL 3.5)
aiohttp 3.14.5, proxy="https://..."ClientConnectorSSLError: Cannot connect to host 127.0.0.1:18080 ssl:default [[SSL: WRONG_VERSION_NUMBER] ...]
curl 8.7.1 (macOS, LibreSSL 3.3.6), -x https://...curl: (35) LibreSSL/3.3.6: error:1404B42E:SSL routines:ST_CONNECT:tlsv1 alert protocol version

urllib3 recognises "wrong version number", "unknown protocol" and "record layer failure" and adds its hint for all three; its 2.2.0 changelog records the fix for the new OpenSSL 3.2 message. httpx and aiohttp give no hint, so the OpenSSL text is all you get there.

The fix

  • Change the proxy URL to http:// for both keys. With that change every client above returned status 200 through the same proxy.
  • Check the environment: env | grep -i _proxy. urllib3's own troubleshooting page names HTTPS_PROXY=https://... as the typical culprit; we reproduced it with no proxies argument at all.
  • On Windows and macOS the proxy may also be set at system level, as urllib3's troubleshooting page points out.
  • Only use https:// for the proxy if the provider explicitly offers TLS to the proxy endpoint. If unsure, test the http:// form of the string in the proxy tester.
  • Same error without any proxy? Then the URL itself points TLS at a plain-HTTP port: requests.get("https://host:80") gave SSLError(... WRONG_VERSION_NUMBER ...) with no ProxyError around it.

Code

Worked example

Wrong and right proxies mapping (both ran)
import requests# Wrong: TLS to a proxy that speaks plain HTTP# -> ProxyError ... [SSL: WRONG_VERSION_NUMBER] wrong version number (OpenSSL 3.0)# -> ProxyError ... [SSL] record layer failure (OpenSSL 3.5)bad = {"https": "https://USERNAME_pool-arcfast_country-de:PASSWORD@proxy.arcproxies.io:8000"}# Right: the key is the site's scheme, the value is how to reach the proxyproxy = "http://USERNAME_pool-arcfast_country-de:PASSWORD@proxy.arcproxies.io:8000"good = {"http": proxy, "https": proxy}r = requests.get("https://example.com/", proxies=good, timeout=30)print(r.status_code)   # HTTPS still runs end to end inside the CONNECT tunnel
Environment variables: fix the scheme
env | grep -i _proxy# HTTPS_PROXY=https://...   <- this causes the errorexport HTTPS_PROXY="http://USERNAME_pool-arcfast_country-de:PASSWORD@proxy.arcproxies.io:8000"export HTTP_PROXY="$HTTPS_PROXY"

FAQ

Questions

Something not covered? Write to contact@arcproxies.io.

What does SSL WRONG_VERSION_NUMBER mean with a proxy?

Your client tried to start TLS with something that answered in plain text. Through a proxy that nearly always means the proxy URL starts with https:// while the proxy speaks HTTP. Change it to http://.

Should the https key in requests proxies use an https:// URL?

No, not for a normal HTTP proxy. The key https means the rule applies to HTTPS sites. The value describes how to reach the proxy, which is usually http://. The site's TLS still runs end to end through a CONNECT tunnel.

Why do I get record layer failure instead of WRONG_VERSION_NUMBER?

Newer OpenSSL versions word it differently. In our tests OpenSSL 3.0.15 printed WRONG_VERSION_NUMBER and OpenSSL 3.5.5 printed record layer failure for the identical mistake. The fix is the same: use http:// for the proxy.

Does using http:// for the proxy make my HTTPS traffic insecure?

No. The client sends only the CONNECT line and the proxy credentials in plain text, then runs TLS with the website inside the tunnel. The proxy sees the hostname and the byte count, not the page.

I set no proxy in code and still get the error. Why?

requests and urllib3 read HTTP_PROXY, HTTPS_PROXY and ALL_PROXY from the environment. An HTTPS_PROXY value starting with https:// reproduces the error without any proxies argument.

Sources & review

Last reviewed by the ARC Proxies team. Prices are read from the live catalog at build time.

  1. [1]urllib3: Advanced usage: Your proxy appears to only use HTTP and not HTTPS
  2. [2]urllib3: Changelog (1.26.0: HTTPS proxies; 2.2.0: OpenSSL 3.2 error message)
  3. [3]Requests: Advanced usage: Proxies and SOCKS
  4. [4]HTTPX: Proxies
  5. [5]curl: curl man page (--proxy, --proxy-user, -w http_connect)
  6. [6]IETF: RFC 9110: HTTP Semantics, 9.3.6 CONNECT