Documentation
¶
Overview ¶
Package http3 implements HTTP/3 protocol support for the tunnel library.
This package provides HTTP/3 protocol forwarding using QUIC as the underlying transport. HTTP/3 offers improved performance over HTTP/2 with reduced head-of-line blocking.
Example ¶
cfg := &tls.Config{
Certificates: []tls.Certificate{cert},
NextProtos: []string{"h3"},
}
p := http3.New(cfg, nil)
listener, _ := p.Listen(":8443")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
DefaultConfig returns the default QUIC configuration for HTTP/3.
func IsHTTP3ClosedErr ¶
IsHTTP3ClosedErr returns true if the error indicates a normal HTTP/3 connection close.
Types ¶
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
Protocol implements HTTP/3 protocol forwarding.
func New ¶
New creates a new HTTP/3 protocol handler. The tlsConfig must have NextProtos set to []string{"h3"}.
Click to show internal directories.
Click to hide internal directories.