Skip to content

Instantly share code, notes, and snippets.

@gfx
Created May 17, 2022 02:05
Show Gist options
  • Save gfx/2885785bac51b56fa5bf2d5c8dd9f7c6 to your computer and use it in GitHub Desktop.
Save gfx/2885785bac51b56fa5bf2d5c8dd9f7c6 to your computer and use it in GitHub Desktop.
Enabling HTTP/3 in cURL with quiche + boringSSL
# curl with http2 and http3 support
# https://curl.se/docs/http3.html
RUN wget --https-only --no-verbose -O - https://sh.rustup.rs | sh -s -- \
-y \
--profile minimal \
--default-toolchain 1.59.0 \
&& git clone --recursive --branch 0.12.0 --depth 1 https://github.com/cloudflare/quiche \
&& (cd quiche \
&& $HOME/.cargo/bin/cargo build --package quiche --release --features ffi,pkg-config-meta,qlog \
&& mkdir quiche/deps/boringssl/src/lib \
&& ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/ \
&& find . -name '*.so' -delete) \
&& wget --no-verbose -O - https://curl.haxx.se/download/curl-7.82.0.tar.gz | tar xzf - \
&& (cd curl-7.82.0 \
&& ./configure --prefix=/usr/local --without-brotli --with-nghttp2 --disable-shared CC=clang LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-openssl="$PWD/../quiche/quiche/deps/boringssl/src" --with-quiche="$PWD/../quiche/target/release" \
&& make -j4 V=1 && make -j4 install) \
&& (rm -rf quiche curl-7.82.0) \
&& curl --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment