Bun

interface

quic.EndpointOptions

interface EndpointOptions

The endpoint configuration options passed when constructing a new QuicEndpoint instance.

  • address?: string | SocketAddress

    If not specified the endpoint will bind to IPv4 localhost on a random port.

  • addressLRUSize?: number | bigint

    The endpoint maintains an internal cache of validated socket addresses as a performance optimization. This option sets the maximum number of addresses that are cache. This is an advanced option that users typically won't have need to specify.

  • ipv6Only?: boolean

    When true, indicates that the endpoint should bind only to IPv6 addresses.

  • maxConnectionsPerHost?: number | bigint

    Specifies the maximum number of concurrent sessions allowed per remote peer address.

  • maxConnectionsTotal?: number | bigint

    Specifies the maximum total number of concurrent sessions.

  • maxRetries?: number | bigint

    Specifies the maximum number of QUIC retry attempts allowed per remote peer address.

  • maxStatelessResetsPerHost?: number | bigint

    Specifies the maximum number of stateless resets that are allowed per remote peer address.

  • resetTokenSecret?: ArrayBufferView<ArrayBufferLike>

    Specifies the 16-byte secret used to generate QUIC retry tokens.

  • retryTokenExpiration?: number | bigint

    Specifies the length of time a QUIC retry token is considered valid.

  • tokenExpiration?: number | bigint

    Specifies the length of time a QUIC token is considered valid.

  • tokenSecret?: ArrayBufferView<ArrayBufferLike>

    Specifies the 16-byte secret used to generate QUIC tokens.

  • udpTTL?: number
  • validateAddress?: boolean

    When true, requires that the endpoint validate peer addresses using retry packets while establishing a new connection.