package http3

import "golang.org/x/net/internal/http3"

Package http3 implements the HTTP/3 protocol.

This package is a work in progress. It is not ready for production usage. Its API is subject to change without notice.

Index

Functions

func RegisterServer

func RegisterServer(s *http.Server, opts ServerOpts)

RegisterServer adds HTTP/3 support to a net/http Server.

RegisterServer must be called before s begins serving, and only affects s.ListenAndServeTLS.

func RegisterTransport

func RegisterTransport(tr *http.Transport)

RegisterTransport configures a net/http HTTP/1 Transport to use HTTP/3.

TODO: most likely, add another arg for transport configuration.

Types

type ServerOpts

type ServerOpts struct {
	// ListenQUIC determines how the server will open a QUIC endpoint.
	// By default, quic.Listen("udp", addr, config) is used.
	ListenQUIC func(addr string, config *quic.Config) (*quic.Endpoint, error)

	// QUICConfig is the QUIC configuration used by the server.
	// QUICConfig may be nil and should not be modified after calling
	// RegisterServer.
	// If QUICConfig.TLSConfig is nil, the TLSConfig of the net/http Server
	// given to RegisterServer will be used.
	QUICConfig *quic.Config
}

Source Files

body.go conn.go doc.go errors.go http3.go qpack.go qpack_decode.go qpack_encode.go qpack_static.go quic.go roundtrip.go server.go settings.go stream.go transport.go varint.go

Version
v0.52.0
Published
Mar 12, 2026
Platform
linux/amd64
Imports
21 packages
Last checked
48 minutes ago

Tools for package owners.