Test HTTP3/QUIC docker

events {
worker_connections 1024;
}
http {
server {
# Enable QUIC and HTTP/3.
listen 443 quic reuseport;
# Enable HTTP/2 (optional).
listen 443 ssl http2;
ssl_certificate cert.crt;
ssl_certificate_key cert.key;
# Enable all TLS versions (TLSv1.3 is required for QUIC).
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
# Add Alt-Svc header to negotiate HTTP/3.
add_header alt-svc 'h3-23=":443"; ma=86400';
}
}
docker run --name test-quic -p 8180:80 -p 8143:443 --rm \
-v /var/www/html/:/usr/share/nginx/html:ro \
-v /etc/nginx/docker-nginx-conf/nginx.conf:/etc/nginx/nginx.conf \
-v /etc/nginx/docker-nginx-conf/certs/cert.crt:/etc/nginx/cert.crt \
-v /etc/nginx/docker-nginx-conf/certs/cert.key:/etc/nginx/cert.key \
ranadeeppolavarapu/nginx-http3:latest
  • MacOS open Chrome with flag enabled

open -a /Applications/Google\ Chrome\ Canary.app --args \
--flag-switches-begin \
--enable-quic \
--quic-version=h3-23 \
--enable-features=EnableTLS13EarlyData \
--flag-switches-end

docker-nginx-http3