Building curl with ngtcp2 involves 3 components: `ngtcp2` itself, `nghttp3` and a QUIC supporting TLS library. The supported TLS libraries are covered below.
- * `ngtcp2`: v1.2.0
- * `nghttp3`: v1.1.0
+While any version of `ngtcp2` and `nghttp3` from v1.0.0 on are expected to
+work, using the latest versions often brings functional and performance
+improvements.
+
+The build examples use `$NGHTTP3_VERION` and `$NGTCP2_VERION` as placeholders
+for the version you build.
## Build with quictls
OpenSSL does not offer the required APIs for building a QUIC client. You need
to use a TLS library that has such APIs and that works with *ngtcp2*.
-Build quictls:
+Build quictls (any `+quic` tagged version works):
% git clone --depth 1 -b openssl-3.1.4+quic https://github.com/quictls/openssl
% cd openssl
Build nghttp3:
% cd ..
- % git clone -b v1.1.0 https://github.com/ngtcp2/nghttp3
+ % git clone -b $NGHTTP3_VERION https://github.com/ngtcp2/nghttp3
% cd nghttp3
% git submodule update --init
% autoreconf -fi
Build ngtcp2:
% cd ..
- % git clone -b v1.2.0 https://github.com/ngtcp2/ngtcp2
+ % git clone -b $NGTCP2_VERION https://github.com/ngtcp2/ngtcp2
% cd ngtcp2
% autoreconf -fi
% ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> --enable-lib-only
Build nghttp3:
% cd ..
- % git clone -b v1.1.0 https://github.com/ngtcp2/nghttp3
+ % git clone -b $NGHTTP3_VERION https://github.com/ngtcp2/nghttp3
% cd nghttp3
% git submodule update --init
% autoreconf -fi
Build ngtcp2:
% cd ..
- % git clone -b v1.2.0 https://github.com/ngtcp2/ngtcp2
+ % git clone -b $NGTCP2_VERION https://github.com/ngtcp2/ngtcp2
% cd ngtcp2
% autoreconf -fi
% ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> --enable-lib-only --with-gnutls
Build nghttp3:
% cd ..
- % git clone -b v1.1.0 https://github.com/ngtcp2/nghttp3
+ % git clone -b $NGHTTP3_VERION https://github.com/ngtcp2/nghttp3
% cd nghttp3
% git submodule update --init
% autoreconf -fi
Build ngtcp2:
% cd ..
- % git clone -b v1.2.0 https://github.com/ngtcp2/ngtcp2
+ % git clone -b $NGTCP2_VERION https://github.com/ngtcp2/ngtcp2
% cd ngtcp2
% autoreconf -fi
% ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> --enable-lib-only --with-wolfssl
QUIC support is **EXPERIMENTAL**
-Build OpenSSL 3.3.1:
+Use OpenSSL 3.3.1 or newer (QUIC support was added in 3.3.0, with
+shortcomings on some platforms like macOS). 3.4.1 or newer is recommended.
+Build via:
% cd ..
- % git clone -b openssl-3.3.1 https://github.com/openssl/openssl
+ % git clone -b $OPENSSL_VERSION https://github.com/openssl/openssl
% cd openssl
% ./config enable-tls1_3 --prefix=<somewhere> --libdir=lib
% make
Build nghttp3:
% cd ..
- % git clone -b v1.1.0 https://github.com/ngtcp2/nghttp3
+ % git clone -b $NGHTTP3_VERION https://github.com/ngtcp2/nghttp3
% cd nghttp3
% git submodule update --init
% autoreconf -fi