ngx_http_autoquic_module
1.0.0
وحدة Nginx لترقية إصدار HTTP والرجوع إليه تلقائيًا لـ nginx-quic.
يجب تثبيت هذه الوحدة عن طريق إضافة الخيار --add-module
في مرحلة configure
.
$ cd nginx-quic
$ git clone https://github.com/Water-Melon/ngx_http_autoquic_module.git
$ ./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 "
...
--add-module=ngx_http_autoquic_module
$ make && make install
autoquic
on|off
؛off
http
autoquic
" قيمة_الرأس "؛http
autoquic_fallback
on|off
؛off
http
autoquic_fallback_period
؛http
http {
autoquic on;
autoquic_fallback on;
autoquic_header Alt-Svc ' $http3 =":443"; quic=":443"; h3=":443"; ma=86400' ;
autoquic_header QUIC-Status $quic ;
autoquic_fallback_period 30;
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on ;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65 ;
#gzip on;
server {
listen 443 ssl; # TCP listener for HTTP/1.1
listen 443 http3 reuseport; # UDP listener for QUIC+HTTP/3
server_name example.com;
ssl_protocols TLSv1.3; # QUIC requires TLS 1.3
ssl_early_data on;
quic_retry on;
ssl_certificate certs/example.com.crt;
ssl_certificate_key certs/example.com.key;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}