Skip to content

Commit

Permalink
update nginx to v1.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pangpang@hi-nginx.com committed May 25, 2023
1 parent d849d42 commit fadd52f
Show file tree
Hide file tree
Showing 83 changed files with 23,618 additions and 63 deletions.
4 changes: 2 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Changes with nginx 1.24.0 11 Apr 2023
Changes with nginx 1.25.0 23 May 2023

*) 1.24.x stable branch.
*) Feature: experimental HTTP/3 support.


Changes with nginx 1.23.4 28 Mar 2023
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.ru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Изменения в nginx 1.24.0 11.04.2023
Изменения в nginx 1.25.0 23.05.2023

*) Стабильная ветка 1.24.x.
*) Добавление: экспериментальная поддержка HTTP/3.


Изменения в nginx 1.23.4 28.03.2023
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2002-2021 Igor Sysoev
* Copyright (C) 2011-2022 Nginx, Inc.
* Copyright (C) 2011-2023 Nginx, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
43 changes: 37 additions & 6 deletions auto/lib/openssl/conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@

if [ $OPENSSL != NONE ]; then

have=NGX_OPENSSL . auto/have
have=NGX_SSL . auto/have

if [ $USE_OPENSSL_QUIC = YES ]; then
have=NGX_QUIC . auto/have
have=NGX_QUIC_OPENSSL_COMPAT . auto/have
fi

case "$CC" in

cl | bcc32)
have=NGX_OPENSSL . auto/have
have=NGX_SSL . auto/have

CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"

CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
Expand All @@ -33,9 +38,6 @@ if [ $OPENSSL != NONE ]; then
;;

*)
have=NGX_OPENSSL . auto/have
have=NGX_SSL . auto/have

CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
Expand Down Expand Up @@ -123,6 +125,35 @@ else
CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
OPENSSL=YES

if [ $USE_OPENSSL_QUIC = YES ]; then

ngx_feature="OpenSSL QUIC support"
ngx_feature_name="NGX_QUIC"
ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
. auto/feature

if [ $ngx_found = no ]; then
have=NGX_QUIC_OPENSSL_COMPAT . auto/have

ngx_feature="OpenSSL QUIC compatibility"
ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
NULL, NULL, NULL, NULL, NULL)"
. auto/feature
fi

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 with
QUIC support into the system, or build the OpenSSL library with QUIC support
statically from the source with nginx by using --with-openssl=<path> option.

END
exit 1
fi
fi
fi
fi

Expand Down
5 changes: 3 additions & 2 deletions auto/make
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
echo "creating $NGX_MAKEFILE"

mkdir -p $NGX_OBJS/src/core $NGX_OBJS/src/event $NGX_OBJS/src/event/modules \
$NGX_OBJS/src/event/quic \
$NGX_OBJS/src/os/unix $NGX_OBJS/src/os/win32 \
$NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/modules \
$NGX_OBJS/src/http/modules/perl \
$NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/v3 \
$NGX_OBJS/src/http/modules $NGX_OBJS/src/http/modules/perl \
$NGX_OBJS/src/mail \
$NGX_OBJS/src/stream \
$NGX_OBJS/src/misc
Expand Down
99 changes: 98 additions & 1 deletion auto/modules
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if [ $HTTP = YES ]; then
fi


if [ $HTTP_V2 = YES ]; then
if [ $HTTP_V2 = YES -o $HTTP_V3 = YES ]; then
HTTP_SRCS="$HTTP_SRCS $HTTP_HUFF_SRCS"
fi

Expand All @@ -124,6 +124,7 @@ if [ $HTTP = YES ]; then
# ngx_http_header_filter
# ngx_http_chunked_filter
# ngx_http_v2_filter
# ngx_http_v3_filter
# ngx_http_range_header_filter
# ngx_http_gzip_filter
# ngx_http_postpone_filter
Expand Down Expand Up @@ -156,6 +157,7 @@ if [ $HTTP = YES ]; then
ngx_http_header_filter_module \
ngx_http_chunked_filter_module \
ngx_http_v2_filter_module \
ngx_http_v3_filter_module \
ngx_http_range_header_filter_module \
ngx_http_gzip_filter_module \
ngx_http_postpone_filter_module \
Expand Down Expand Up @@ -217,6 +219,17 @@ if [ $HTTP = YES ]; then
. auto/module
fi

if [ $HTTP_V3 = YES ]; then
ngx_module_name=ngx_http_v3_filter_module
ngx_module_incs=
ngx_module_deps=
ngx_module_srcs=src/http/v3/ngx_http_v3_filter_module.c
ngx_module_libs=
ngx_module_link=$HTTP_V3

. auto/module
fi

if :; then
ngx_module_name=ngx_http_range_header_filter_module
ngx_module_incs=
Expand Down Expand Up @@ -426,6 +439,33 @@ if [ $HTTP = YES ]; then
. auto/module
fi

if [ $HTTP_V3 = YES ]; then
USE_OPENSSL_QUIC=YES
HTTP_SSL=YES

have=NGX_HTTP_V3 . auto/have
have=NGX_HTTP_HEADERS . auto/have

ngx_module_name=ngx_http_v3_module
ngx_module_incs=src/http/v3
ngx_module_deps="src/http/v3/ngx_http_v3.h \
src/http/v3/ngx_http_v3_encode.h \
src/http/v3/ngx_http_v3_parse.h \
src/http/v3/ngx_http_v3_table.h \
src/http/v3/ngx_http_v3_uni.h"
ngx_module_srcs="src/http/v3/ngx_http_v3.c \
src/http/v3/ngx_http_v3_encode.c \
src/http/v3/ngx_http_v3_parse.c \
src/http/v3/ngx_http_v3_table.c \
src/http/v3/ngx_http_v3_uni.c \
src/http/v3/ngx_http_v3_request.c \
src/http/v3/ngx_http_v3_module.c"
ngx_module_libs=
ngx_module_link=$HTTP_V3

. auto/module
fi

if :; then
ngx_module_name=ngx_http_static_module
ngx_module_incs=
Expand Down Expand Up @@ -1272,6 +1312,63 @@ if [ $USE_OPENSSL = YES ]; then
fi


if [ $USE_OPENSSL_QUIC = YES ]; then
ngx_module_type=CORE
ngx_module_name=ngx_quic_module
ngx_module_incs=
ngx_module_deps="src/event/quic/ngx_event_quic.h \
src/event/quic/ngx_event_quic_transport.h \
src/event/quic/ngx_event_quic_protection.h \
src/event/quic/ngx_event_quic_connection.h \
src/event/quic/ngx_event_quic_frames.h \
src/event/quic/ngx_event_quic_connid.h \
src/event/quic/ngx_event_quic_migration.h \
src/event/quic/ngx_event_quic_streams.h \
src/event/quic/ngx_event_quic_ssl.h \
src/event/quic/ngx_event_quic_tokens.h \
src/event/quic/ngx_event_quic_ack.h \
src/event/quic/ngx_event_quic_output.h \
src/event/quic/ngx_event_quic_socket.h \
src/event/quic/ngx_event_quic_openssl_compat.h"
ngx_module_srcs="src/event/quic/ngx_event_quic.c \
src/event/quic/ngx_event_quic_udp.c \
src/event/quic/ngx_event_quic_transport.c \
src/event/quic/ngx_event_quic_protection.c \
src/event/quic/ngx_event_quic_frames.c \
src/event/quic/ngx_event_quic_connid.c \
src/event/quic/ngx_event_quic_migration.c \
src/event/quic/ngx_event_quic_streams.c \
src/event/quic/ngx_event_quic_ssl.c \
src/event/quic/ngx_event_quic_tokens.c \
src/event/quic/ngx_event_quic_ack.c \
src/event/quic/ngx_event_quic_output.c \
src/event/quic/ngx_event_quic_socket.c \
src/event/quic/ngx_event_quic_openssl_compat.c"

ngx_module_libs=
ngx_module_link=YES
ngx_module_order=

. auto/module

if [ $QUIC_BPF = YES -a $SO_COOKIE_FOUND = YES ]; then
ngx_module_type=CORE
ngx_module_name=ngx_quic_bpf_module
ngx_module_incs=
ngx_module_deps=
ngx_module_srcs="src/event/quic/ngx_event_quic_bpf.c \
src/event/quic/ngx_event_quic_bpf_code.c"
ngx_module_libs=
ngx_module_link=YES
ngx_module_order=

. auto/module

have=NGX_QUIC_BPF . auto/have
fi
fi


if [ $USE_PCRE = YES ]; then
ngx_module_type=CORE
ngx_module_name=ngx_regex_module
Expand Down
12 changes: 12 additions & 0 deletions auto/options
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ USE_THREADS=NO

NGX_FILE_AIO=NO

QUIC_BPF=NO

HTTP=YES

NGX_HTTP_LOG_PATH=
Expand All @@ -59,6 +61,7 @@ HTTP_CHARSET=YES
HTTP_GZIP=YES
HTTP_SSL=NO
HTTP_V2=NO
HTTP_V3=NO
HTTP_SSI=YES
HTTP_REALIP=NO
HTTP_XSLT=NO
Expand Down Expand Up @@ -155,6 +158,7 @@ PCRE_JIT=NO
PCRE2=YES

USE_OPENSSL=NO
USE_OPENSSL_QUIC=NO
OPENSSL=NONE

USE_ZLIB=NO
Expand All @@ -172,6 +176,8 @@ USE_GEOIP=NO
NGX_GOOGLE_PERFTOOLS=NO
NGX_CPP_TEST=NO

SO_COOKIE_FOUND=NO

NGX_LIBATOMIC=NO

NGX_CPU_CACHE_LINE=
Expand Down Expand Up @@ -217,6 +223,8 @@ do

--with-file-aio) NGX_FILE_AIO=YES ;;

--without-quic_bpf_module) QUIC_BPF=NONE ;;

--with-ipv6)
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
$0: warning: the \"--with-ipv6\" option is deprecated"
Expand All @@ -234,6 +242,7 @@ $0: warning: the \"--with-ipv6\" option is deprecated"

--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 ;;
Expand Down Expand Up @@ -452,8 +461,11 @@ cat << END

--with-file-aio enable file AIO support

--without-quic_bpf_module disable ngx_quic_bpf_module

--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
Expand Down
44 changes: 44 additions & 0 deletions auto/os/linux
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,50 @@ ngx_feature_test="struct crypt_data cd;
ngx_include="sys/vfs.h"; . auto/include


# BPF sockhash

ngx_feature="BPF sockhash"
ngx_feature_name="NGX_HAVE_BPF"
ngx_feature_run=no
ngx_feature_incs="#include <linux/bpf.h>
#include <sys/syscall.h>"
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="union bpf_attr attr = { 0 };

attr.map_flags = 0;
attr.map_type = BPF_MAP_TYPE_SOCKHASH;

syscall(__NR_bpf, 0, &attr, 0);"
. auto/feature

if [ $ngx_found = yes ]; then
CORE_SRCS="$CORE_SRCS src/core/ngx_bpf.c"
CORE_DEPS="$CORE_DEPS src/core/ngx_bpf.h"

if [ $QUIC_BPF != NONE ]; then
QUIC_BPF=YES
fi
fi


ngx_feature="SO_COOKIE"
ngx_feature_name="NGX_HAVE_SO_COOKIE"
ngx_feature_run=no
ngx_feature_incs="#include <sys/socket.h>
$NGX_INCLUDE_INTTYPES_H"
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="socklen_t optlen = sizeof(uint64_t);
uint64_t cookie;
getsockopt(0, SOL_SOCKET, SO_COOKIE, &cookie, &optlen)"
. auto/feature

if [ $ngx_found = yes ]; then
SO_COOKIE_FOUND=YES
fi


# UDP segmentation offloading

ngx_feature="UDP_SEGMENT"
Expand Down
2 changes: 1 addition & 1 deletion auto/sources
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ CORE_SRCS="src/core/nginx.c \

EVENT_MODULES="ngx_events_module ngx_event_core_module"

EVENT_INCS="src/event src/event/modules"
EVENT_INCS="src/event src/event/modules src/event/quic"

EVENT_DEPS="src/event/ngx_event.h \
src/event/ngx_event_timer.h \
Expand Down
Loading

0 comments on commit fadd52f

Please sign in to comment.