Re: CONNECT, origins, and Alt-Svc

Eric Orth <ericorth@google.com> Mon, 06 November 2023 12:41 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 82910C1CAFFC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 6 Nov 2023 04:41:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.257
X-Spam-Level:
X-Spam-Status: No, score=-15.257 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u7p4qrBsmcuf for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 6 Nov 2023 04:41:21 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8179BC1522CB for <httpbisa-archive-bis2Juki@ietf.org>; Mon, 6 Nov 2023 04:41:21 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1qzyu9-00CPEX-UP for ietf-http-wg-dist@listhub.w3.org; Mon, 06 Nov 2023 12:40:33 +0000
Resent-Date: Mon, 06 Nov 2023 12:40:33 +0000
Resent-Message-Id: <E1qzyu9-00CPEX-UP@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <ericorth@google.com>) id 1qzyu8-00CPDe-Jh for ietf-http-wg@listhub.w3.org; Mon, 06 Nov 2023 12:40:32 +0000
Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by titan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from <ericorth@google.com>) id 1qzyu6-00AGXW-RX for ietf-http-wg@w3.org; Mon, 06 Nov 2023 12:40:32 +0000
Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9c41e95efcbso637987166b.3 for <ietf-http-wg@w3.org>; Mon, 06 Nov 2023 04:40:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1699274426; x=1699879226; darn=w3.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=p7b8QlRcqfmSnbvhnUUjnbTBhqql7Xwq3pciowUmMRs=; b=tMh8Hj7bLFOFDnFZueHLKeC7+q1pH7zLl0TcjmMXQf2sOGtovbWGL3gmr88XiSQG3t 00w8zMZ05BqBDl3VWXgHeORM3RCpu+tbErZuQWsVvoUjx9nwO2SAycm21U+rlwHC2Deo desJeRJIzLShlqB0aoBnQoKf5k8AKwldebKGP94DtGSJ3VxoD8SC++cT4wyEkN9nbiva qQi+1NQa1uCDqDUEOqjp0hWnnuI44fhY2CSwoxcxkhomYVBmAabOJxSSchwaBZjRpSA4 gAQpbXZfNsVbNv9zVosz59Qr88ZvBwZYQC7rVeqpXcCA3NI9K/hIc+1XFnFFgbeU+Q0V op7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699274426; x=1699879226; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p7b8QlRcqfmSnbvhnUUjnbTBhqql7Xwq3pciowUmMRs=; b=HPAWyV4wNRhayKJE9ze928vCZOhXaDKKvjcGfdYAQYWNkbEsoEs0DI/YvFsjADjuZs 8r82OqBJWSWIevnYobkp8mKoQ+HtKiopoNW4gyw110HIjKys7b0KkyGoTyndS/WNhLuW F+4KIsGxobB0PpEZw5hw7Ci4OY2Vtu0jPsXSV5679nNujFLhK4oG61SjC3PpqXfPAs8p pzBw1EfUzukkXeREx2E7f+5FYE0Tq71KQFo528jNqRYGx8yyV/aZQ/ZIL83By1G57nyt NIxDZTlb11+d6d1CrRtqyaXZ0N0mrLlLq9AFD4c1+BlgcXdJNfvu+vMo+AKqZ/IGOuez HEQw==
X-Gm-Message-State: AOJu0YytlIiPhQl1g8FFR16U6DoKkYrn3+1ht/QpisxNvAzwCv0w6vWD GIsxF/RIQLzjnvu+T9zEvuPtJOfwqn5MpWtqYnZvFA==
X-Google-Smtp-Source: AGHT+IEB01iqtkG/P0feFaAMd84uuhoYPBPFu9wUZDs2jQQsj0x/uqbIj00k7qRXNZrFcgjeLGCqvryCyyZnT0RoFGM=
X-Received: by 2002:a17:907:3e91:b0:9a2:185b:5375 with SMTP id hs17-20020a1709073e9100b009a2185b5375mr12483282ejc.18.1699274426377; Mon, 06 Nov 2023 04:40:26 -0800 (PST)
MIME-Version: 1.0
References: <CAPDSy+7B47bLmFPKTs=a4TBp8A8wvWHkrYRGyBe7Dw0F_9j23Q@mail.gmail.com>
In-Reply-To: <CAPDSy+7B47bLmFPKTs=a4TBp8A8wvWHkrYRGyBe7Dw0F_9j23Q@mail.gmail.com>
From: Eric Orth <ericorth@google.com>
Date: Mon, 06 Nov 2023 07:40:12 -0500
Message-ID: <CAMOjQcG8kZ+SvozXiiXSDA=pNXD0JLc058YsLYSNKhWtZr2AXQ@mail.gmail.com>
To: David Schinazi <dschinazi.ietf@gmail.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="0000000000009020c406097b28bc"
Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=ericorth@google.com; helo=mail-ej1-x630.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=ericorth@google.com domain=google.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-19.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1qzyu6-00AGXW-RX eeb7fa2c80923047c97a1ac686c75ab7
X-Original-To: ietf-http-wg@w3.org
Subject: Re: CONNECT, origins, and Alt-Svc
Archived-At: <https://www.w3.org/mid/CAMOjQcG8kZ+SvozXiiXSDA=pNXD0JLc058YsLYSNKhWtZr2AXQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51561
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Mon, Nov 6, 2023 at 6:05 AM David Schinazi <dschinazi.ietf@gmail.com>
wrote:

> Howdy HTTP enthusiasts,
>
> As we're adding support for CONNECT-UDP in Chrome, we're having to answer
> the related question "ok I know which proxy I want to use, but do I use TCP
> or QUIC?".
>
> Right now, the only mechanisms we have to discover HTTP/3 support are
> Alt-Svc and the HTTPS RR. Both of these are defined in terms of origin*.
> CONNECT-UDP is defined in terms of origin so we're in good shape there.
> Same story for connect-tcp
> <https://datatracker.ietf.org/doc/draft-ietf-httpbis-connect-tcp/>. But
> for CONNECT we're in a weird spot. In CONNECT, there is no origin (or if
> there is, it applies to the target destination, not to the proxy). So it
> doesn't quite feel right for a proxy to send the Alt-Svc header on the
> response to a CONNECT request. Similarly, I'm not sure that if I get an
> HTTPS RR for the proxy hostname I'm allowed to use it for CONNECT. So
> there's no great way to know that a CONNECT proxy supports HTTP/3. So if a
> PAC file tells the browser to use "HTTPS proxy.example.org:443" then it's
> not clear to me how the browser should figure out if it can use HTTP/3.
> Here are some options:
>
> 1) Send the first CONNECT over HTTP/1 or 2, pretend that use of Alt-Svc
> applies to the proxy
>

Alt-Svc is a bit awkward because it can be ambiguous whether such a header
would apply to the proxy or the destination.


> 2) Query the HTTPS DNS RR and pretend that it applies to the proxy
>

I don't understand the issues with this or why any "pretending" is
required.  The proxy server has a scheme, host, and port.  A PAC config
arguably doesn't contain a full origin because it doesn't contain a scheme,
but since we then go and open an http or https connection to the server, I
would argue that we've simply inferred the scheme.  We can open https://
connections to that proxy, and I assume that gets authenticated using the
proxy server origin (somebody correct me if I'm wrong and something funky
is happening there).  All the DNS queries before sending a CONNECT request
are pretty unambiguously querying information about the proxy server, not
the destination.


> 3) Send an OPTIONS * request to the proxy and look for Alt-Svc
> 4) Try HTTP/3 for the first CONNECT request and fallback to TCP if
> anything fails (happy eyeballs style)
> 5) Create a new PAC script verb that means connect-tcp/connect-udp
> 6) Create a new PAC script verb that means HTTP/3
>
> None of these feel like great solutions. Does anyone have thoughts?
> David
>
>
> *well sort of. The HTTPS RR query doesn't include the port...
>

I don't understand what you mean.  HTTPS queries prepend the port when
non-default, so no, HTTPS queries include the port.