curl/docs/libcurl
Aritra Basu e78b1b3ecc
HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC)
This patch adds two major proxy capabilities to curl (ngtcp2 QUIC):
- HTTP/3 Proxy CONNECT: Tunnel HTTP/1.1 or HTTP/2 traffic through an
  HTTPS proxy that speaks HTTP/3 (QUIC) using the standard CONNECT
  method over an HTTP/3 connection.
- MASQUE CONNECT-UDP: Tunnel HTTP/3 (QUIC) traffic through an HTTP
  proxy (speaking HTTP/1.1, HTTP/2, or HTTP/3) using the extended
  CONNECT method with the CONNECT-UDP protocol (RFC9297 & RFC9298).

Public API additions:
- `CURLPROXY_HTTPS3`: new proxy type constant for HTTP/3 proxy
- `--proxy-http3`: new CLI flag to negotiate HTTP/3 with HTTPS proxy

The implementation adds two new filters:
- `H3-PROXY` - enables negotiating HTTP/3 (QUIC) to the proxy and
  running CONNECT/CONNECT-UDP through that proxy transport.
- `CAPSULE` - dedicated filter inserted between QUIC transport and
  HTTP-PROXY to handle datagram capsule encapsulation/decapsulation.

Here is how the curl filter chaining looks in different scenarios:
- HTTP/3 Proxy CONNECT (tunneling TCP protocols over QUIC proxy):
  conn -> HTTP/1.1 or HTTP/2  -> SSL -> HTTP-PROXY ->
                                 H3-PROXY -> HAPPY-EYEBALLS -> UDP
- MASQUE CONNECT-UDP (tunneling QUIC over any proxy):
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H3-PROXY ->
                               HAPPY-EYEBALLS -> UDP
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H1-PROXY or H2-PROXY ->
                               SSL -> HAPPY-EYEBALLS -> TCP

- Both features currently require the ngtcp2 QUIC backend.
- Both features are experimental (disabled by default). Enable with
  `--enable-proxy-http3`(autotools) or `-DUSE_PROXY_HTTP3=ON`(CMake).

Tests:
- tests/unit/unit3400.c: Unit tests for capsule protocol encode/decode
- tests/http/test_60_h3_proxy.py: Comprehensive pytest integration suite
- tests/http/testenv/h2o.py: Managing h2o instances with HTTP/1.1, HTTP/2,
  and HTTP/3 (QUIC) listeners, proxy.connect and proxy.connect-udp enabled.

References:
  RFC 9297 - HTTP Datagrams and the Capsule Protocol
  RFC 9298 - Proxying UDP in HTTP
  RFC 9000 §16 — Variable-Length Integer Encoding

Signed-off-by: Aritra Basu <aritrbas+gh@cisco.com>

Closes #21153
2026-05-27 08:49:53 +02:00
..
opts HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
.gitignore
ABI.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
CMakeLists.txt cmake: fix building docs when the base directory contains .3 2025-09-16 12:37:11 +02:00
curl_easy_cleanup.md docs: compare result against literal CURLE_OK (where missing) 2026-02-07 19:40:45 +01:00
curl_easy_duphandle.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_easy_escape.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_easy_getinfo.md progress: count amount of data "delivered" to application 2026-03-21 23:21:55 +01:00
curl_easy_header.md clang-tidy: enable more checks, fix fallouts 2026-04-14 02:20:16 +02:00
curl_easy_init.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_easy_nextheader.md curl_easy_nextheader.md: a new transfer invalidates 'prev' 2026-01-13 14:11:15 +01:00
curl_easy_option_by_id.md docs: minor edits to please the new spellchecker regime 2025-02-27 13:15:21 +01:00
curl_easy_option_by_name.md docs: minor edits to please the new spellchecker regime 2025-02-27 13:15:21 +01:00
curl_easy_option_next.md
curl_easy_pause.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
curl_easy_perform.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_easy_recv.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_easy_reset.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_easy_send.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_easy_setopt.md http2: remove stream dependency tracking 2026-05-22 09:44:08 +02:00
curl_easy_ssls_export.md tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
curl_easy_ssls_import.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_easy_strerror.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_easy_unescape.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_easy_upkeep.md mqtt: send ping at upkeep interval 2025-04-16 09:36:19 +02:00
curl_escape.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_formadd.md badwords: avoid 'simply' 2026-03-10 19:34:06 +01:00
curl_formfree.md
curl_formget.md tidy-up: miscellaneous 2026-01-15 13:06:13 +01:00
curl_free.md
curl_getdate.md
curl_getenv.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_global_cleanup.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_global_init.md docs: handle error in curl_global_init* examples 2026-03-09 13:01:22 +01:00
curl_global_init_mem.md docs: fixup wording nits 2026-03-09 22:47:07 +01:00
curl_global_sslset.md tidy-up: sort TLS backends, distros, alphabetically 2026-05-11 11:57:25 +02:00
curl_global_trace.md lib: make resolving HTTPS DNS records reliable: 2026-04-01 15:36:31 +02:00
curl_mime_addpart.md
curl_mime_data.md tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00
curl_mime_data_cb.md docs: enable more compiler warnings for C snippets, fix 3 finds 2026-03-19 14:21:53 +01:00
curl_mime_encoder.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_mime_filedata.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_mime_filename.md badwords: fix typos found 2026-01-14 03:11:33 +01:00
curl_mime_free.md
curl_mime_headers.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_mime_init.md
curl_mime_name.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_mime_subparts.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_mime_type.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_mprintf.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_multi_add_handle.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_multi_assign.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_multi_cleanup.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_multi_fdset.md docs: use mresult as variable name for CURLMcode 2025-12-17 08:55:12 +01:00
curl_multi_get_handles.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_multi_get_offt.md curl_multi_get_offt: language fix 2025-08-05 11:48:31 +02:00
curl_multi_info_read.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_multi_init.md
curl_multi_notify_disable.md multi: use CURLMNOTIFY_ as notification id prefix 2025-10-07 17:18:05 +02:00
curl_multi_notify_enable.md multi: use CURLMNOTIFY_ as notification id prefix 2025-10-07 17:18:05 +02:00
curl_multi_perform.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_multi_poll.md docs: use mresult as variable name for CURLMcode 2025-12-17 08:55:12 +01:00
curl_multi_remove_handle.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_multi_setopt.md async-thrdd: use thread queue for resolving 2026-03-25 12:14:21 +01:00
curl_multi_socket.md docs/libcurl: make examples build with picky compiler options 2025-04-11 15:23:51 +02:00
curl_multi_socket_action.md tidy-up: miscellaneous 2026-05-20 00:50:43 +02:00
curl_multi_socket_all.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_multi_strerror.md docs: use mresult as variable name for CURLMcode 2025-12-17 08:55:12 +01:00
curl_multi_timeout.md clang-tidy: enable more checks, fix fallouts 2026-04-14 02:20:16 +02:00
curl_multi_wait.md docs: use mresult as variable name for CURLMcode 2025-12-17 08:55:12 +01:00
curl_multi_waitfds.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_multi_wakeup.md docs: use mresult as variable name for CURLMcode 2025-12-17 08:55:12 +01:00
curl_pushheader_byname.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_pushheader_bynum.md tidy-up: miscellaneous 2026-03-09 11:35:19 +01:00
curl_share_cleanup.md share: concurrency handling, easy updates 2026-03-21 14:42:49 +01:00
curl_share_init.md
curl_share_setopt.md
curl_share_strerror.md
curl_slist_append.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_slist_free_all.md docs/libcurl: make examples build with picky compiler options 2025-04-11 15:23:51 +02:00
curl_strequal.md
curl_strnequal.md
curl_unescape.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_url.md doc: some returned in-memory data may not be altered 2025-11-25 11:05:27 +01:00
curl_url_cleanup.md
curl_url_dup.md docs/libcurl: return value overhall 2025-01-02 16:58:05 +01:00
curl_url_get.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_url_set.md urlapi: allow more path characters "raw" when asked to URL encode 2025-08-01 23:22:32 +02:00
curl_url_strerror.md
curl_version.md curl_version_info.md: clarify ssl_version for MultiSSL 2025-05-11 12:23:36 -04:00
curl_version_info.md HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
curl_ws_meta.md docs/libcurl: fix C formatting nits 2025-12-04 22:49:03 +01:00
curl_ws_recv.md docs: enable more compiler warnings for C snippets, fix 3 finds 2026-03-19 14:21:53 +01:00
curl_ws_send.md docs: rename CURLcode variables to 'result' 2025-12-17 08:55:12 +01:00
curl_ws_start_frame.md docs: avoid starting sentences with However, 2026-03-07 23:49:11 +01:00
libcurl-easy.md libcurl-easy.md: minor clarifications 2026-05-04 11:22:05 +02:00
libcurl-env-dbg.md dnsd: implement HTTPS-RR with alpn pref and no-default-alpn 2026-04-16 22:53:20 +02:00
libcurl-env.md netrc: use the NETRC environment variable (first) if set 2025-07-27 18:26:43 +02:00
libcurl-errors.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
libcurl-multi.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
libcurl-security.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
libcurl-share.md
libcurl-thread.md tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
libcurl-tutorial.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
libcurl-url.md stop using the word 'just' 2026-03-03 15:30:22 +01:00
libcurl-ws.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
libcurl.m4 configure: tidy up comments 2026-04-10 23:19:41 +02:00
libcurl.md tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
Makefile.am tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00
Makefile.inc tidy-up: miscellaneous 2026-01-15 13:06:13 +01:00
mksymbolsmanpage.pl scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
symbols-in-versions HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
symbols.pl tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00