Skip to content

Add per-connection client Initial DCID override #3127

Description

@mihed

s2n-quic currently generates the client Initial Destination Connection ID internally in create_client_connection, and Connect has no API to override it. This blocks deployments that need client-chosen Initial DCID bits for QUIC SO_REUSEPORT steering before the server has connection state.

Request:
Add a public API like:

Connect::with_initial_destination_connection_id(InitialId)

Requirements:

  • Validate QUIC Initial DCID length: 8..=20 bytes.
  • Use the supplied ID for Initial packet keys, original_destination_connection_id, and initial peer connection ID.
  • Keep default behavior unchanged when unset.
  • Document that callers are responsible for RFC9000 unpredictability.

Use case:
With, for example, a custom 1byte prefix, you can steer to specific CPUs in the target via eBPF/BPF. This enables topology aware proxying.

How to apply after it lands:

let connect = Connect::new(runtime_addr)
    .with_server_name(runtime_name)
    .with_initial_destination_connection_id(dcid);

let connection = client.connect(connect).await?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions