|
环境说明:
操作系统:Ubuntu
Nginx版本1.20.1
https://Github.com/cloudflare/quiche/tree/master/extras/nginx
1.安装编译套件
apt install-no-install-recommends-y \
build-essential software-properties-common flexbison \
libp cre 3-devlibpcre-devlibxml 2 libxml 2-dev \
Libcurl 4 Doxygen Libya JL2 Libya Jl-Dev Geo IP-Bin Lib Geo IP 1 Lib Geo IP-Dev Libtool DH-Autore conf Libcurl 4-Openssl-DD
zlib 1g-dev unzip git wget unzip language-pack-ko-Hans libhiredis-dev libhiredis 0 . 13 libuid 1 uuid-dev \
cmake golang-go lib unwind-dev rust c cargo
cmake golang-go lib unwind-dev rust c cargo此软件包是编译quiche所必需的
编译方法:https://github.com/cloudflare/quiche/tree/master/extras/ng inx
curl-o https://nginx . org/download/nginx-1 . 20 . 1 . tar . gz
Tar xzvf nginx-1.20.1.tar.gz
GIT Clone-recursive 3359 Github.com/cloudflare/quiche
Cd nginx-1.20.1
补丁-P01./quiche/extras/nginx/nginx-1.20 . patch
./configure \
-prefix=$ pwd \
-build=' quiche-$ (git-git-dir=)./quiche/。gitrev-parse-shorthead)' \
-with-http _ SSL _ module \
-with-http _ v2 _ module \
-with-http _ v3 _ module \
-with-OpenSSL=./quiche/deps/boringssl \
-with-quiche=./quiche
Make
Nginx -V
配置文件:
活动{
工作人员_连接1024;
}
Http {
服务器{
# Enable QUIC and HTTP/3。
Listen 443 quic reuseport:
# enablehttp/2(可选)。
Listen 443 SSL http2:
Ssl _ certificate cert.crt
Ssl _ certificate _ key cert.key
# enable all TLS versions(tlsv 1.3 is required for quic)。
SSL _ Protocols TLS v 1 TLSV 1.1 TLSV 1.2 TLSV 1.3;
# add alt-SVC header to negotiate http/3。
ADD _ Header Alt-SVC ' H3=' 3360443 ';MA=86400 ';
}
}
Http3_max_concurrent_streams
syntax : http 3 _ max _ concurrent _ streamsnumber;
default 3360 http 3 _ max _ concurrent _ streams 128;
Context : http,服务器
limits the maximum number of concurrent http/3 streams in a connection .
Http3_max_requests
syntax : http 3 _ max _ requests number;
default : http 3 _ max _ requests 1000;
Context : http,服务器
limits the maximum number of requests that can be served on a single http/3 connection,After which the next client request will lead to connection
Http3_max_header_size
syntax : http 3 _ max _ header _ size size;
default : http 3 _ max _ header _ size 16k;
Context : http,服务器
limits the maximum size of the entire request header list after q pack de compression .
Http3_initial_max_data
syntax : http 3 _ initial _ max _ datasize;
default : http 3 _ initial _ max _ data 10m;
Context : http,服务器
sets the per-connection incoming flow control limit。
Http3_initial_max_stream_data
syntax : http 3 _ initial _ max _ stream _ datasize;
default : http 3 _ initial _ max _ stream _ data 1m;
Context : http,服务器
sets the per-stream incoming flow control limit。
Http3_idle_timeout
syntax : http 3 _ idle _ time outtime;
default 3360 http 3 _ idle _ time out 3m;
Context : http,服务器
sets the time out of in activity after which the connection is closed。
列表of variables
$http3
H3' if http/3 was negotiated,or an empty string otherwise .
0-RTT
to support 0-RTT quic connection resumption from the client,you will need the following configuration 3360
Http {
服务器{
.
Ssl _ early _ data on
Ssl _ session _ ticket _ key file
.
}
} |
|