An Apache httpd module that adds HTTP/3 support over QUIC.
Status: experimental.
- Dependencies
- Quick Start
- CMake Options
- Project Layout
- Testing with Chrome
- httpd.conf Example
- License
By default all core dependencies (OpenSSL, httpd, APR/APR-util, nghttp3, googletest) are built from git submodules (VENDOR_SYSTEM=ON).
see CONFIGURATION.md for using system-installed packages.
git clone https://github.com/machine-moon/mod_http3.git
cd mod_http3
git submodule sync --recursive
git submodule update --init --recursive
cmake -B build
cmake --build build
cmake --build build --target testsThe first build compiles OpenSSL, APR, APR-util, and httpd from submodules (approximately 10 minutes by default). Subsequent builds reuse the cached result.
To speed up the vendored dependency builds, override the parallel job count:
cmake -B build -DDEPENDENCIES_PARALLEL=12Output:
build/lib/mod_http3.so-- Apache modulebuild/bin/mod_http3_tests-- test binary
Variables are passed with -D at configure time:
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ONCMake boolean options accept ON/OFF, YES/NO, TRUE/FALSE, or 1/0.
See the CMake documentation for the full list of accepted values.
| Option | Default | Description |
|---|---|---|
CMAKE_BUILD_TYPE |
Release |
Debug / Release / |
BUILD_MODULE |
ON |
Build mod_http3.so |
BUILD_EXAMPLES |
ON |
Build example programs |
BUILD_TESTS |
ON |
Build Google Test suite |
ENABLE_ASAN |
OFF |
Address Sanitizer (requires Debug) |
ENABLE_UBSAN |
OFF |
UB Sanitizer (requires Debug) |
ENABLE_WERROR |
OFF |
Treat warnings as errors |
VENDOR_SYSTEM |
ON |
Build deps from submodules; OFF to use system packages |
DEPENDENCIES_PARALLEL |
6 |
Parallel jobs for vendored autotools builds |
See CONFIGURATION.md for full details, path options, and examples.
mod_http3/
include/ Module headers (ossl-nghttp3.h, version.h)
src/ Module source (mod_h3.c, ossl-nghttp3.c)
examples/ Standalone example programs
tests/ Google Test suite
cmake/
modules/system/ Finders for OpenSSL, httpd, APR, APU
modules/external/ Finders for nghttp3, googletest
utils/ Compiler flags, helpers
dependencies/ Git submodules + vendored build outputs (*-dist/)
scripts/ Helper scripts
google-chrome \
--user-data-dir=/tmp/quic_dev \
--ignore-certificate-errors \
--origin-to-force-quic-on=localhost:4433 \
https://localhost:4433LoadModule http3_module modules/mod_http3.so
Listen 4433 https
EnableMMAP Off
<VirtualHost *:4433>
ServerName localhost:4433
Protocols http/1.1
ProtocolsHonorOrder on
SSLEngine on
SSLCertificateFile "/path/to/localhost.crt"
SSLCertificateKeyFile "/path/to/localhost.key"
H3CertificatePath "/path/to/localhost.crt"
H3CertificateKeyPath "/path/to/localhost.key"
Header set alt-svc "h3=\":4433\"; ma=60; persist=1"
</VirtualHost>See CONFIGURATION_HTTPD.md for directive reference and VirtualHost configuration details.