From 7046ee7c6cb039e11abfee358616dc5ff37a6d65 Mon Sep 17 00:00:00 2001 From: Jerome Louvel <374450+jlouvel@users.noreply.github.com> Date: Thu, 29 Oct 2026 22:03:57 -0400 Subject: [PATCH] chore: log that HTTP/3 is not used through proxies In the HTTP3 transport mode, the Netty client sends the HTTPS requests going through an HTTP or SOCKS proxy over TCP, since proxying QUIC requires CONNECT-UDP (RFC 9298), which Netty doesn't support yet. Log it at startup so that the fallback is visible, and mention SOCKS proxies in the httpClientTransportMode Javadoc. Refs #1572. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com> --- .../java/org/restlet/engine/netty/NettyClientHelper.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/org.restlet/src/main/java/org/restlet/engine/netty/NettyClientHelper.java b/org.restlet/src/main/java/org/restlet/engine/netty/NettyClientHelper.java index 8bc26ad5ab..05b351570d 100644 --- a/org.restlet/src/main/java/org/restlet/engine/netty/NettyClientHelper.java +++ b/org.restlet/src/main/java/org/restlet/engine/netty/NettyClientHelper.java @@ -140,7 +140,7 @@ * (HTTP/2 only: negotiated with ALPN over TLS, prior knowledge in cleartext, except through a * forward proxy where HTTP/1.1 is used), "DYNAMIC" (HTTP/2 * when negotiated with ALPN over TLS, HTTP/1.1 otherwise), "HTTP3" (experimental: HTTP/3 - * over QUIC for HTTPS URIs without proxy, HTTP/1.1 otherwise; requires the optional + * over QUIC for HTTPS URIs without HTTP or SOCKS proxy, HTTP/1.1 otherwise; requires the optional * {@code io.netty:netty-codec-http3} dependency with its native QUIC library, and the {@link * org.restlet.engine.ssl.DefaultSslContextFactory}). * @@ -1032,6 +1032,13 @@ public synchronized void start() throws Exception { if (getTransportMode() == TransportMode.HTTP3) { Http3Availability.ensureAvailable(); getLogger().warning("HTTP/3 support is experimental"); + if ((getHttpsProxyHost() != null) || (getSocksProxyHost() != null)) { + // Proxying QUIC requires CONNECT-UDP (RFC 9298), not supported by Netty yet. + getLogger() + .info( + "HTTP/3 is not used through proxies: the HTTPS requests sent" + + " through a proxy use HTTP/1.1 over TCP"); + } } super.start(); group =