$ hg clone https://hg.nginx.org/nginx-quic
$ cd nginx-quic
- $ ./auto/configure --with-debug --with-cc-opt="-I../boringssl/include" \
- --with-ld-opt="-L../boringssl/build/ssl \
- -L../boringssl/build/crypto"
+ $ ./auto/configure --with-debug --with-http_v3_module \
+ --with-cc-opt="-I../boringssl/include" \
+ --with-ld-opt="-L../boringssl/build/ssl \
+ -L../boringssl/build/crypto"
$ make
3. Configuration
fi
-ngx_feature="OpenSSL QUIC support"
-ngx_feature_name="NGX_OPENSSL_QUIC"
-ngx_feature_run=no
-ngx_feature_incs="#include <openssl/ssl.h>"
-ngx_feature_path=
-ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL"
-ngx_feature_test="SSL_CTX_set_quic_method(NULL, NULL)"
-. auto/feature
+
+if [ $USE_OPENSSL_QUIC = YES ]; then
+
+ ngx_feature="OpenSSL QUIC support"
+ ngx_feature_name="NGX_OPENSSL_QUIC"
+ ngx_feature_run=no
+ ngx_feature_incs="#include <openssl/ssl.h>"
+ ngx_feature_path=
+ ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL"
+ ngx_feature_test="SSL_CTX_set_quic_method(NULL, NULL)"
+ . auto/feature
+
+ if [ $ngx_found = no ]; then
+
+cat << END
+
+$0: error: certain modules require OpenSSL QUIC support.
+You can either do not enable the modules, or install the OpenSSL library
+into the system, or build the OpenSSL library statically from the source
+with nginx by using --with-openssl=<path> option.
+
+END
+ exit 1
+ fi
+
+fi
ngx_module_type=HTTP
if [ $HTTP_V3 = YES ]; then
+ USE_OPENSSL=YES
+ USE_OPENSSL_QUIC=YES
have=NGX_HTTP_V3 . auto/have
have=NGX_HTTP_HEADERS . auto/have
+ HTTP_SSL=YES
+
# XXX for Huffman
HTTP_V2=YES
ngx_module_type=CORE
ngx_module_name=ngx_openssl_module
ngx_module_incs=
- ngx_module_deps="src/event/ngx_event_openssl.h \
- src/event/ngx_event_quic.h \
- src/event/ngx_event_quic_transport.h \
- src/event/ngx_event_quic_protection.h"
- ngx_module_srcs="src/event/ngx_event_openssl.c \
- src/event/ngx_event_openssl_stapling.c \
- src/event/ngx_event_quic.c \
- src/event/ngx_event_quic_transport.c \
- src/event/ngx_event_quic_protection.c"
+ ngx_module_deps=src/event/ngx_event_openssl.h
+ ngx_module_srcs="src/event/ngx_event_openssl.c
+ src/event/ngx_event_openssl_stapling.c"
ngx_module_libs=
ngx_module_link=YES
ngx_module_order=
+ if [ $USE_OPENSSL_QUIC = YES ]; then
+ ngx_module_deps="$ngx_module_deps \
+ src/event/ngx_event_quic.h \
+ src/event/ngx_event_quic_transport.h \
+ src/event/ngx_event_quic_protection.h"
+ ngx_module_srcs="$ngx_module_srcs \
+ src/event/ngx_event_quic.c \
+ src/event/ngx_event_quic_transport.c \
+ src/event/ngx_event_quic_protection.c"
+ fi
+
. auto/module
fi
HTTP_GZIP=YES
HTTP_SSL=NO
HTTP_V2=NO
-HTTP_V3=YES
+HTTP_V3=NO
HTTP_SSI=YES
HTTP_REALIP=NO
HTTP_XSLT=NO
PCRE_JIT=NO
USE_OPENSSL=NO
+USE_OPENSSL_QUIC=NO
OPENSSL=NONE
USE_ZLIB=NO
--with-http_ssl_module) HTTP_SSL=YES ;;
--with-http_v2_module) HTTP_V2=YES ;;
+ --with-http_v3_module) HTTP_V3=YES ;;
--with-http_realip_module) HTTP_REALIP=YES ;;
--with-http_addition_module) HTTP_ADDITION=YES ;;
--with-http_xslt_module) HTTP_XSLT=YES ;;
--with-http_ssl_module enable ngx_http_ssl_module
--with-http_v2_module enable ngx_http_v2_module
+ --with-http_v3_module enable ngx_http_v3_module
--with-http_realip_module enable ngx_http_realip_module
--with-http_addition_module enable ngx_http_addition_module
--with-http_xslt_module enable ngx_http_xslt_module
#include <ngx_resolver.h>
#if (NGX_OPENSSL)
#include <ngx_event_openssl.h>
+#if (NGX_OPENSSL_QUIC)
#include <ngx_event_quic.h>
#include <ngx_event_quic_transport.h>
#include <ngx_event_quic_protection.h>
#endif
+#endif
#include <ngx_process_cycle.h>
#include <ngx_conf_file.h>
#include <ngx_module.h>