Where to Find a Proxy's CONNECT Response Headers
Look at the CONNECT exchange when a proxy-specific diagnostic field is missing from the destination response object.
A diagnostic field in the proxy's CONNECT reply belongs to a different response from the website's later reply. A high-level destination response object may expose only the latter.
| Transport interface | Where CONNECT metadata appears |
|---|---|
| Python standard HTTP connection API, 3.12+ | get_proxy_response_headers() returns CONNECT response headers, or None when CONNECT was not sent. |
| libcurl header collection | CONNECT headers can be included. CURLOPT_SUPPRESS_CONNECT_HEADERS controls their delivery through the relevant header output paths. |
For Guzzle’s cURL handler, capture each response block with on_headers rather than looking only at the returned response. Use the supported interface of the client actually making the request. A library built above Python does not necessarily expose the connection method on its response, and a separate connection instance cannot reveal this exchange. Suppressing libcurl's CONNECT headers may simplify a parser while hiding the evidence the diagnosis needs.
If the field is still absent, check the operator's documented product, method and outcome conditions. A plaintext forwarded request and an opaque HTTPS tunnel can expose metadata differently; a vendor field is not a required part of every response.
Keep the field's definition with its value. A returned IP might describe the listener, local binding, chosen exit or destination. Its shape alone does not identify the website-facing source.