How HTTPS Proxies Work
HTTPS proxies solve a fundamental challenge: how to route encrypted web traffic through an intermediary server without breaking the encryption. The solution is the HTTP CONNECT method, which transforms the proxy from an HTTP-aware intermediary into a transparent TCP tunnel.
The CONNECT Method in Detail
When a client wants to access an HTTPS site through a proxy, the following sequence occurs:
- **TCP connection to proxy**: The client connects to the proxy server — with Hex Proxies, this is `gate.hexproxies.com` on the configured port.
- **CONNECT request**: The client sends a special HTTP request: `CONNECT target.com:443 HTTP/1.1`. This tells the proxy which server to connect to. Proxy authentication headers are included in this request.
- **Proxy connects to target**: The proxy opens a TCP connection to the target server on port 443.
- **Tunnel confirmation**: The proxy responds with `HTTP/1.1 200 Connection Established`, signaling that the tunnel is ready.
- **TLS handshake**: The client now performs a TLS handshake directly with the target server through the tunnel. The proxy relays bytes but cannot decrypt them.
- **Encrypted communication**: All subsequent data flows encrypted through the tunnel. The proxy is merely a relay.
Security Guarantees
The HTTPS proxy model preserves full TLS security. The client verifies the target server's certificate directly — the proxy never presents its own certificate (unlike SSL-intercepting proxies). This means:
- Certificate pinning still works correctly
- HSTS (HTTP Strict Transport Security) is enforced normally
- The proxy operator cannot perform man-in-the-middle attacks
- Perfect forward secrecy (PFS) protections remain intact
SNI and Domain Visibility
One important detail: during the TLS handshake, the Server Name Indication (SNI) extension sends the target hostname in cleartext. This means the proxy (and any network observer) can see which domain the client is connecting to, but not the specific URL path, parameters, or content. Modern standards like Encrypted Client Hello (ECH) aim to address this, though adoption is still limited.
Performance Impact
HTTPS proxying adds overhead compared to HTTP proxying due to the TLS handshake. The typical additional latency breakdown:
- TCP handshake to proxy: ~10-30ms
- CONNECT request/response: ~5-15ms
- TLS handshake through tunnel: ~30-80ms (depending on TLS version and cipher)
With Hex Proxies' infrastructure, total added latency for HTTPS proxy connections is typically under 100ms. TLS 1.3 further reduces this with its single-roundtrip handshake.
Proxy Authentication for HTTPS
Authentication for HTTPS proxying happens in the CONNECT request, before the tunnel is established. The `Proxy-Authorization` header is sent in the cleartext CONNECT request. This means proxy credentials are visible on the connection between the client and proxy — so it is recommended to also encrypt the connection to the proxy itself when possible. Hex Proxies supports this configuration.
HTTP/2 and Modern Protocols
Modern clients can negotiate HTTP/2 with the target server through an HTTPS proxy tunnel. Since the proxy only sees encrypted bytes, it is transparent to the protocol version negotiated inside the tunnel. This means you get full HTTP/2 performance (multiplexing, header compression, server push) even when routing through a proxy.
Integration with Hex Proxies
Hex Proxies supports HTTPS tunneling on all proxy types. The gateway `gate.hexproxies.com` handles CONNECT requests seamlessly. When your client accesses an HTTPS URL through our proxy, the CONNECT tunnel is established automatically — no special configuration beyond standard proxy settings is required.
All Hex Proxies plans include unlimited HTTPS tunneling bandwidth. The proxy infrastructure is optimized for low-latency TLS tunnel establishment, with connection pooling and keep-alive support to amortize handshake costs across multiple requests.
Best Practices
Always use HTTPS proxying when accessing sites that handle sensitive data. Configure your HTTP client to verify TLS certificates even when using a proxy — this is the default behavior in most libraries. Hex Proxies never intercepts or inspects HTTPS traffic, ensuring your data remains private end-to-end.