Skip to content

Integration of ngtcp2 and nghttp3 with wget2

Harshmohan Kulkarni requested to merge http3-quic-intergration into master

Approver's checklist:

  • [*] The author has submitted the FSF Copyright Assignment and is listed in AUTHORS
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent with existing code
  • This feature/change has adequate documentation added (if appropriate)
  • No obvious mistakes / misspelling in the code


This Merge Request aims to enhance the popular command-line tool Wget2 by adding support for the latest HTTP/3 protocol. The changes introduced in this MR enable Wget2 to integrate with the nghttp3 and ngtcp2 libraries to provide QUIC support. Additionally, GnuTLS is integrated for TLS encryption, ensuring secure communication over the new protocol.

Major Changes

  1. A new http3.c file has been added to the codebase to manage functions related to creating an HTTP/3 client. Callback functions required by the nghttp3 library are implemented in this file. The existing wget_http_connection struct is utilized to handle the HTTP/3 connection, minimizing code duplication.

  2. The quic.c file contains functions responsible for establishing a QUIC client over a socket. Callback functions essential for ngtcp2 library integration are implemented here. Getter and setter functions are provided to manage the QUIC connection.

  3. The streams.c file is dedicated to the management of wget_quic_stream structures, which form the backbone of the QUIC stack.

  4. The quic_ssl_gnutls.c file ensures the integration of the GnuTLS library with the QUIC stack, providing TLS encryption.

  5. Files in the examples folder have been created to showcase the practical usage of the implemented features. quic_handshake.c, quic_write.c, and quic_write_read.c illustrate the various aspects of QUIC, utilizing a localhost QUIC server for demonstration. An http3_send_request.c file demonstrates the usage of the HTTP/3 functionality.

Expected Impact

With this Merge Request, Wget2 will be equipped to handle the latest HTTP/3 protocol. Users will benefit from faster and more efficient data transfers and the ability to leverage the advantages of QUIC. The integration of nghttp3 and ngtcp2 libraries ensures compliance with the latest protocol specifications.


Documentation has been added to the codebase detailing the changes made, the usage of new features, and any necessary configurations.


This Merge Request is a significant step towards enhancing Wget2's capabilities by adding support for the HTTP/3 protocol through nghttp3, ngtcp2, and GnuTLS integration. The changes implemented ensure a transition to the latest protocol standards, offering improved performance and security for Wget2 users.

Edited by Harshmohan Kulkarni

Merge request reports