From 875cb13970035a7ad3c24f93835cca01d0ae231a Mon Sep 17 00:00:00 2001 From: Muhammad Hussein Fattahizadeh Date: Sat, 4 May 2024 12:30:09 +0200 Subject: [PATCH] test http3 and tls 1.3 --- Dockerfile | 3 ++- conf.d/http/default_server.conf | 4 ++++ nginx/.defaults/ssl/profile.runtime.conf | 4 +--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3fc7e56..1cd9e0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ ENV ASM_NGX_EXTRA_ACCESS_LOG_COMMENT="" \ ASM_NGX_EXTRA_PROXY_CACHE_SLOW_SIZE="4096m" \ ASM_NGX_EXTRA_PROXY_CACHE_FAST_COMMENT="" \ ASM_NGX_EXTRA_PROXY_CACHE_SLOW_COMMENT="" \ - ASM_NGX_EXTRA_SSL_PROFILE="intermediate" \ + ASM_NGX_EXTRA_SSL_PROFILE="modern" \ ASM_NGX_EXTRA_MONITORING_PORT="8127" \ ASM_NGX_EXTRA_CLIENT_BODY_BUFFER_SIZE="256k" \ ASM_NGX_EXTRA_CLIENT_HEADER_BUFFER_SIZE="2k" \ @@ -33,6 +33,7 @@ COPY entrypoint.sh /entrypoint.sh RUN apk add --no-cache \ ca-certificates \ gettext \ + tzdata \ nginx \ nginx-mod-devel-kit \ nginx-mod-http-brotli \ diff --git a/conf.d/http/default_server.conf b/conf.d/http/default_server.conf index 651c619..40cbceb 100644 --- a/conf.d/http/default_server.conf +++ b/conf.d/http/default_server.conf @@ -10,6 +10,7 @@ server { server { listen 80 default_server; listen 443 default_server ssl http2; + listen 443 default_server quic reuseport; server_name _; @@ -25,6 +26,9 @@ server { ssl_certificate_key /.defaults/cert/privkey.pem; ssl_trusted_certificate /.defaults/cert/chain.pem; + # add Alt-Svc header to negotiate HTTP/3. + add_header alt-svc 'h3=":443"; ma=86400'; + location = /robots.txt { return 200 "User-agent: *\nDisallow: /"; } diff --git a/nginx/.defaults/ssl/profile.runtime.conf b/nginx/.defaults/ssl/profile.runtime.conf index 898ed3e..30d2fe3 100644 --- a/nginx/.defaults/ssl/profile.runtime.conf +++ b/nginx/.defaults/ssl/profile.runtime.conf @@ -1,4 +1,2 @@ -ssl_protocols TLSv1.2 TLSv1.3; -ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; +ssl_protocols TLSv1.3; ssl_prefer_server_ciphers off; -ssl_dhparam /.defaults/cert/dhparam.pem;