Class QuicClientProfile

java.lang.Object
io.github.mahmoudimus.quic.QuicClientProfile

public final class QuicClientProfile extends Object
What a browser's QUIC connections look like, as settings for a client: its ClientHello, its transport parameters and the transport limits behind them, its connection ID lengths and the shape of its Initial packets. Apply it to the builders of a client's configuration; the connection then advertises the browser's limits and holds itself to them.

A client with an empty source connection ID (localCidLength() 0) needs a UDP socket of its own per connection, as a browser has: its datagrams are told apart by address only.

  • Method Details

    • chrome156

      public static QuicClientProfile chrome156()
      Chrome 156's, as captured over HTTP/3: BrowserProfiles.chrome156Quic(), TransportParameterProfile.chrome156() with an idle timeout of 30 s, 100 bidirectional and 103 unidirectional streams, a 15 MiB connection and 6 MiB stream window and a 1472-byte UDP payload; an 8-byte initial destination and an empty source connection ID; 1250-byte Initial datagrams shaped as InitialPacketShape.CHROME.
      Returns:
      the profile
    • firefox159

      public static QuicClientProfile firefox159()
      Firefox 159's (neqo), as captured over HTTP/3: BrowserProfiles.firefox159Quic(), TransportParameterProfile.firefox159() with an idle timeout of 30 s, 100 streams each way, a 24 MiB connection and 12 MiB stream window, a 20 ms max_ack_delay and 8 connection IDs; an 8-byte initial destination and a 3-byte source connection ID; Initial datagrams of 1252 bytes over IPv4 and 1232 over IPv6, shaped as InitialPacketShape.FIREFOX.
      Returns:
      the profile
    • name

      public String name()
      Returns the profile's name.
      Returns:
      the profile's name
    • localCidLength

      public int localCidLength()
      Returns the length of the client's own connection IDs: 0 for none.
      Returns:
      the length of the client's own connection IDs: 0 for none
    • applyTo

      public TlsConfig.Builder applyTo(TlsConfig.Builder tls, CertificateDecompressor decompressor)
      The browser's ClientHello, with the ALPS settings it answers a server's with (empty, for its protocols) and decompressor for the certificates it offers to take compressed.
    • applyTo

      The browser's transport limits, which its transport parameters advertise, for a server on IPv4.
    • applyTo

      public TransportConfig.Builder applyTo(TransportConfig.Builder transport, boolean ipv6)
      The browser's transport limits, which its transport parameters advertise.
      Parameters:
      transport - the builder
      ipv6 - whether the server is on IPv6, where a browser may send smaller datagrams
      Returns:
      the builder
    • applyTo

      public ClientConfig.Builder applyTo(ClientConfig.Builder client)
      The browser's transport parameters, connection IDs and Initial packets.
    • endpointConfig

      public EndpointConfig endpointConfig()
      Returns an endpoint configuration with the browser's connection ID length.
      Returns:
      an endpoint configuration with the browser's connection ID length
    • toString

      public String toString()
      Overrides:
      toString in class Object