curl/tests
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
..
certs genserv.pl: make external calls safe 2026-03-23 12:39:38 +01:00
cmake cmake: add CMake Config-based dependency detection 2026-03-21 18:52:31 +01:00
data HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
http HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
libtest transfer: clear referer when set to NULL 2026-05-26 10:04:40 +02:00
server GHA: enable -Wunused-macros in clang-tidy jobs 2026-05-16 01:17:41 +02:00
tunit tool1622: assert width and exact format boundaries 2026-05-07 08:00:03 +02:00
unit HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
.gitignore build: stop building and installing runtests.1 and testcurl.1 2026-04-28 09:07:27 +02:00
allversions.pm badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
appveyor.pm tidy-up: miscellaneous 2026-05-20 00:50:43 +02:00
azure.pm tidy-up: miscellaneous 2026-05-20 00:50:43 +02:00
CMakeLists.txt tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
config.in
configurehelp.pm.in build: use configurehelp.pm.in with autotools and cmake 2024-09-21 12:21:14 +02:00
devtest.pl tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
dictserver.py tests: make whitespace between functions and classes consistent 2026-04-08 10:28:05 -07:00
directories.pm tidy-up: miscellaneous 2025-12-12 04:18:48 +01:00
ech_combos.py tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
ech_tests.sh tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
ftpserver.pl tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
getpart.pm tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
globalconfig.pm tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
http-server.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
http2-server.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
http3-server.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
Makefile.am tidy-up: miscellaneous 2026-01-15 13:06:13 +01:00
memanalyze.pl runtests: make memanalyzer a Perl module (for 1.1-2x speed-up per test run) 2025-12-04 13:14:32 +01:00
memanalyzer.pm scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
negtelnetserver.py tests: make whitespace between functions and classes consistent 2026-04-08 10:28:05 -07:00
nghttpx.conf
pathhelp.pm tidy-up: miscellaneous 2026-04-14 01:08:32 +02:00
processhelp.pm scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
requirements.txt GHA: bump actions and pips 2026-05-01 21:19:22 +02:00
rtspserver.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
runner.pm tests: add an assert to avoid IPC blocking 2026-05-20 11:32:38 -07:00
runtests.pl tidy-up: miscellaneous 2026-05-20 00:50:43 +02:00
secureserver.pl tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
serverhelp.pm scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
servers.pm tidy-up: miscellaneous 2026-05-20 00:50:43 +02:00
smbserver.py tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
sshhelp.pm runtests: allow configuring SSH host/client key algorithm 2026-04-05 11:19:42 +02:00
sshserver.pl tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
test745.pl tidy-up: Markdown, clang-format nits 2026-01-22 23:44:47 +01:00
test971.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1119.pl tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
test1135.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1139.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1140.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1165.pl build: disable typecheck via the command-line instead of curl_config.h 2026-02-20 16:32:37 +01:00
test1167.pl tidy-up: miscellaneous 2026-04-14 01:08:32 +02:00
test1173.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1175.pl badwords: fix issues found in tests 2025-11-17 13:30:35 +01:00
test1177.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1222.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1275.pl test1275.pl: ignore indented sections in markdowns 2026-04-01 14:36:10 +02:00
test1276.pl optiontable: replace stdin with filename arg, harden open() call 2026-03-19 15:06:43 +01:00
test1477.pl tidy-up: miscellaneous 2025-12-12 04:18:48 +01:00
test1486.pl src: fix formatting nits 2025-12-03 20:50:18 +01:00
test1488.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1544.pl scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
test1707.pl perl: harden external command invocations 2026-03-26 14:20:07 +01:00
testcurl.pl testcurl.pl: replace shell commands with Perl rmtree() 2026-03-21 22:42:38 +01:00
testutil.pm tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
tftpserver.pl tidy-up: miscellaneous 2025-11-17 13:32:43 +01:00
util.py tests: make whitespace between functions and classes consistent 2026-04-08 10:28:05 -07:00
valgrind.pm scripts: drop redundant double-quotes: "$var" -> $var (Perl) 2026-03-21 13:21:06 +01:00
valgrind.supp hyper: drop support 2024-12-21 11:33:05 +01:00