ngx_http_v3_module

ngx_http_v3_module 모듈(1.25.0)은 HTTP/3에 대한 실험적 지원을 제공합니다. 이 모듈은 기본적으로 빌드되지 않으며 –with-http_v3_module 구성 매개변수를 사용하여 활성화해야 합니다.

LibreSSL 또는 QuicTLS와 같은 QUIC 지원을 제공하는 SSL 라이브러리를 사용하는 것이 좋습니다. 그렇지 않으면 OpenSSL 라이브러리를 사용할 때 초기 데이터를 지원하지 않는 OpenSSL 호환성 레이어가 사용됩니다.

Known Issues

이 모듈은 실험적이므로 경고 사항이 적용됩니다.

예제 구성

http {
    log_format quic '$remote_addr - $remote_user [$time_local] '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent" "$http3"';

    access_log logs/access.log quic;

    server {
        # for better compatibility it's recommended
        # to use the same port for http/3 and https
        listen 8443 quic reuseport;
        listen 8443 ssl;

        ssl_certificate     certs/example.com.crt;
        ssl_certificate_key certs/example.com.key;

        location / {
            # used to advertise the availability of HTTP/3
            add_header Alt-Svc 'h3=":8443"; ma=86400';
        }
    }
}

TLS를 통한 HTTP/3 연결을 수락하려면 OpenSSL 버전 1.1.1부터 사용할 수 있는 TLSv1.3 프로토콜 지원이 필요합니다.

Directives

Syntax:  http3 on | off;
Default: http3 on;
Context: http, server

HTTP/3 프로토콜 협상(negotiation)을 활성화합니다.

Syntax:	 http3_hq on | off;
Default: http3_hq off;
Context: http, server

QUIC 상호 운용성 테스트에 사용되는 HTTP/0.9 프로토콜 협상을 활성화합니다.

Syntax:	 http3_max_concurrent_streams number;
Default: http3_max_concurrent_streams 128;
Context: http, server

연결에서 동시 HTTP/3 요청 스트림의 최대 수를 설정합니다.

Syntax:	 http3_stream_buffer_size size;
Default: http3_stream_buffer_size 64k;
Context: http, server

QUIC 스트림을 읽고 쓰는 데 사용되는 버퍼의 크기를 설정합니다.

Syntax:	 quic_active_connection_id_limit number;
Default: quic_active_connection_id_limit 2;
Context: http, server

QUIC active_connection_id_limit 전송 매개변수 값을 설정합니다. 이는 서버에 저장할 수 있는 최대 클라이언트 연결 ID 수입니다.

Syntax:	 quic_bpf on | off;
Default: quic_bpf off;
Context: main

eBPF를 사용하여 QUIC 패킷 라우팅을 활성화합니다. 활성화되면 QUIC 연결 마이그레이션을 지원할 수 있습니다.

이 지시어(directive)는 Linux 5.7+에서만 지원됩니다.
Syntax:	 quic_gso on | off;
Default: quic_gso off;
Context: http, server

분할 오프로딩을 사용하여 최적화된 배치 모드로 전송할 수 있습니다.

최적화된 전송은 UDP_SEGMENT 기능을 갖춘 Linux에서만 지원됩니다.
Syntax:	 quic_host_key file;
Default: —
Context: http, server

상태 비저장 재설정 및 주소 검증 토큰을 암호화하는 데 사용되는 비밀 키로 파일을 설정합니다. 기본적으로 다시 로드할 때마다 무작위 키가 생성됩니다. 이전 키로 생성된 토큰은 허용되지 않습니다.

Syntax:	 quic_retry on | off;
Default: quic_retry off;
Context: http, server

QUIC 주소 유효성 검사 기능을 활성화합니다. 여기에는 재시도 패킷 또는 NEW_TOKEN 프레임에서 새 토큰을 보내고 초기 패킷에서 수신된 토큰의 유효성을 검사하는 것이 포함됩니다.

Embedded Variables

ngx_http_v3_module 모듈은 다음 내장 변수를 지원합니다.

$http3

협상된 프로토콜 식별자(negotiated protocol identifier): HTTP/3 연결의 경우 “h3”, hq 연결의 경우 “hq”, 그렇지 않은 경우 빈 문자열입니다.