The exchange#
CONNECT example.com:443 HTTP/1.1
Host: example.com:443
Proxy-Authorization: Basic dXNlcjpwYXNz
HTTP/1.1 200 Connection established
<TLS ClientHello to example.com follows>What it implies#
- Certificates are the destination's own; nothing is re-signed. Certificate warnings through a proxy indicate interception, not normal operation.
- Targeting parameters must be in the proxy credentials, because the proxy never reads the encrypted request.
- Errors before the tunnel opens (407, 400, 502) come from the proxy; errors after it come from the destination.
CONNECT to other ports#
CONNECT can tunnel any TCP port, which is why an HTTP proxy can carry protocols other than HTTPS. Providers restrict some destinations (port 25 for mail is the classic exclusion) to prevent abuse.
How it works at ProxShift#
ProxShift gateways accept CONNECT on port 9000 and dedicated addresses on port 8000 to any TCP port except 25; the tunnel is passed through untouched and TLS is never terminated.