Documentation Python quickstart Blog Free tools Enterprise solutions hello@quanticdata.ioLog in

HTTP vs HTTPS: what a proxy sees in each, captured byte by byte

What a proxy received for the same POST request sent as http:// and as https://: over HTTP all 340 bytes were readable text and a test marker appeared 3 times; over HTTPS the proxy got a CONNECT line and 803 encrypted bytes with the marker readable 0 times. The card lists what stayed visible: the host name and port, not the path, headers or body.
What a proxy received for the same POST request sent as http:// and as https://: over HTTP all 340 bytes were readable text and a test marker appeared 3 times; over HTTPS the proxy got a CONNECT line and 803 encrypted bytes with the marker readable 0 times. The card lists what stayed visible: the host name and port, not the path, headers or body.

HTTP sends every request and response as plain text, by default on port 80. HTTPS is the same HTTP carried inside an encrypted TLS connection, by default on port 443. Through a proxy the difference is easy to see: an http:// request reaches the proxy as readable text, while for https:// the proxy receives only CONNECT host:443 and then encrypted bytes.

We captured both on 20 November 2026 by placing a small logging relay between curl and a QuanticData residential proxy line. The request was the same each time, with a made-up marker in the URL, in a header and in the form body, so that counting the marker shows what is readable on the way.

HTTP vs HTTPS: the difference in one table

HTTPHTTPS
URL schemehttp://https://
Default port80443
EncryptionNone: text on the wireTLS between the client and the site
Proof of who the site isNoneThe site's certificate, checked by the client
What the client asks a proxyThe full request: POST http://host/pathA tunnel: CONNECT host:443
What the proxy received in our capture340 bytes, all readable; marker found 3 times187 readable bytes (the CONNECT), then 803 bytes of TLS; marker found 0 times

How we captured what the proxy receives

A proxy line is an address your client connects to. To see exactly what arrives there, we pointed curl at a relay on our own PC, which prints every chunk it gets and passes it unchanged to the real proxy gateway. This is the whole script:

// relay.mjs: stands between the client and the proxy and prints what the proxy receives
import net from 'node:net';
const [host, port] = process.argv[2].split(':');           // the proxy gateway
const marker = process.argv[3];                             // a string to look for
const isText = (d) => d.every((b) => b === 10 || b === 13 || (b >= 32 && b < 127));
net.createServer((client) => {
  const proxy = net.connect(Number(port), host);
  let sent = 0, back = 0, hits = 0;
  client.on('data', (d) => {
    sent += d.length;
    hits += d.toString('latin1').split(marker).length - 1;
    console.log(isText(d)
      ? d.toString('latin1').replace(/(Proxy-Authorization: Basic ).*/, '$1[hidden]')
      : '[' + d.length + ' bytes, not text] ' + d.subarray(0, 12).toString('hex'));
    proxy.write(d);
  });
  proxy.on('data', (d) => { back += d.length; client.write(d); });
  client.on('close', () => {
    proxy.destroy();
    console.log(sent + ' bytes sent to the proxy, ' + back + ' bytes back, marker seen ' + hits + ' times');
  });
  client.on('error', () => proxy.destroy());
  proxy.on('error', () => client.destroy());
}).listen(9200, '127.0.0.1');
node relay.mjs residentialpremium.quanticdata.io:8080 MARKER-7731

curl -x http://USER:PASS@127.0.0.1:9200 -H "X-Demo: MARKER-7731" \
  -d "user=alice&password=MARKER-7731" "http://httpbin.org/post?token=MARKER-7731"

curl -x http://USER:PASS@127.0.0.1:9200 -H "X-Demo: MARKER-7731" \
  -d "user=alice&password=MARKER-7731" "https://httpbin.org/post?token=MARKER-7731"

The two curl commands differ by one letter, the "s" in the target URL. The proxy address, the username and the password are the same. Both requests were answered with status 200, and httpbin.org echoed the form back with user and password in it.

HTTP through a proxy: the whole request in clear

For the http:// URL, this is everything the relay printed, which is everything the proxy received:

POST http://httpbin.org/post?token=MARKER-7731 HTTP/1.1
Host: httpbin.org
Proxy-Authorization: Basic [hidden]
User-Agent: curl/8.21.0
Accept: */*
Proxy-Connection: Keep-Alive
X-Demo: MARKER-7731
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

user=alice&password=MARKER-7731
340 bytes sent to the proxy, 864 bytes back, marker seen 3 times

It is an ordinary HTTP request with two changes a client makes when it talks to a proxy. The first line carries the full URL (POST http://httpbin.org/post...) instead of only the path, because the proxy has to know which site to contact. And there is a Proxy-Authorization header with the proxy login, which is for the proxy and is not passed to the site. Everything else is readable as it stands: the query string, our X-Demo header, the form fields. The marker appears three times, once in each place we put it.

That is what plain HTTP means, with or without a proxy: the request is text, and every system that relays it can read it. The proxy then makes the request to the site on port 80 and sends the answer back.

HTTPS through a proxy: CONNECT, then TLS

For the https:// URL the relay printed this:

CONNECT httpbin.org:443 HTTP/1.1
Host: httpbin.org:443
Proxy-Authorization: Basic [hidden]
User-Agent: curl/8.21.0
Proxy-Connection: Keep-Alive

[458 bytes, not text] 16030101c5010001c103033e
[80 bytes, not text] 1403030001011703030045f0
[241 bytes, not text] 17030300ecb0668fd547fc65
[24 bytes, not text] 1703030013ae1a29cd668ac7
990 bytes sent to the proxy, 5193 bytes back, marker seen 0 times

The request to the proxy is no longer the POST. It is a 187-byte CONNECT, which asks one thing: open a TCP connection to httpbin.org on port 443 and pass bytes in both directions. The proxy answered HTTP/1.1 200 Connection established, and from then on it was a pipe.

The four chunks that follow, 803 bytes in all, are TLS. The first bytes of each say what kind of TLS record it is:

ChunkFirst byteTLS recordWhat it is
458 bytes16HandshakeThe ClientHello: curl proposing TLS versions and ciphers to the site
80 bytes14, then 17Change cipher spec, then application dataThe end of the handshake, already encrypted
241 bytes17Application dataThe POST request, its headers and the form, encrypted
24 bytes17Application dataThe encrypted close of the session

The POST line, the token in the URL, the X-Demo header and the password all travelled inside those application data records. The relay looked for the marker in every byte and found it 0 times. The TLS session was negotiated between curl and httpbin.org; the proxy carried it without holding its keys.

What stays visible over HTTPS

HTTPS does not hide everything from the systems in between, and it is worth being exact about what our capture shows.

Itemhttp:// capturehttps:// capture
Host nameReadableReadable: in the CONNECT line, and again inside the ClientHello (the SNI field)
Port80, implied by the URL443, in the CONNECT line
Path and query stringReadableNot readable
Request headers, cookiesReadableNot readable
Form bodyReadableNot readable
Size and timing340 bytes sent990 bytes sent, in five chunks
Client nameUser-Agent: curl/8.21.0The same header, on the CONNECT

So with HTTPS a proxy knows which site you contacted, when, and roughly how much data moved, and not which page you asked for or what you sent. When we split an earlier capture of the same command into TLS records, the only readable strings in the ClientHello were httpbin.org and http/1.1, the protocol curl offered to speak. The shape of that ClientHello is also what sites use for TLS fingerprinting: it comes from your client, not from the proxy, because the proxy passes it on untouched.

"HTTP proxy" and "HTTPS proxy": what the names mean

The names cause more confusion than the protocols. In our test the proxy address began with http:// in both commands, and it carried the HTTPS request without trouble. That scheme describes how the client talks to the proxy, not which sites the proxy can reach. An HTTP proxy handles https:// sites through CONNECT, as captured above.

  • HTTP proxy: the client speaks HTTP to the proxy. It relays http:// requests and tunnels https:// ones.
  • HTTPS proxy: used loosely for "a proxy that works with HTTPS sites", which is the same thing. Strictly, it is a proxy the client itself reaches over TLS, written https://host:port in the proxy setting.
  • http_proxy and https_proxy: environment variables that say which proxy to use for http:// URLs and for https:// URLs. They usually hold the same value; the variable name refers to the target, not to the proxy's protocol.
  • Proxy port: the proxy's own port, 8080 on the line we used, has nothing to do with 80 and 443. Those are the ports of the destination site.

For tunnelling other protocols than HTTP there is SOCKS5; the comparison is in HTTP vs SOCKS5 proxies. Whether a proxy stands on the client's side or the server's is the subject of forward proxy vs reverse proxy.

What this means when you use a proxy

  • Use https:// URLs for anything that carries a login, a token or a cookie. In our capture that one letter was the difference between a password readable in transit and 0 readable occurrences. What cookies hold is in HTTP cookies explained.
  • Leave certificate checks on. The certificate is how the client knows the TLS session ends at the real site. Our commands used no -k option and verified normally through the proxy; curl and SSL certificate checks explains what that option turns off.
  • Your headers are yours. Over HTTPS the proxy cannot add or change a request header, because it cannot read the request. What the site receives is what your client sent; see HTTP headers explained.
  • The proxy login stays at the proxy. Proxy-Authorization appears on the request to the proxy and nowhere in what httpbin.org echoed. If the login is wrong the proxy answers before any tunnel exists: 407 Proxy Authentication Required.

Running the same capture on your own line

The relay needs only Node.js, and the commands are the ones printed above with your own host, port, username and password; how to use a proxy with curl lists the other options. We ran this capture on a Residential Premium line with the country set to the United States. The plans, countries and gateways for residential proxies and mobile proxies are on their pages, and there is a Residential Basic free trial if you want to watch a CONNECT of your own go by.

Sources & further reading

FAQ

Quick answers on http vs https proxy.

Something else? Ask us

What is the difference between HTTP and HTTPS?

HTTP sends requests and responses as plain text, by default on port 80. HTTPS sends the same HTTP inside a TLS connection, by default on port 443, so the content is encrypted between the client and the site and the site proves its identity with a certificate. In our capture the HTTP request was 340 readable bytes; the HTTPS one was a CONNECT line followed by 803 encrypted bytes.

Can a proxy see HTTPS traffic?

It sees where the traffic goes, not what it says. For our https:// request the proxy received CONNECT httpbin.org:443, then TLS records. The host name and port were readable; the path, the headers and the form body were not: a marker we placed in all three was found 0 times.

Do I need an HTTPS proxy for HTTPS websites?

No. An HTTP proxy reaches HTTPS sites with the CONNECT method: it opens a tunnel to host:443 and the client runs TLS through it. In our test the proxy address began with http:// and the https:// request returned status 200.

What ports do HTTP and HTTPS use?

Port 80 for HTTP and port 443 for HTTPS, unless the URL names another. A proxy listens on its own port, 8080 on the line we tested, and that port is unrelated: the CONNECT line still said httpbin.org:443.

What is the difference between http_proxy and https_proxy?

They are environment variables read by curl and many other tools. http_proxy names the proxy for http:// URLs and https_proxy the proxy for https:// URLs. Both normally point to the same proxy address.

What is the CONNECT method?

An HTTP method that asks a proxy to open a TCP connection to a host and port and then relay bytes in both directions. Our capture shows it: a 187-byte CONNECT httpbin.org:443 HTTP/1.1 request, the answer 200 Connection established, then the TLS handshake.

Residential and mobile proxies for HTTP and HTTPS

One host, port, username and password; your HTTPS requests travel through the tunnel encrypted end to end.

Related reading