--- title: HTTP/3 (QUIC) Support description: Experimental HTTP/3 over QUIC support in MockServer, enabled via the http3Port property and routed through the full expectation matching pipeline. shortTitle: HTTP/3 layout: page pageOrder: 3 section: 'Protocols & Advanced' subsection: true sitemap: priority: 0.6 changefreq: 'monthly' lastmod: 2026-06-01T14:00:00+00:00 ---
EXPERIMENTAL — HTTP/3 support is fully integrated with MockServer's request pipeline and now builds on the mainline io.netty:netty-codec-http3 codec (Netty 4.2), which graduated from the Netty incubator. It is still labelled experimental because the HTTP/3 codec API may continue to evolve in future Netty releases. HTTP/3 is off by default and must be explicitly enabled.

MockServer can optionally accept HTTP/3 requests over QUIC (UDP). HTTP/3 is the third major version of the HTTP protocol, using QUIC as the transport instead of TCP. This is useful when you want to test clients that connect using HTTP/3.

HTTP/3 requests are routed through the same expectation matching pipeline as HTTP/1.1 and HTTP/2 requests. This means all features work the same way: expectation matching, response actions, template actions, recording for verification, and proxy forwarding.

 

Enabling HTTP/3

HTTP/3 is disabled by default (http3Port defaults to 0). Set it to a non-zero UDP port number to start the listener:

MethodExample
Java system property -Dmockserver.http3Port=8443
Environment variable MOCKSERVER_HTTP3_PORT=8443
Configuration API Configuration.configuration().http3Port(8443)

When http3Port is 0 (the default), the HTTP/3 listener is not started and has no impact on the existing TCP/HTTP server.

 

Lifecycle

When http3Port is configured, the HTTP/3 server starts automatically with MockServer and stops when MockServer shuts down. No separate lifecycle management is needed.

If the native QUIC transport is not available on the platform (see native platform requirement), MockServer logs a warning and continues without HTTP/3. The existing TCP/HTTP server is never affected.

The bound HTTP/3 port can be retrieved programmatically via MockServer.getHttp3Port().

 

Native platform requirement

HTTP/3 uses the mainline io.netty:netty-codec-http3 library (Netty 4.2), which requires a native BoringSSL library for the QUIC transport. The native library is included automatically for the following platforms:

If the native library cannot be loaded on the current platform, the HTTP/3 server will not start (a warning is logged). The existing TCP/HTTP server is not affected.

 

TLS

The HTTP/3 server uses MockServer's configured TLS certificate material — the same private key and certificate chain used by the HTTPS server. This means the TLS configuration properties (privateKeyPath, x509CertificatePath, etc.) apply to HTTP/3 as well.

If no custom certificate is configured, MockServer's auto-generated certificate (created via BouncyCastle) is used, which is suitable for testing.

 

Tuning / configuration

The QUIC transport parameters can be tuned for high-throughput or long-lived connection tests. Each has a sensible default and rarely needs changing:

See the HTTP/3 configuration properties on the configuration page for defaults, value ranges, and the full four-form reference (Java code, system property, environment variable, property file).

 

What works

 

Limitations

 

HTTP/3 parity and known differences

All expectation matching, actions, recording, verification, HTTP chaos profiles, forward-proxy, trace-context propagation, mTLS, MCP (Model Context Protocol Streamable HTTP, including control-plane authentication), and gRPC (unary, server-streaming, and bidirectional streaming) work over HTTP/3, matching the TCP (HTTP/1.1 and HTTP/2) path.

Inherently not applicable over HTTP/3

Not yet supported (deferred)

Previously deferred, now supported: MCP-over-HTTP/3 (shared Streamable-HTTP processor with full control-plane authentication) and gRPC-over-HTTP/3 (unary, server-streaming, and bidirectional streaming) both work over HTTP/3.