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.
Network Support
Section titled “Network Support”Network Support
Section titled “Network Support”- TCP: Supported (Stream-based).
- UDP: Supported (Datagram-based).
Client Configuration (Outbound)
Section titled “Client Configuration (Outbound)”When using QUIC as an outbound transport, the following fields are available:
Configuration Fields
Section titled “Configuration Fields”host(string): The hostname for the QUIC connection.tls: A nested TLS configuration block.enable(bool): (Required) Set totrue.servernames(string array): SNI for the QUIC server.
Server Configuration (Inbound)
Section titled “Server Configuration (Inbound)”yuhaiin can also operate as a QUIC server.
Configuration Fields
Section titled “Configuration Fields”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).
Example Configuration
Section titled “Example Configuration”Outbound Example
Section titled “Outbound Example”{ "quic": { "host": "quic.server.com", "tls": { "enable": true, "servernames": ["quic.server.com"] } }}Developer Details
Section titled “Developer Details”Advantages
Section titled “Advantages”- 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.
Implementation
Section titled “Implementation”yuhaiin uses the quic-go library for its QUIC implementation, found in pkg/net/proxy/quic.