diff --git a/test/integration-spec.yaml b/test/integration-spec.yaml index b29f1f5aa..8a8c082c7 100644 --- a/test/integration-spec.yaml +++ b/test/integration-spec.yaml @@ -986,10 +986,8 @@ oldTlsProtocol: 0 # http/3 -# - url: "https://127.0.0.1:9001" # TODO - https://github.com/macbre/phantomas/pull/970 -- url: "https://gf.dev/http3-test" - label: "h3" - flaky: Reaches the timeout of 5000 ms +- url: "https://127.0.0.1:9001" + label: "localhost h3 version" metrics: mainDomainHttpProtocol: "h3" mainDomainTlsProtocol: "QUIC" diff --git a/test/nginx-static.conf b/test/nginx-static.conf index 7b7ba9b05..f6d37ac02 100644 --- a/test/nginx-static.conf +++ b/test/nginx-static.conf @@ -100,7 +100,7 @@ server { listen 445 ssl; http2 on; - server_name localhost; + server_name localhost; ssl_certificate /etc/nginx/localhost.crt; ssl_certificate_key /etc/nginx/localhost.key; @@ -108,9 +108,13 @@ server { # Enable all TLS versions (TLSv1.3 is required for QUIC). ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; + # 0-RTT QUIC connection resumption + ssl_early_data on; + # Add Alt-Svc header to negotiate HTTP/3. # port 9001 is what's presented to the client (see docker compose YAML file) - add_header alt-svc 'h3-27=":9001"; ma=86400, h3-28=":9001"; ma=86400, h3-29=":9001"; ma=86400'; + add_header alt-svc 'h3=":9001"; ma=2592000,h3-29=":9001"; ma=2592000,h3-T051=":9001"; ma=2592000,h3-Q050=":9001"; ma=2592000,h3-Q046=":9001"; ma=2592000,h3-Q043=":9001"; ma=2592000,quic=":9001"; ma=2592000; v="46,43"'; + add_header x-Http3 $http3; # Sent when http3 was used root /static; diff --git a/test/ssl-certificate/mkcert.sh b/test/ssl-certificate/mkcert.sh new file mode 100755 index 000000000..b1b50e909 --- /dev/null +++ b/test/ssl-certificate/mkcert.sh @@ -0,0 +1,8 @@ +#!/bin/sh +DIR=$(realpath `dirname $0`) +echo "Generating SSL certificates for localhost in ${DIR} ... "; + +set -x + +mkcert -install +mkcert -cert-file ${DIR}/localhost.crt -key-file ${DIR}/localhost.key phantomas.local localhost 127.0.0.1