Skip to main content

target_ech_config

Function target_ech_config 

pub fn target_ech_config(
    extensions: &Extensions,
    target: &HostWithPort,
    backend_supports_ech: bool,
) -> Result<Option<Bytes>, Box<dyn Error + Send + Sync>>
Available on crate feature tls only.
Expand description

Resolve ECH for the actual TLS hop from effective caller/connector settings.

The caller supplies the hop endpoint, not a potentially stale proxy routing override. The result contains only a matching configuration. This helper does no DNS and can be used by unsupported backends to enforce required ECH too. Native backends still validate supported configuration contents and require acceptance after the handshake.