package
0.0.0-20241202070857-e8bc3c4afa6d
Repository: https://github.com/project-faster/mp-quic-go.git
Documentation: pkg.go.dev
# Functions
ChooseSupportedVersion finds the best version in the overlap of ours and theirs ours is a slice of versions that we support, sorted by our preference (descending) theirs is a slice of versions offered by the peer.
GetPacketNumberLength gets the minimum length needed to fully represent the packet number.
GetPacketNumberLengthForPublicHeader gets the length of the packet number for the public header it never chooses a PacketNumberLen of 1 byte, since this is too short under certain circumstances.
InferPacketNumber calculates the packet number based on the received packet number, its length and the last seen packet number.
IsSupportedVersion returns true if the server supports this version.
VersionNumberToTag maps version numbers ('32') to tags ('Q032').
VersionTagToNumber is built from VersionNumberToTag in init().
# Constants
AckSendDelay is the maximum delay that can be applied to an ACK for a retransmittable packet This is the value Chromium is using.
ClientHelloMinimumSize is the minimum size the server expects an inchoate CHLO to have.
ClosedSessionDeleteTimeout the server ignores packets arriving on a connection that is already closed after this time all information about the old connection will be deleted.
ConnectionFlowControlMultiplier determines how much larger the connection flow control windows needs to be relative to any stream's flow control window This is the value that Chromium is using.
CookieExpiryTime is the valid time of a cookie.
CryptoMaxParams is the upper limit for the number of parameters in a crypto message.
CryptoParameterMaxLength is the upper limit for the length of a parameter in a crypto message.
DefaultHandshakeTimeout is the default timeout for a connection until the crypto handshake succeeds.
DefaultIdleTimeout is the default idle timeout.
DefaultMaxCongestionWindow is the default for the max congestion window XXX (QDC): with large bandwidth networks, this can be a limiting factor Seems reasonable, around 3.5MB in flight.
24 MB.
1.5 MB.
16 MB.
1 MB.
DefaultTCPMSS is the default maximum packet size used in the Linux TCP implementation.
EncryptionForwardSecure is forward secure.
EncryptionSecure is encrypted, but not forward secure.
EncryptionUnencrypted is not encrypted.
EncryptionUnspecified is a not specified encryption level.
EphermalKeyLifetime is the lifetime of the ephermal key during the handshake, see handshake.getEphermalKEX.
InitialCongestionWindow is the initial congestion window in QUIC packets.
16 kB.
Initial PathID.
16 kB.
MaxByteCount is the maximum value of a ByteCount.
MaxClientHellos is the maximum number of times we'll send a client hello The value 3 accounts for: * one failure due to an incorrect or missing source-address token * one failure due the server's certificate chain being unavailible and the server being unwilling to send it without a valid source-address token.
MaxIncomingDynamicStreamsPerConnection is the maximum value accepted for the incoming number of dynamic streams per connection.
MaxNewStreamIDDelta is the maximum difference between and a newly opened Stream and the highest StreamID that a client has ever opened note that the number of streams is half this value, since the client can only open streams with open StreamID.
MaxNonRetransmittablePackets is the maximum number of non-retransmittable packets that we send in a row.
MaxPacketSize is the maximum packet size, including the public header, that we use for sending packets This is the value used by Chromium for a QUIC packet sent using IPv6 (for IPv4 it would be 1370).
MaxPacketsReceivedBeforeAckSend is the number of packets that can be received before an ACK frame is sent.
MaxReceivePacketSize maximum packet size of any QUIC packet, based on ethernet's max size, minus the IP and UDP headers.
MaxSessionUnprocessedPackets is the max number of packets stored in each session that are not yet processed.
MaxStreamFrameSorterGaps is the maximum number of gaps between received StreamFrames prevents DoS attacks against the streamFrameSorter XXX (QDC): needs to be compliant with the maximal congestion window.
MaxStreamsMinimumIncrement is the slack the client is allowed for the maximum number of streams per connection, needed e.g.
MaxStreamsMultiplier is the slack the client is allowed for the maximum number of streams per connection, needed e.g.
MaxStreamsPerConnection is the maximum value accepted for the number of streams per connection.
MaxTrackedReceivedAckRanges is the maximum number of ACK ranges tracked.
MaxTrackedSentPackets is maximum number of sent packets saved for either later retransmission or entropy calculation.
MaxTrackedSkippedPackets is the maximum number of skipped packet numbers the SentPacketHandler keep track of for Optimistic ACK attack mitigation.
MaxUndecryptablePackets limits the number of undecryptable packets that a session queues for later until it sends a public reset.
NonForwardSecurePacketSizeReduction is the number of bytes a non forward-secure packet has to be smaller than a forward-secure packet This makes sure that those packets can always be retransmitted without splitting the contained StreamFrames.
NumCachedCertificates is the number of cached compressed certificate chains, each taking ~1K space.
PacketNumberLen1 is a packet number length of 1 byte.
PacketNumberLen2 is a packet number length of 2 bytes.
PacketNumberLen4 is a packet number length of 4 bytes.
PacketNumberLen6 is a packet number length of 6 bytes.
PacketNumberLenInvalid is the default value and not a valid length for a packet number.
the perspectives.
the perspectives.
PublicResetTimeout is the time to wait before sending a Public Reset when receiving too many undecryptable packets during the handshake This timeout allows the Go scheduler to switch to the Go rountine that reads the crypto stream and to escalate the crypto.
48 kB.
32 kB.
RetransmittablePacketsBeforeAck is the number of retransmittable that an ACK is sent for.
SkipPacketAveragePeriodLength is the average period length in which one packet number is skipped to prevent an Optimistic ACK attack.
The version numbers, making grepping easier.
The version numbers, making grepping easier.
The version numbers, making grepping easier.
The version numbers, making grepping easier.
The version numbers, making grepping easier.
The version numbers, making grepping easier.
The version numbers, making grepping easier.
for when the version doesn't matter.
# Variables
SupportedVersions lists the versions that the server supports must be in sorted descending order.
# Type aliases
A ByteCount in QUIC.
A ConnectionID in QUIC.
EncryptionLevel is the encryption level Default value is Unencrypted.
A PacketNumber in QUIC.
PacketNumberLen is the length of the packet number in bytes.
A PathID in QUIC.
Perspective determines if we're acting as a server or a client.
A StreamID in QUIC.
VersionNumber is a version number as int.