mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 11:29:57 +00:00
TUN-6637: Upgrade quic-go
This commit is contained in:
17
vendor/github.com/lucas-clemente/quic-go/interface.go
generated
vendored
17
vendor/github.com/lucas-clemente/quic-go/interface.go
generated
vendored
@@ -211,6 +211,18 @@ type EarlyConnection interface {
|
||||
NextConnection() Connection
|
||||
}
|
||||
|
||||
// A ConnectionIDGenerator is a interface that allows clients to implement their own format
|
||||
// for the Connection IDs that servers/clients use as SrcConnectionID in QUIC packets.
|
||||
type ConnectionIDGenerator interface {
|
||||
|
||||
// GenerateConnectionID generates a new ConnectionID.
|
||||
GenerateConnectionID() ([]byte, error)
|
||||
|
||||
// ConnectionIDLen tells what is the length of the ConnectionIDs generated by the implementation of
|
||||
// this interface.
|
||||
ConnectionIDLen() int
|
||||
}
|
||||
|
||||
// Config contains all configuration data needed for a QUIC server or client.
|
||||
type Config struct {
|
||||
// The QUIC versions that can be negotiated.
|
||||
@@ -223,6 +235,11 @@ type Config struct {
|
||||
// If used for a server, or dialing on a packet conn, a 4 byte connection ID will be used.
|
||||
// When dialing on a packet conn, the ConnectionIDLength value must be the same for every Dial call.
|
||||
ConnectionIDLength int
|
||||
// An optional ConnectionIDGenerator to be used for ConnectionIDs generated during the lifecycle of a QUIC connection.
|
||||
// The goal is to give some control on how connection IDs, which can be useful in some scenarios, in particular for servers.
|
||||
// By default, if not provided, random connection IDs with the length given by ConnectionIDLength is used.
|
||||
// Otherwise, if one is provided, then ConnectionIDLength is ignored.
|
||||
ConnectionIDGenerator ConnectionIDGenerator
|
||||
// HandshakeIdleTimeout is the idle timeout before completion of the handshake.
|
||||
// Specifically, if we don't receive any packet from the peer within this time, the connection attempt is aborted.
|
||||
// If this value is zero, the timeout is set to 5 seconds.
|
||||
|
Reference in New Issue
Block a user