<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 3.1.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-pauly-masque-dns-proxy-status-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.15.0 -->
  <front>
    <title abbrev="Proxy-Status DNS Info">HTTP Proxy-Status Parameter for DNS Information</title>
    <seriesInfo name="Internet-Draft" value="draft-pauly-masque-dns-proxy-status-00"/>
    <author initials="T." surname="Pauly" fullname="Tommy Pauly">
      <organization>Apple, Inc.</organization>
      <address>
        <email>tpauly@apple.com</email>
      </address>
    </author>
    <date year="2022" month="October" day="04"/>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document defines an HTTP Proxy-Status Parameter that contains the IP address
and CNAME chain received over DNS that was used to establish the connection to the
next hop.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Source for this draft and an issue tracker can be found at
  <eref target="https://github.com/tfpauly/privacy-proxy"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>The Proxy-Status HTTP response field <xref target="PROXY-STATUS"/> allows proxies to convey
information about how a proxied request was handled in HTTP responses sent to clients.
It defines a set of parameters that provide information, such as the name of the next
hop.</t>
      <t>The Proxy-Status field can be sent by both forward proxies and gateways (or "reverse
proxies"). In the case of forward proxies, clients are requesting to establish TCP
connections (using the CONNECT method <xref target="HTTP"/>) and UDP connections
(using UDP proxying <xref target="CONNECT-UDP"/>) to a target server. This target server
can be specified using either a hostname or an IP address. When using a name instead
of an IP address, the forward proxy locally performs DNS resolution to resolve the
name to an IPv4 or IPv6 address using A or AAAA queries.</t>
      <t>Clients of forward proxies currently don't have visibility into the DNS resolution
that is performed on the proxy. If available, this information could be used by clients
to help make various decisions that are influenced by IP addresses and CNAME chains.
For example, some clients classify specific names and IP addresses as being used
for collecting data to track users (which can be used to influence policies for
HTTP cookies), or can recognize them as endpoints that ought to be blocked for
features like ad blocking or malware blocking. Without this information, proxying
using a forward proxy means that clients lose the ability to fully recognize servers
based on IP addresses and CNAME chains.</t>
      <t>It is possible for clients to perform DNS resolution before using a forward proxy,
and proxy using IP addresses, but this has several drawbacks: performing
DNS without using the proxy can lead a privacy regression, or a performance regression
if the addresses selected are not optimal for connectivity from the proxy; proxying
by IP address prevents the proxy from selecting the best address
(<xref target="HAPPY-EYEBALLS"/>); and if clients try to resolve via the proxy
using DNS over HTTPS (<xref target="DOH"/>), they can incur a performance hit by requiring
an extra round trip before being able to establish a connection.</t>
      <t>This document allows clients to receive the IP address and CNAME chain received from
DNS, without needing to perform DNS on the client, by including the information in
a Proxy-Status parameter (<xref target="dns-used"/>).</t>
      <section anchor="requirements">
        <name>Requirements</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="dns-used">
      <name>dns-used Parameter</name>
      <t>The dns-used parameter's value is a String that contains one or more IP addresses and/or
DNS names in a comma-separated list. The first item in the list SHOULD be the IP address
that was resolved using DNS and was used to open connectivity to the next hop. The
remaining items in the list SHOULD include all names received in CNAME records <xref target="DNS"/> or
AliasMode SVCB or HTTPS records <xref target="SVCB"/> during the course of resolving
the address. Since DNS names can include comma (<tt>,</tt>) characters in them, any commas that appear
in a DNS names MUST be represented using a percent-encoded <tt>%2C</tt> value instead.</t>
      <t>For example:</t>
      <sourcecode type="example"><![CDATA[
Proxy-Status: proxy.example.net; next-hop=target.example.com
    dns-used="2001:db8::1,tracker.example.com."
]]></sourcecode>
      <t>indicates that proxy.example.net, which used target.example.com as the next hop for this request, used
the IP address "2001:db8::1" to connect to the target, and encountered the CNAME "tracker.example.com."
in DNS resolution chain. Note that while this example includes both the next-hop and dns-used
parameters, dns-used can be included without including next-hop.</t>
      <t>The dns-used parameter only applies when DNS was used to resolve the next hop's name, and
does not apply in all situations. Clients can use the information in this parameter to determine
how to use the connection established through the proxy, but need to gracefully handle situations
in which this parameter is not present.</t>
    </section>
    <section anchor="sec-considerations">
      <name>Security Considerations</name>
      <t>The dns-used parameter does not include any DNSSEC information or imply that DNSSEC was used.
The information included in the parameter can only be trusted to be valid insofar as the client
trusts its proxy to provide accurate information. This information is intended to be used as
a hint, and SHOULD NOT be used for making security decisions about the identity resource access
through the proxy.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document registers the "dns-used" parameter
in the "HTTP Proxy-Status Parameters" registry
&lt;<eref target="https://www.iana.org/assignments/http-proxy-status"/>&gt;.</t>
      <dl>
        <dt>Name:</dt>
        <dd>
          <t>dns-used</t>
        </dd>
        <dt>Description:</dt>
        <dd>
          <t>A string containing the IP address used to establish the proxied connection
and the chain of CNAMEs that led to this IP address.</t>
        </dd>
        <dt>Reference:</dt>
        <dd>
          <t>This document</t>
        </dd>
      </dl>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="PROXY-STATUS">
          <front>
            <title>The Proxy-Status HTTP Response Header Field</title>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham">
              <organization/>
            </author>
            <author fullname="P. Sikora" initials="P." surname="Sikora">
              <organization/>
            </author>
            <date month="June" year="2022"/>
            <abstract>
              <t>This document defines the Proxy-Status HTTP response field to convey the details of an intermediary's response handling, including generated errors.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9209"/>
          <seriesInfo name="DOI" value="10.17487/RFC9209"/>
        </reference>
        <reference anchor="HTTP">
          <front>
            <title>HTTP Semantics</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding">
              <organization/>
            </author>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham">
              <organization/>
            </author>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke">
              <organization/>
            </author>
            <date month="June" year="2022"/>
            <abstract>
              <t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes. </t>
              <t>This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="97"/>
          <seriesInfo name="RFC" value="9110"/>
          <seriesInfo name="DOI" value="10.17487/RFC9110"/>
        </reference>
        <reference anchor="CONNECT-UDP">
          <front>
            <title>Proxying UDP in HTTP</title>
            <author fullname="D. Schinazi" initials="D." surname="Schinazi">
              <organization/>
            </author>
            <date month="August" year="2022"/>
            <abstract>
              <t>This document describes how to proxy UDP in HTTP, similar to how the HTTP CONNECT method allows proxying TCP in HTTP. More specifically, this document defines a protocol that allows an HTTP client to create a tunnel for UDP communications through an HTTP server that acts as a proxy.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9298"/>
          <seriesInfo name="DOI" value="10.17487/RFC9298"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner">
              <organization/>
            </author>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba">
              <organization/>
            </author>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="DNS">
          <front>
            <title>Common DNS Operational and Configuration Errors</title>
            <author fullname="D. Barr" initials="D." surname="Barr">
              <organization/>
            </author>
            <date month="February" year="1996"/>
            <abstract>
              <t>This memo describes errors often found in both the operation of Domain Name System (DNS) servers, and in the data that these DNS servers contain.  This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="1912"/>
          <seriesInfo name="DOI" value="10.17487/RFC1912"/>
        </reference>
        <reference anchor="SVCB">
          <front>
            <title>Service binding and parameter specification via the DNS (DNS SVCB and HTTPS RRs)</title>
            <author fullname="Benjamin M. Schwartz" initials="B. M." surname="Schwartz">
              <organization>Google</organization>
            </author>
            <author fullname="Mike Bishop" initials="M." surname="Bishop">
              <organization>Akamai Technologies</organization>
            </author>
            <author fullname="Erik Nygren" initials="E." surname="Nygren">
              <organization>Akamai Technologies</organization>
            </author>
            <date day="24" month="May" year="2022"/>
            <abstract>
              <t>   This document specifies the "SVCB" and "HTTPS" DNS resource record
   (RR) types to facilitate the lookup of information needed to make
   connections to network services, such as for HTTP origins.  SVCB
   records allow a service to be provided from multiple alternative
   endpoints, each with associated parameters (such as transport
   protocol configuration and keys for encrypting the TLS ClientHello).
   They also enable aliasing of apex domains, which is not possible with
   CNAME.  The HTTPS RR is a variation of SVCB for use with HTTP [HTTP].
   By providing more information to the client before it attempts to
   establish a connection, these records offer potential benefits to
   both performance and privacy.

   TO BE REMOVED: This document is being collaborated on in Github at:
   https://github.com/MikeBishop/dns-alt-svc
   (https://github.com/MikeBishop/dns-alt-svc).  The most recent working
   version of the document, open issues, etc. should all be available
   there.  The authors (gratefully) accept pull requests.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-dnsop-svcb-https-10"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="HAPPY-EYEBALLS">
          <front>
            <title>Happy Eyeballs Version 2: Better Connectivity Using Concurrency</title>
            <author fullname="D. Schinazi" initials="D." surname="Schinazi">
              <organization/>
            </author>
            <author fullname="T. Pauly" initials="T." surname="Pauly">
              <organization/>
            </author>
            <date month="December" year="2017"/>
            <abstract>
              <t>Many communication protocols operating over the modern Internet use hostnames.  These often resolve to multiple IP addresses, each of which may have different performance and connectivity characteristics.  Since specific addresses or address families (IPv4 or IPv6) may be blocked, broken, or sub-optimal on a network, clients that attempt multiple connections in parallel have a chance of establishing a connection more quickly.  This document specifies requirements for algorithms that reduce this user-visible delay and provides an example algorithm, referred to as "Happy Eyeballs".  This document obsoletes the original algorithm description in RFC 6555.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8305"/>
          <seriesInfo name="DOI" value="10.17487/RFC8305"/>
        </reference>
        <reference anchor="DOH">
          <front>
            <title>DNS Queries over HTTPS (DoH)</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman">
              <organization/>
            </author>
            <author fullname="P. McManus" initials="P." surname="McManus">
              <organization/>
            </author>
            <date month="October" year="2018"/>
            <abstract>
              <t>This document defines a protocol for sending DNS queries and getting DNS responses over HTTPS.  Each DNS query-response pair is mapped into an HTTP exchange.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8484"/>
          <seriesInfo name="DOI" value="10.17487/RFC8484"/>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA4VYf28buRH9n5+CVVBcAmgV25deE6Vpq8g+xEBsq5bSNjgc
GmqXkgivliq5K0UXJJ+ln6WfrG+G3F9K7uo/khWXHA7fvHkz3CRJRGnKXI/l
m8ViJmfOfjwm81KVlZcz5dRWl9rJlXXy8nYurws8bVVpbCHUcun0ftxfUk8S
mU0LLB7LzKlVmexUlR+TrfL/rnSSFT7Z8SrPq5KzM5GpUo9Fin/X1h3H0peZ
EGbnxrJ0lS8vzs5enF2IB308WJeNsQfcKnSZXJJ5IWCoyP6lcltgy6P2YmfG
8qfSpkPprSudXnk8Hbf08LMQqio31o2FTITEnyn8WC5GODC85JHg+8Jut8fO
qHXrsZzsdrkewoN0xIN6q0wON/mIf1X0dpTarRBJkki19KVTKTxcbIyXQKXa
6qKUmV6ZQnupit/EvdyoUqa2KBVcxC8tr2dSZZnT3gucWE5vJzdXMt3gvXQ6
1WavM2n3OoSLlx+Ul5XHcGmlBk7L3PgN24LhQqcUTHqHEVHoj6Xc2N0oeL81
WZZrIR4R3s5mFU+ms+i+x3wGOLWzhddyZXSeyU+ffje7v/vn+2S+mCzezV/d
/zh9cXH24vNnqfLcHrwkChhggL3hyV4fhWnpBeRsRb4cpIozM+wA+vhwpA2O
n2PMFP3dvfQEMBnNDZ78SFx38MbbUtqV3NUY+4ASttibTMuOCyBMlW6kCsAT
I2ghPwMmEWD6Copw+BSBXergyvIol7bcUBIdlMuac1P81iD8QR29fIwMGyCf
4JAWccbgyQjAh1Apz7uf2BjWh5TK6RoeU6z7sV5MZ6KNNfaqPM+B3end7e3V
dCEBxcZyzAhMjtX5+dnnz0/Yy3eXsw5ZvIgGaJjzmH5gaTSWYDxE+8VzsgBf
lCyVWwN5rx2OOJKcDb0xUUO206lZUbTDJtrATwcLG+vLEARHadMmwkj+Y6OL
OF2FQCFdSq0yAch6c4d86i6KR5nbFIw8yp12FPsgYphs86rODf611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