Skip to content

Commit 89a8b08

Browse files
committed
nginx 1.25.0
2 parents d74879f + 54e1a74 commit 89a8b08

File tree

82 files changed

+23639
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+23639
-64
lines changed

nginx/CHANGES

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
Changes with nginx 1.25.0 23 May 2023
3+
4+
*) Feature: experimental HTTP/3 support.
5+
6+
27
Changes with nginx 1.23.4 28 Mar 2023
38

49
*) Change: now TLSv1.3 protocol is enabled by default.

nginx/CHANGES.ru

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
Изменения в nginx 1.25.0 23.05.2023
3+
4+
*) Добавление: экспериментальная поддержка HTTP/3.
5+
6+
27
Изменения в nginx 1.23.4 28.03.2023
38

49
*) Изменение: теперь протокол TLSv1.3 разрешён по умолчанию.

nginx/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (C) 2002-2021 Igor Sysoev
3-
* Copyright (C) 2011-2022 Nginx, Inc.
3+
* Copyright (C) 2011-2023 Nginx, Inc.
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without

nginx/auto/lib/openssl/conf

+37-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55

66
if [ $OPENSSL != NONE ]; then
77

8+
have=NGX_OPENSSL . auto/have
9+
have=NGX_SSL . auto/have
10+
11+
if [ $USE_OPENSSL_QUIC = YES ]; then
12+
have=NGX_QUIC . auto/have
13+
have=NGX_QUIC_OPENSSL_COMPAT . auto/have
14+
fi
15+
816
case "$CC" in
917

1018
cl | bcc32)
11-
have=NGX_OPENSSL . auto/have
12-
have=NGX_SSL . auto/have
13-
1419
CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
1520

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

3540
*)
36-
have=NGX_OPENSSL . auto/have
37-
have=NGX_SSL . auto/have
38-
3941
CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
4042
CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
4143
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
@@ -123,6 +125,35 @@ else
123125
CORE_INCS="$CORE_INCS $ngx_feature_path"
124126
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
125127
OPENSSL=YES
128+
129+
if [ $USE_OPENSSL_QUIC = YES ]; then
130+
131+
ngx_feature="OpenSSL QUIC support"
132+
ngx_feature_name="NGX_QUIC"
133+
ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
134+
. auto/feature
135+
136+
if [ $ngx_found = no ]; then
137+
have=NGX_QUIC_OPENSSL_COMPAT . auto/have
138+
139+
ngx_feature="OpenSSL QUIC compatibility"
140+
ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
141+
NULL, NULL, NULL, NULL, NULL)"
142+
. auto/feature
143+
fi
144+
145+
if [ $ngx_found = no ]; then
146+
cat << END
147+
148+
$0: error: certain modules require OpenSSL QUIC support.
149+
You can either do not enable the modules, or install the OpenSSL library with
150+
QUIC support into the system, or build the OpenSSL library with QUIC support
151+
statically from the source with nginx by using --with-openssl=<path> option.
152+
153+
END
154+
exit 1
155+
fi
156+
fi
126157
fi
127158
fi
128159

nginx/auto/make

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
echo "creating $NGX_MAKEFILE"
77

88
mkdir -p $NGX_OBJS/src/core $NGX_OBJS/src/event $NGX_OBJS/src/event/modules \
9+
$NGX_OBJS/src/event/quic \
910
$NGX_OBJS/src/os/unix $NGX_OBJS/src/os/win32 \
10-
$NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/modules \
11-
$NGX_OBJS/src/http/modules/perl \
11+
$NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/v3 \
12+
$NGX_OBJS/src/http/modules $NGX_OBJS/src/http/modules/perl \
1213
$NGX_OBJS/src/mail \
1314
$NGX_OBJS/src/stream \
1415
$NGX_OBJS/src/misc

nginx/auto/modules

+98-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if [ $HTTP = YES ]; then
102102
fi
103103

104104

105-
if [ $HTTP_V2 = YES ]; then
105+
if [ $HTTP_V2 = YES -o $HTTP_V3 = YES ]; then
106106
HTTP_SRCS="$HTTP_SRCS $HTTP_HUFF_SRCS"
107107
fi
108108

@@ -124,6 +124,7 @@ if [ $HTTP = YES ]; then
124124
# ngx_http_header_filter
125125
# ngx_http_chunked_filter
126126
# ngx_http_v2_filter
127+
# ngx_http_v3_filter
127128
# ngx_http_range_header_filter
128129
# ngx_http_gzip_filter
129130
# ngx_http_postpone_filter
@@ -156,6 +157,7 @@ if [ $HTTP = YES ]; then
156157
ngx_http_header_filter_module \
157158
ngx_http_chunked_filter_module \
158159
ngx_http_v2_filter_module \
160+
ngx_http_v3_filter_module \
159161
ngx_http_range_header_filter_module \
160162
ngx_http_gzip_filter_module \
161163
ngx_http_postpone_filter_module \
@@ -217,6 +219,17 @@ if [ $HTTP = YES ]; then
217219
. auto/module
218220
fi
219221

222+
if [ $HTTP_V3 = YES ]; then
223+
ngx_module_name=ngx_http_v3_filter_module
224+
ngx_module_incs=
225+
ngx_module_deps=
226+
ngx_module_srcs=src/http/v3/ngx_http_v3_filter_module.c
227+
ngx_module_libs=
228+
ngx_module_link=$HTTP_V3
229+
230+
. auto/module
231+
fi
232+
220233
if :; then
221234
ngx_module_name=ngx_http_range_header_filter_module
222235
ngx_module_incs=
@@ -426,6 +439,33 @@ if [ $HTTP = YES ]; then
426439
. auto/module
427440
fi
428441

442+
if [ $HTTP_V3 = YES ]; then
443+
USE_OPENSSL_QUIC=YES
444+
HTTP_SSL=YES
445+
446+
have=NGX_HTTP_V3 . auto/have
447+
have=NGX_HTTP_HEADERS . auto/have
448+
449+
ngx_module_name=ngx_http_v3_module
450+
ngx_module_incs=src/http/v3
451+
ngx_module_deps="src/http/v3/ngx_http_v3.h \
452+
src/http/v3/ngx_http_v3_encode.h \
453+
src/http/v3/ngx_http_v3_parse.h \
454+
src/http/v3/ngx_http_v3_table.h \
455+
src/http/v3/ngx_http_v3_uni.h"
456+
ngx_module_srcs="src/http/v3/ngx_http_v3.c \
457+
src/http/v3/ngx_http_v3_encode.c \
458+
src/http/v3/ngx_http_v3_parse.c \
459+
src/http/v3/ngx_http_v3_table.c \
460+
src/http/v3/ngx_http_v3_uni.c \
461+
src/http/v3/ngx_http_v3_request.c \
462+
src/http/v3/ngx_http_v3_module.c"
463+
ngx_module_libs=
464+
ngx_module_link=$HTTP_V3
465+
466+
. auto/module
467+
fi
468+
429469
if :; then
430470
ngx_module_name=ngx_http_static_module
431471
ngx_module_incs=
@@ -1272,6 +1312,63 @@ if [ $USE_OPENSSL = YES ]; then
12721312
fi
12731313

12741314

1315+
if [ $USE_OPENSSL_QUIC = YES ]; then
1316+
ngx_module_type=CORE
1317+
ngx_module_name=ngx_quic_module
1318+
ngx_module_incs=
1319+
ngx_module_deps="src/event/quic/ngx_event_quic.h \
1320+
src/event/quic/ngx_event_quic_transport.h \
1321+
src/event/quic/ngx_event_quic_protection.h \
1322+
src/event/quic/ngx_event_quic_connection.h \
1323+
src/event/quic/ngx_event_quic_frames.h \
1324+
src/event/quic/ngx_event_quic_connid.h \
1325+
src/event/quic/ngx_event_quic_migration.h \
1326+
src/event/quic/ngx_event_quic_streams.h \
1327+
src/event/quic/ngx_event_quic_ssl.h \
1328+
src/event/quic/ngx_event_quic_tokens.h \
1329+
src/event/quic/ngx_event_quic_ack.h \
1330+
src/event/quic/ngx_event_quic_output.h \
1331+
src/event/quic/ngx_event_quic_socket.h \
1332+
src/event/quic/ngx_event_quic_openssl_compat.h"
1333+
ngx_module_srcs="src/event/quic/ngx_event_quic.c \
1334+
src/event/quic/ngx_event_quic_udp.c \
1335+
src/event/quic/ngx_event_quic_transport.c \
1336+
src/event/quic/ngx_event_quic_protection.c \
1337+
src/event/quic/ngx_event_quic_frames.c \
1338+
src/event/quic/ngx_event_quic_connid.c \
1339+
src/event/quic/ngx_event_quic_migration.c \
1340+
src/event/quic/ngx_event_quic_streams.c \
1341+
src/event/quic/ngx_event_quic_ssl.c \
1342+
src/event/quic/ngx_event_quic_tokens.c \
1343+
src/event/quic/ngx_event_quic_ack.c \
1344+
src/event/quic/ngx_event_quic_output.c \
1345+
src/event/quic/ngx_event_quic_socket.c \
1346+
src/event/quic/ngx_event_quic_openssl_compat.c"
1347+
1348+
ngx_module_libs=
1349+
ngx_module_link=YES
1350+
ngx_module_order=
1351+
1352+
. auto/module
1353+
1354+
if [ $QUIC_BPF = YES -a $SO_COOKIE_FOUND = YES ]; then
1355+
ngx_module_type=CORE
1356+
ngx_module_name=ngx_quic_bpf_module
1357+
ngx_module_incs=
1358+
ngx_module_deps=
1359+
ngx_module_srcs="src/event/quic/ngx_event_quic_bpf.c \
1360+
src/event/quic/ngx_event_quic_bpf_code.c"
1361+
ngx_module_libs=
1362+
ngx_module_link=YES
1363+
ngx_module_order=
1364+
1365+
. auto/module
1366+
1367+
have=NGX_QUIC_BPF . auto/have
1368+
fi
1369+
fi
1370+
1371+
12751372
if [ $USE_PCRE = YES ]; then
12761373
ngx_module_type=CORE
12771374
ngx_module_name=ngx_regex_module

nginx/auto/options

+12
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ USE_THREADS=NO
4545

4646
NGX_FILE_AIO=NO
4747

48+
QUIC_BPF=NO
49+
4850
HTTP=YES
4951

5052
NGX_HTTP_LOG_PATH=
@@ -59,6 +61,7 @@ HTTP_CHARSET=YES
5961
HTTP_GZIP=YES
6062
HTTP_SSL=NO
6163
HTTP_V2=NO
64+
HTTP_V3=NO
6265
HTTP_SSI=YES
6366
HTTP_REALIP=NO
6467
HTTP_XSLT=NO
@@ -149,6 +152,7 @@ PCRE_JIT=NO
149152
PCRE2=YES
150153

151154
USE_OPENSSL=NO
155+
USE_OPENSSL_QUIC=NO
152156
OPENSSL=NONE
153157

154158
USE_ZLIB=NO
@@ -166,6 +170,8 @@ USE_GEOIP=NO
166170
NGX_GOOGLE_PERFTOOLS=NO
167171
NGX_CPP_TEST=NO
168172

173+
SO_COOKIE_FOUND=NO
174+
169175
NGX_LIBATOMIC=NO
170176

171177
NGX_CPU_CACHE_LINE=
@@ -211,6 +217,8 @@ do
211217

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

220+
--without-quic_bpf_module) QUIC_BPF=NONE ;;
221+
214222
--with-ipv6)
215223
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
216224
$0: warning: the \"--with-ipv6\" option is deprecated"
@@ -228,6 +236,7 @@ $0: warning: the \"--with-ipv6\" option is deprecated"
228236

229237
--with-http_ssl_module) HTTP_SSL=YES ;;
230238
--with-http_v2_module) HTTP_V2=YES ;;
239+
--with-http_v3_module) HTTP_V3=YES ;;
231240
--with-http_realip_module) HTTP_REALIP=YES ;;
232241
--with-http_addition_module) HTTP_ADDITION=YES ;;
233242
--with-http_xslt_module) HTTP_XSLT=YES ;;
@@ -443,8 +452,11 @@ cat << END
443452

444453
--with-file-aio enable file AIO support
445454

455+
--without-quic_bpf_module disable ngx_quic_bpf_module
456+
446457
--with-http_ssl_module enable ngx_http_ssl_module
447458
--with-http_v2_module enable ngx_http_v2_module
459+
--with-http_v3_module enable ngx_http_v3_module
448460
--with-http_realip_module enable ngx_http_realip_module
449461
--with-http_addition_module enable ngx_http_addition_module
450462
--with-http_xslt_module enable ngx_http_xslt_module

nginx/auto/os/linux

+44
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,50 @@ ngx_feature_test="struct crypt_data cd;
232232
ngx_include="sys/vfs.h"; . auto/include
233233

234234

235+
# BPF sockhash
236+
237+
ngx_feature="BPF sockhash"
238+
ngx_feature_name="NGX_HAVE_BPF"
239+
ngx_feature_run=no
240+
ngx_feature_incs="#include <linux/bpf.h>
241+
#include <sys/syscall.h>"
242+
ngx_feature_path=
243+
ngx_feature_libs=
244+
ngx_feature_test="union bpf_attr attr = { 0 };
245+
246+
attr.map_flags = 0;
247+
attr.map_type = BPF_MAP_TYPE_SOCKHASH;
248+
249+
syscall(__NR_bpf, 0, &attr, 0);"
250+
. auto/feature
251+
252+
if [ $ngx_found = yes ]; then
253+
CORE_SRCS="$CORE_SRCS src/core/ngx_bpf.c"
254+
CORE_DEPS="$CORE_DEPS src/core/ngx_bpf.h"
255+
256+
if [ $QUIC_BPF != NONE ]; then
257+
QUIC_BPF=YES
258+
fi
259+
fi
260+
261+
262+
ngx_feature="SO_COOKIE"
263+
ngx_feature_name="NGX_HAVE_SO_COOKIE"
264+
ngx_feature_run=no
265+
ngx_feature_incs="#include <sys/socket.h>
266+
$NGX_INCLUDE_INTTYPES_H"
267+
ngx_feature_path=
268+
ngx_feature_libs=
269+
ngx_feature_test="socklen_t optlen = sizeof(uint64_t);
270+
uint64_t cookie;
271+
getsockopt(0, SOL_SOCKET, SO_COOKIE, &cookie, &optlen)"
272+
. auto/feature
273+
274+
if [ $ngx_found = yes ]; then
275+
SO_COOKIE_FOUND=YES
276+
fi
277+
278+
235279
# UDP segmentation offloading
236280

237281
ngx_feature="UDP_SEGMENT"

nginx/auto/sources

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ CORE_SRCS="src/core/nginx.c \
8383

8484
EVENT_MODULES="ngx_events_module ngx_event_core_module"
8585

86-
EVENT_INCS="src/event src/event/modules"
86+
EVENT_INCS="src/event src/event/modules src/event/quic"
8787

8888
EVENT_DEPS="src/event/ngx_event.h \
8989
src/event/ngx_event_timer.h \

0 commit comments

Comments
 (0)