{"id":508,"date":"2026-01-27T02:24:24","date_gmt":"2026-01-27T02:24:24","guid":{"rendered":"https:\/\/blog.gpst.net.cn:4008\/?p=508"},"modified":"2026-01-28T06:24:12","modified_gmt":"2026-01-28T06:24:12","slug":"%e7%bc%96%e8%af%91curl%e6%94%af%e6%8c%81http3","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=508","title":{"rendered":"\u7f16\u8bd1curl\u652f\u6301http3"},"content":{"rendered":"\n<p>Building curl with ngtcp2 involves 3 components:ngtcp2itself,nghttp3and a QUIC supporting TLS library. The supported TLS libraries are covered below.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ngtcp2: v1.2.0<\/li>\n\n\n\n<li>nghttp3: v1.1.0<\/li>\n<\/ul>\n\n\n\n<p>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<em>ngtcp2<\/em>.<\/p>\n\n\n\n<p>Build quictls:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>% git clone --depth 1 -b openssl-3.1.4+quic https:\/\/github.com\/quictls\/openssl\n% cd openssl\n% .\/config enable-tls1_3 --prefix=&lt;somewhere1&gt;\n% make\n% make install<\/code><\/pre>\n\n\n\n<p>Build nghttp3:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>% cd ..\n% git clone -b v1.1.0 https:\/\/github.com\/ngtcp2\/nghttp3\n% cd nghttp3\n% git submodule update --init\n% autoreconf -fi\n% .\/configure --prefix=&lt;somewhere2&gt; --enable-lib-only\n% make\n% make install<\/code><\/pre>\n\n\n\n<p>Build ngtcp2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>% cd ..\n% git clone -b v1.2.0 https:\/\/github.com\/ngtcp2\/ngtcp2\n% cd ngtcp2\n% autoreconf -fi\n% .\/configure PKG_CONFIG_PATH=&lt;somewhere1&gt;\/lib\/pkgconfig:&lt;somewhere2&gt;\/lib\/pkgconfig LDFLAGS=\"-Wl,-rpath,&lt;somewhere1&gt;\/lib\" --prefix=&lt;somewhere3&gt; --enable-lib-only\n% make\n% make install<\/code><\/pre>\n\n\n\n<p>Build curl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>% cd ..\n% git clone https:\/\/github.com\/curl\/curl\n% cd curl\n% autoreconf -fi\n% LDFLAGS=\"-Wl,-rpath,&lt;somewhere1&gt;\/lib\" .\/configure --with-openssl=&lt;somewhere1&gt; --with-nghttp3=&lt;somewhere2&gt; --with-ngtcp2=&lt;somewhere3&gt;\n% make\n% make install<\/code><\/pre>\n\n\n\n<p>For OpenSSL 3.0.0 or later builds on Linux for x86_64 architecture, substitute all occurrences of &#8220;\/lib&#8221; with &#8220;\/lib64&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building curl with ngtcp2 involves 3 components:ngtcp2itself,nghttp3and a QUIC supporting TLS library. The supported TLS libraries are covered below. 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 withngtcp2. Build quictls: Build nghttp3: Build ngtcp2: Build curl: For [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-508","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=508"}],"version-history":[{"count":2,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/508\/revisions"}],"predecessor-version":[{"id":604,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/508\/revisions\/604"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}