Skip to content

QUIC

[!NOTE] This document is partially generated by AI.

QUIC is a modern UDP-based transport layer protocol. It provides low-latency connection establishment (0-RTT) and built-in encryption via TLS 1.3.

  • TCP: Supported (Stream-based).
  • UDP: Supported (Datagram-based).

When using QUIC as an outbound transport, the following fields are available:

  • host (string): The hostname for the QUIC connection.
  • tls: A nested TLS configuration block.
    • enable (bool): (Required) Set to true.
    • servernames (string array): SNI for the QUIC server.

yuhaiin can also operate as a QUIC server.

  • host (string): The address the QUIC server binds to (e.g., 0.0.0.0:443).
  • tls: The server’s TLS configuration (certificates and keys).
{
"quic": {
"host": "quic.server.com",
"tls": {
"enable": true,
"servernames": ["quic.server.com"]
}
}
}
  • Fast Establishment: Reduces round-trips required for handsaking.
  • Connection Migration: Allows clients to maintain their connection when changing networks (e.g., from Wi-Fi to mobile data).
  • No Head-of-Line Blocking: Streams are independent at the transport layer.

yuhaiin uses the quic-go library for its QUIC implementation, found in pkg/net/proxy/quic.