--- title: HTTP/3 (QUIC) Support description: Experimental HTTP/3 over QUIC support in MockServer, enabled via the http3Port configuration property. HTTP/3 requests are routed through the full expectation matching pipeline. shortTitle: HTTP/3 layout: page pageOrder: 12 section: 'Mock Server' subsection: true sitemap: priority: 0.6 changefreq: 'monthly' lastmod: 2026-06-01T14:00:00+00:00 ---
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.
HTTP/3 is disabled by default (http3Port defaults to 0). Set it to a non-zero UDP port number to start the listener:
| Method | Example |
|---|---|
| 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.
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().
HTTP/3 uses the netty-incubator-codec-http3 library, 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.
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.