How to Fix the SSL WRONG_VERSION_NUMBER Proxy Error

· Updated:

The SSL wrong version number proxy error usually means your client is trying to speak TLS to a proxy port that expects plain HTTP. An https:// proxy URL tells Python requests, curl and most other clients to encrypt the connection to the proxy itself, while a standard forward proxy waits for a plain-text CONNECT request. The fix in most cases: write the proxy URL with http://, even when the sites you visit use HTTPS.

Use http:// for the proxy URL even for HTTPS targets

Why the ssl wrong version number proxy error occurs

When you fetch an HTTPS site through an HTTP proxy, your client first sends a plain-text CONNECT example.com:443 HTTP/1.1 request to the proxy. The proxy opens a TCP connection to the site, replies HTTP/1.1 200 Connection Established, and from then on relays bytes. Your client then runs the TLS handshake with the site inside that tunnel, so the page stays encrypted end to end.

The error appears when the proxy URL starts with https://, for example https://USER:PASS@IP:PORT. That scheme tells the client the proxy itself listens behind TLS, so the client sends a TLS ClientHello to the proxy port before any CONNECT. A plain HTTP proxy cannot parse that, typically answers with a plain-text error, and the handshake fails.

Decoding the OpenSSL WRONG_VERSION_NUMBER alert

The message comes from OpenSSL, which Python's ssl module and many curl builds use. Common forms are [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:NNNN) in Python (the line number varies by build), error:1408F10B:SSL routines:ssl3_get_record:wrong version number with OpenSSL 1.1.1, and error:0A00010B:SSL routines::wrong version number with OpenSSL 3.x. curl reports it as exit code 35.

A TLS record starts with a one-byte content type (0x16 for a handshake) followed by two version bytes (0x03 and a minor version). When the proxy answers in plain text, the first bytes are the ASCII characters HTTP. OpenSSL reads H (0x48) as the record type and TT (0x54 0x54) where the version bytes should be, so it rejects the record as having a wrong version number. The message is about bytes on the wire, not about which TLS version your system supports.

HTTP proxy with CONNECT vs a TLS-wrapped proxy

"HTTPS proxy" can mean two different things. Most often it means an HTTP proxy that tunnels HTTPS traffic with CONNECT: the hop to the proxy is plain TCP, and the traffic inside the tunnel is TLS between you and the site. This is how most commercial proxies, including ProxyV4's, are reached.

Less often it means a proxy whose listening port is itself wrapped in TLS, so the client must complete a TLS handshake with the proxy before sending any request. Only for that kind of endpoint is an https:// proxy URL correct. If your provider gives you an ip:port:user:pass line and says nothing about TLS to the proxy, assume plain HTTP and use http://.

Proxy URL scheme configuration: HTTPS vs HTTP

The scheme in a proxy URL describes how the client talks to the proxy, not what kind of sites you will request. Writing https:// because the target is HTTPS is the single most common cause of this error, whether it sits in a proxies dictionary, a command-line flag or an environment variable.

It often shows up after an upgrade. Before urllib3 1.26, requests treated an https:// proxy URL as if it were http://, so a wrong scheme went unnoticed for years. Newer urllib3 versions honor the scheme and try TLS to the proxy, which is why the error frequently first appears after a requests, urllib3 or pip upgrade.

The table shows what each combination does against a standard forward proxy.

Proxy URL SchemeTarget URLClient ActionResult
http://IP:PORThttp://example.comSends unencrypted GET request directly to proxySuccess (Plain web request)
http://IP:PORThttps://example.comSends plain HTTP CONNECT, then performs TLS with targetSuccess (Standard encrypted tunnel)
https://IP:PORThttps://example.comAttempts direct TLS handshake with the proxy portFails: SSL WRONG_VERSION_NUMBER
socks5://IP:PORThttps://example.comPerforms SOCKS5 handshake, then tunnels target TLSWorks if the port is in SOCKS5 mode

Fixing the error in Python requests and other clients

In Python requests, the keys of the proxies dictionary name the scheme of the target URL, and the values say how to reach the proxy. Map both keys to an http:// URL. The Python requests setup guide covers sessions, SOCKS5 and environment variables in more depth.

import requests

# Wrong: causes SSL WRONG_VERSION_NUMBER on a plain HTTP proxy
# proxies = {'https': 'https://USER:PASS@IP:PORT'}

# Right: http:// for both target schemes
proxies = {
    'http': 'http://USER:PASS@IP:PORT',
    'https': 'http://USER:PASS@IP:PORT',
}

response = requests.get('https://example.com', proxies=proxies, timeout=15)
print(response.status_code)

Even though the target is https://example.com, the value for the https key starts with http://. urllib3 sends a plain CONNECT example.com:443 to the proxy and then verifies the site's certificate inside the tunnel as usual. pip uses the same libraries, so pip install --proxy http://USER:PASS@IP:PORT ... follows the same rule.

Handling curl and command-line utilities

In curl, -x / --proxy assumes an HTTP proxy when you leave out the scheme. If you write -x https://..., curl tries TLS to the proxy itself and fails with exit code 35 and the wrong version number message.

Use http:// or drop the scheme:

# Fails with WRONG_VERSION_NUMBER:
curl -x https://USER:PASS@IP:PORT https://example.com

# Works:
curl -x http://USER:PASS@IP:PORT https://example.com

Correcting operating system environment variables

Many tools read HTTP_PROXY, HTTPS_PROXY and ALL_PROXY (or the lowercase forms). As with requests, the variable name refers to the target scheme, so HTTPS_PROXY=https://... is the same mistake in a different place.

In your shell profile (for example ~/.bashrc or ~/.zshrc), use http:// in both variables, then open a new shell:

export HTTP_PROXY="http://USER:PASS@IP:PORT"
export HTTPS_PROXY="http://USER:PASS@IP:PORT"

In Node.js, https-proxy-agent is named for the target scheme, not the proxy: pass it an http:// proxy URL. With Axios's built-in proxy option, set the protocol to http unless your proxy really listens behind TLS.

When a ProxyV4 proxy fits this workflow

ProxyV4 proxies are reached the standard way: plain HTTP with CONNECT for HTTPS sites, or SOCKS5, both with username and password. Each private datacenter IPv4 proxy has one tenant for the whole term, in the United States, Vietnam, Japan, South Korea, Singapore, the United Kingdom or Hong Kong. Static ISP proxies are fixed IPs registered to consumer internet providers in 23 countries, including the United States and Vietnam. Traffic on both is never metered or billed.

From the order's page in the dashboard you choose HTTP only, SOCKS5 only, or both on the same port. Switching modes can move the proxy to a new port, so copy the line again afterwards.

It is not the right fit if you need mobile IPs, a rotating pool, or IPv6: rotating proxies are waitlist-only, and IPv6 proxies are a separate product that only works on IPv6-ready sites. A practical approach is to buy a single IP, run your real script against it, then scale. See live prices.

Still failing after switching to http://?

If the error persists, check that the port matches the protocol mode. Sending HTTP to a SOCKS5-only port, or SOCKS5 to an HTTP-only port, fails with protocol errors that can look similar. Also look for a second proxy setting you did not change, such as an environment variable that overrides your code or a .curlrc file.

Paste the line into the proxy checker to confirm the IP answers and authenticates. Then request https://proxyv4.com/api/my-ip through the proxy, or open the my IP tool in a proxied browser, to confirm the exit IP is the proxy's. If the proxy cannot be reached at all, the ERR_TUNNEL_CONNECTION_FAILED guide covers blocked upstream connections.

Frequently asked questions

Does using http:// in the proxy scheme expose my HTTPS traffic?

No. The scheme only describes the hop between your client and the proxy. Inside the CONNECT tunnel your client runs TLS directly with the site, so the proxy sees the hostname and port but not the page contents.

Why does requests have an https key if the proxy URL must be http://?

In Python requests, dictionary keys correspond to the protocol of the target destination URL. Setting {'https': 'http://IP:PORT'} tells the library to use that HTTP proxy whenever making a request to an HTTPS target.

Does ProxyV4 allow both HTTP and SOCKS5 on the same IP?

Yes. From the order's page in the dashboard you choose HTTP only, SOCKS5 only, or both on the same port. Switching modes can move the proxy to a new port, so copy the line again afterwards.

Will my IP address change when I renew my proxy subscription?

No. The IP stays the same while the proxy is active, and renewing before expiry keeps the same address. You can renew all proxies or a selection.

What if a proxy does not work for a technical reason?

A proxy that fails for a technical reason, such as not connecting or showing the wrong location, is covered by the refund policy, credited to your account balance.

Use http:// for the proxy URL even for HTTPS targets

Every ProxyV4 private proxy supports HTTP(S) and SOCKS5 with username and password, and traffic on IPv4 and static ISP is never metered. Buy one IP and test it in your script first.

Order one IP

Related articles

Proxy setup
Python requests through an authenticated proxy, step by step
Send Python requests through an authenticated HTTP(S) proxy: build the proxies dict, attach it to a Session, encode odd passwords, rotate a list, check the IP.
Proxy setup
Using cURL with an authenticated proxy: commands that prove it works
Send cURL requests through an authenticated HTTP(S) proxy with -x and -U, confirm the exit IP, read the CONNECT handshake and time each request on any OS.
Proxy errors
Behind ERR_TUNNEL_CONNECTION_FAILED: reading the proxy's CONNECT reply
ERR_TUNNEL_CONNECTION_FAILED hides the proxy's real reply to CONNECT. Uncover the 407 or 502 behind it and fix Chrome, Puppeteer, Playwright or Android setups.
Free tools
Check proxies in bulk: status, exit IP and latency
Free online proxy checker: paste up to 100 ip:port:user:pass lines and see which proxies work, their exit IP and latency, plus what each failure result means.
Proxy errors
Proxy errors explained, with fixes
Proxy error pages each take one message, explain what it means, list the usual causes and walk through the fix in Windows, Chrome, antidetect browsers, phones and code. Every output shown was reproduced with real test proxies. If your error is not listed, check the message against the proxy checker first: it shows whether the proxy itself answers, so you know whether to look at the proxy or at your own setup.
Knowledge base
Proxy 403 Forbidden: Is It the Proxy or the Website?
Proxy 403 Forbidden? Find out whether the proxy or the website refused the request with one curl command, then apply the fix that matches each cause.
Knowledge base
How to Fix 429 Too Many Requests When Using a Proxy
Getting 429 Too Many Requests through a proxy? Learn who sent it, how to honor Retry-After with backoff, and when more IPs help and when they do not.
Knowledge base
How to Diagnose and Fix Connection Reset by Peer with a Proxy
Fix connection reset by peer (ECONNRESET, errno 104) through a proxy: find which hop sent the reset with curl, then fix keep-alive, mode and retry issues.
Products
Dedicated datacenter proxies: one private IPv4 per customer
Private IPv4 proxies in the US, Vietnam, Japan, South Korea, Singapore, the UK and Hong Kong. One tenant per IP, HTTP(S) and SOCKS5, no traffic metering.
Products
Static ISP proxies: residential IPs on consumer networks
Static ISP proxies in 23 countries, from Germany and the UK to the US, Brazil and Japan: fixed IPs on consumer networks, one customer each, unmetered traffic.