Package io.github.mahmoudimus.quic
Class QuicClientProfile
java.lang.Object
io.github.mahmoudimus.quic.QuicClientProfile
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 Summary
Modifier and TypeMethodDescriptionapplyTo(ClientConfig.Builder client) The browser's transport parameters, connection IDs and Initial packets.applyTo(TransportConfig.Builder transport) The browser's transport limits, which its transport parameters advertise, for a server on IPv4.applyTo(TransportConfig.Builder transport, boolean ipv6) The browser's transport limits, which its transport parameters advertise.applyTo(TlsConfig.Builder tls, CertificateDecompressor decompressor) The browser's ClientHello, with the ALPS settings it answers a server's with (empty, for its protocols) anddecompressorfor the certificates it offers to take compressed.static QuicClientProfileChrome 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 asInitialPacketShape.CHROME.Returns an endpoint configuration with the browser's connection ID length.static QuicClientProfileFirefox 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 msmax_ack_delayand 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 asInitialPacketShape.FIREFOX.intReturns the length of the client's own connection IDs: 0 for none.name()Returns the profile's name.toString()
-
Method Details
-
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 asInitialPacketShape.CHROME.- Returns:
- the profile
-
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 msmax_ack_delayand 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 asInitialPacketShape.FIREFOX.- Returns:
- the profile
-
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
The browser's ClientHello, with the ALPS settings it answers a server's with (empty, for its protocols) anddecompressorfor the certificates it offers to take compressed. -
applyTo
The browser's transport limits, which its transport parameters advertise, for a server on IPv4. -
applyTo
The browser's transport limits, which its transport parameters advertise.- Parameters:
transport- the builderipv6- whether the server is on IPv6, where a browser may send smaller datagrams- Returns:
- the builder
-
applyTo
The browser's transport parameters, connection IDs and Initial packets. -
endpointConfig
Returns an endpoint configuration with the browser's connection ID length.- Returns:
- an endpoint configuration with the browser's connection ID length
-
toString
-