mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-03-31 10:47:35 +03:00
Add variable length QUIC frame padding support. Refactor how QUIC frames are defined in a QUIC Spec. Update documentation and examples. Added Chrome and Firefox parrots. Close #3.
27 lines
890 B
Go
27 lines
890 B
Go
package quic
|
|
|
|
import tls "github.com/refraction-networking/utls"
|
|
|
|
const (
|
|
DefaultUDPDatagramMinSize = 1200
|
|
)
|
|
|
|
type QUICSpec struct {
|
|
// InitialPacketSpec specifies the QUIC Initial Packet, which includes Initial
|
|
// Packet Headers and Frames.
|
|
InitialPacketSpec InitialPacketSpec
|
|
|
|
// ClientHelloSpec specifies the TLS ClientHello to be sent in the first Initial
|
|
// Packet. It is implemented by the uTLS library and a valid ClientHelloSpec
|
|
// for QUIC MUST include (utls).QUICTransportParametersExtension.
|
|
ClientHelloSpec *tls.ClientHelloSpec
|
|
|
|
// UDPDatagramMinSize specifies the minimum size of the UDP Datagram (UDP payload).
|
|
// If the UDP Datagram is smaller than this size, zeros will be padded to the end
|
|
// of the UDP Datagram until this size is reached.
|
|
UDPDatagramMinSize int
|
|
}
|
|
|
|
func (s *QUICSpec) UpdateConfig(config *Config) {
|
|
s.InitialPacketSpec.UpdateConfig(config)
|
|
}
|