<?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.7.5 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-kazuho-httpbis-reverse-tunnel-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.19.4 -->
  <front>
    <title>Reverse Tunnel over HTTP</title>
    <seriesInfo name="Internet-Draft" value="draft-kazuho-httpbis-reverse-tunnel-00"/>
    <author fullname="Kazuho Oku">
      <organization>Fastly</organization>
      <address>
        <email>kazuhooku@gmail.com</email>
      </address>
    </author>
    <date year="2024" month="February" day="20"/>
    <workgroup>httpbis</workgroup>
    <keyword>internet-draft</keyword>
    <abstract>
      <?line 18?>

<t>This document specifies an HTTP extension to establish bi-directional byte
streams in the direction from servers to their clients, utilizing HTTP as a
tunneling mechanism. This approach not only facilitates communication between
servers located behind firewalls and their known clients but also introduces the
potential for these known clients to serve as relays. In such configurations,
clients can forward application protocol messages or relay TCP connections,
allowing servers to interact with any client on the Internet without direct
exposure.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Discussion of this document takes place on the
    HTTP Working Group mailing list (ietf-http-wg@w3.org),
    which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/"/>.</t>
      <t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/kazuho/draft-kazuho-httpbis-reverse-tunnel"/>.</t>
    </note>
  </front>
  <middle>
    <?line 30?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>In typical application protocols operating on top of TCP, clients initiate TCP
connections by specifying the server's IP address and the port number. However,
not all servers can accept incoming TCP connections directly.</t>
      <t>Presently, servers situated behind firewalls that block incoming TCP connections
often rely on virtual private networks (VPNs). These VPNs enable the passage of
packets initiating TCP connections to servers through encapsulation, effectively
bypassing firewall restrictions. This approach, however, compromises network
manageability and incurs performance penalties due to the additional routing and
encapsulation involved.</t>
      <t>This document proposes an alternative to utilizing VPNs by defining a method for
servers to establish connections to clients over HTTP, thereby creating
bi-directional byte streams for application protocols. Specifically, this
extension employs HTTP upgrades in HTTP/1.1 (<xref target="HTTP-SEMANTICS"/> Section 7.8) and
the "extended CONNECT" method in HTTP/2 <xref target="EXTENDED-CONNECT-H2"/> and
HTTP/3 <xref target="EXTENDED-CONNECT-H3"/> for the establishment of these byte
streams.</t>
      <t>Beyond better manageability and reduced performance overhead in comparison to
VPNs, this method of employing HTTP for tunnel establishment provides additional
advantages. It enables endpoints to utilize a variety of authentication schemes
that are native to HTTP, such as HTTP authentication and cookies. Furthermore,
it shifts client identification from relying on IP addresses and port numbers to
using URIs, thereby enhancing flexibility and integration with web technologies.</t>
      <t>As servers specify their clients using URIs, only clients known to a server can
communicate directly with it. Nevertheless, clients have the capability to
forward application protocol-level messages (e.g., HTTP requests) or relay TCP
connections they receive or accept from the Internet. Through such relay
mechanisms, servers hidden behind firewalls can effectively receive requests
from any client on the Internet, bridging the gap between restricted access and
global connectivity.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" 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>
      <?line -18?>

</section>
    <section anchor="the-protocol">
      <name>The Protocol</name>
      <t>To setup a reverse tunnel, a server connects to the client as specified by the
URI and issues an HTTP request.</t>
      <t>To signal the intent to establish a reverse tunnel, an upgrade token named
"reverse" is used.</t>
      <t>The method and the conveyor of the upgrade token are different between the HTTP
versions.</t>
      <section anchor="http11">
        <name>HTTP/1.1</name>
        <t>In HTTP/1.1, the HTTP upgrade mechanism (<xref target="HTTP-SEMANTICS"/> Section 7.8) is
used.</t>
        <t>The method of the issued request <bcp14>SHALL</bcp14> be "GET".</t>
        <t>The upgrade token is conveyed by the "Upgrade" header field, and once the
reverse tunnel is established successfully, the client responds with a 101
(Swithing Protocols) response.</t>
        <t><xref target="fig-tunnel-establishment"/> shows an exchange of HTTP/1.1 request and response
establishing a reverse tunnel. In this example, the Basic HTTP Authentication
Scheme <xref target="BASIC-AUTH"/> is used to authenticate the server.</t>
        <figure anchor="fig-tunnel-establishment">
          <name>Establishing Reverse Tunnel over HTTP/1.1</name>
          <artwork><![CDATA[
GET /reverse-endpoint HTTP/1.1
Host: example.com
Connection: upgrade
Upgrade: reverse
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

HTTP/1.1 101 Switching Protocols
Connection: upgrade
Upgrade: reverse

]]></artwork>
        </figure>
      </section>
      <section anchor="http2-and-http3">
        <name>HTTP/2 and HTTP/3</name>
        <t>In HTTP/2 and HTTP/3, extended CONNECT is used; see <xref target="EXTENDED-CONNECT-H2"/> and
<xref target="EXTENDED-CONNECT-H3"/>.</t>
        <t>In both HTTP versions, the method being used is "CONNECT" and the upgrade
token is conveyed by the ":protocol" pseudo header. Once the reverse tunnel is
established successfully, the client responds with a 200 (OK) response.</t>
      </section>
    </section>
    <section anchor="authentication">
      <name>Authentication</name>
      <t>When HTTPS is used for establishing the tunnel, clients (i.e., the nodes acting
as TLS <xref target="TLS"/> servers) <bcp14>SHOULD</bcp14> use one of the TLS-based authentication
schemes to identify themselves.</t>
      <t>Servers <bcp14>SHOULD</bcp14> authenticate themselves either by using one of the HTTP-based
authentication schemes; e.g., HTTP Authentication (<xref target="HTTP-SEMANTICS"/>
Section 11), or, when HTTPS is used, by using one of the TLS-based
authentication schemes.</t>
    </section>
    <section anchor="application-layer-protocol-negotiation">
      <name>Application-Layer Protocol Negotiation</name>
      <t>While TLS <xref target="TLS"/> can be used on top of an established tunnel, doing so might
not be necessary for ensuring the security of communication if the tunnel is
established via HTTPS, and the client side of the reverse tunnel also functions
as the client side of the application protocol in use. A typical scenario
involves an HTTPS reverse proxy serving as the client of a reverse tunnel. This
proxy terminates incoming TLS connections and decrypts the HTTP requests before
forwarding them through the reverse tunnel, which is secured by a separate TLS
connection.</t>
      <t>In these deployments, foregoing the use of TLS above the established tunnel can
yield performance benefits without compromising security. However, this approach
requires that endpoints negotiate the application protocol without relying on
the Application-Layer Protocol Negotiation <xref target="ALPN"/> performed during
the TLS handshake.</t>
      <t>To address this need, this document introduces an HTTP header-based mechanism
for negotiating the application protocol. It employs ALPN identifiers for naming
the application protocols, allowing for the selection of existing application
protocols without depending on TLS-based negotiation.</t>
      <section anchor="indicating-protocols-available-for-use">
        <name>Indicating Protocols Available for Use</name>
        <t>To indicate the application protocols that the server is willing to utilize, a
server <bcp14>MAY</bcp14> include an "ALPN" header field <xref target="ALPN-HEADER"/> in the HTTP
request that it issues. The "ALPN" header field carries a list of
application-protocol identifies that the server is willing to use.</t>
      </section>
      <section anchor="indicating-the-chosen-protocol">
        <name>Indicating the Chosen Protocol</name>
        <t>When a client receives an HTTP request with an "ALPN" header field, and if the
client decides to select one of the application protocols being offered, the
client includes a "Selected-ALPN" header field in the HTTP response.</t>
        <t>If the HTTP request does not include an "ALPN" header field, the client <bcp14>MUST NOT</bcp14>
send a "Selected-ALPN" header field.</t>
        <t>Syntax of the "Selected-ALPN" header field is as follows. The syntax reuses the
encoding of the "ALPN" header field, but always includes exactly one
application-protocol identifier that is being chosen.</t>
        <artwork><![CDATA[
Selected-ALPN = ALPN
]]></artwork>
        <t><xref target="fig-alpn-request"/> shows an exchange of HTTP/1.1 response and response that
sets up a tunnel for forwarding HTTP requests using HTTP/2, where tunnel server
is the origin and the tunnel client is the reverse proxy.</t>
        <figure anchor="fig-alpn-request">
          <name>Setting up a HTTP/2 Tunnel for forwarding HTTP Requests</name>
          <artwork><![CDATA[
GET /reverse-http-for-service/X HTTP/1.1
Host: example.com
Connection: upgrade
Upgrade: reverse
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
ALPN: h2, http%2F1.1

HTTP/1.1 101 Switching Protocols
Connection: upgrade
Upgrade: reverse
Selected-ALPN: h2

]]></artwork>
        </figure>
        <t>When a server sends an HTTP request with an "ALPN" header field but receives a
successful response without a "Selected-ALPN" header field, it could either be
an indication that the client chose an application protocol that the server did
not offer, or that the server could not determine which application protocol has
been chosen. Therefore, the client <bcp14>SHOULD NOT</bcp14> assume that an application
protocol other than the ones being offered has been selected.</t>
      </section>
    </section>
    <section anchor="relaying-connections">
      <name>Relaying Connections</name>
      <t>When a client is forwarding at the application protocol layer, it can utilize
mechanisms provided by the application protocol in use to convey the identity of
the actual client from which messages were received. For example, HTTP
intermediaries acting as reverse tunnel clients can add the "Forwarded" header
field <xref target="FORWARDED"/> to each request they relay.</t>
      <t>However, when the client acts as a transport-layer protocol relay (i.e.,
relaying TCP connections), it becomes the responsibility of the reverse tunnel
protocol to convey the 4 tuple of the TCP connection being relayed.</t>
      <section anchor="signalling-client-address">
        <name>Signalling Client Address</name>
        <t>Upon receiving a request to establish a reverse tunnel, a client acting as a
relay <bcp14>SHOULD</bcp14> match a connection to be relayed before sending a successful
response (i.e., 101 Switching Protocols or 200 OK, depending on the HTTP
protocol version in use). Once a connection has been matched, the client <bcp14>SHOULD</bcp14>
send a successful response with a "Forwarded" header field <xref target="FORWARDED"/>
carrying the identity of the TCP connection being relayed. After that, the
client begins relaying the bytes being sent and received between the tunnel and
the matched connection.</t>
        <t>The "Forwarded" header field <bcp14>SHOULD</bcp14> include the "by" parameter and the "for"
parameter to convey the 4 tuple of the TCP connection being relayed.</t>
        <t>If the client cannot immediately match a connection to be relayed, the client
<bcp14>MAY</bcp14> send an informational response of 100 (Continue) to acknowledge that it has
received the request but it is not yet ready to send a final response.</t>
        <t>This informational response <bcp14>MAY</bcp14> be sent more than once.</t>
        <t>When the client gives up waiting for a matching connection to become available,
the client <bcp14>SHOULD</bcp14> send a 204 (No Content) response to indicate that it
successfully processed the request, but a matching connection was not
available.</t>
        <t><xref target="fig-tcp-relay"/> illustrates an exchange of HTTP/1.1 messages to establish a
reverse TCP relay.</t>
        <figure anchor="fig-tcp-relay">
          <name>Establishing a TCP relay for SMTP</name>
          <artwork><![CDATA[
GET /.well-known/listen-tcp/0.0.0.0/25/ HTTP/1.1
Host: example.com
Connection: upgrade
Upgrade: reverse
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

HTTP/1.1 100 Continue

HTTP/1.1 101 Switching Protocols
Connection: upgrade
Upgrade: reverse
Forwarded: for=192.0.2.43

]]></artwork>
        </figure>
      </section>
      <section anchor="specifying-the-listening-address-and-port">
        <name>Specifying the Listening Address and Port</name>
        <t>Clients acting as relays that allow servers specify the listening address or
port <bcp14>SHOULD</bcp14> use the following URI Template <xref target="TEMPLATE"/> to define the
target URI on which they provide the service. Adopting this template simplifies
operations by ensuring a uniform method for configuring endpoints. Examples are
shown below:</t>
        <artwork><![CDATA[
https://example.com/.well-known/reverse/tcp/{listen_host}/{listen_port}/
https://example.org/listen/to/tcp?h={listen_host}&p={listen_port}
]]></artwork>
        <t>Furthermore, the use of the default template is <bcp14>RECOMMENDED</bcp14>, which is defined as
"https://$CLIENT_HOST:$CLIENT_PORT/.well-known/reverse/tcp/{listen_host}/{listen_port}/",
where $CLIENT_HOST and $CLIENT_PORT are the host and port of the client.</t>
        <t>The "listen_host" variable specifies the listening address. This variable <bcp14>MAY</bcp14>
contain an wildcard address.</t>
        <t>The "listen_port" variable specifies the listening port.</t>
        <t>The following requirements apply to the URI Template:</t>
        <ul spacing="normal">
          <li>
            <t>The URI Template <bcp14>MUST</bcp14> be a level 3 template or lower.</t>
          </li>
          <li>
            <t>The URI Template <bcp14>MUST</bcp14> be in absolute form and <bcp14>MUST</bcp14> include non-empty scheme,
authority, and path components.</t>
          </li>
          <li>
            <t>The path component of the URI Template <bcp14>MUST</bcp14> start with a slash ("/").</t>
          </li>
          <li>
            <t>All template variables <bcp14>MUST</bcp14> be within the path or query components of the URI.</t>
          </li>
          <li>
            <t>The URI template <bcp14>MUST</bcp14> contain the two variables "listen_host" and
"listen_port", and <bcp14>MAY</bcp14> contain other variables.</t>
          </li>
          <li>
            <t>The URI Template <bcp14>MUST NOT</bcp14> contain any non-ASCII Unicode characters and <bcp14>MUST</bcp14>
only contain ASCII characters in the range 0x21-0x7E inclusive (note that
percent-encoding is allowed; see <xref target="URI"/> Section 2.1).</t>
          </li>
          <li>
            <t>The URI Template <bcp14>MUST NOT</bcp14> use Reserved Expansion ("+" operator), Fragment
Expansion ("#" operator), Label Expansion with Dot-Prefix, Path Segment
Expansion with Slash-Prefix, nor Path-Style Parameter Expansion with
Semicolon-Prefix.</t>
          </li>
        </ul>
        <t>Servers <bcp14>SHOULD</bcp14> validate the requirements above; however, servers <bcp14>MAY</bcp14> use a
general-purpose URI Template implementation that lacks this specific validation.
If a server detects that any of the requirements above are not met by a URI
Template, the server <bcp14>MUST</bcp14> reject its configuration and abort the request without
sending it to the relaying client.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>Once approved, this document will request IANA to register the following entries
to the respective registries.</t>
      <t>To the "HTTP Upgrade Tokens" registry maintained at
<eref target="https://www.iana.org/assignments/http-upgrade-tokens">https://www.iana.org/assignments/http-upgrade-tokens</eref>:</t>
      <dl>
        <dt>Value:</dt>
        <dd>
          <t>reverse</t>
        </dd>
        <dt>Description:</dt>
        <dd>
          <t>Reverse Tunnel</t>
        </dd>
        <dt>Expected Version Tokens:</dt>
        <dd>
          <t>None</t>
        </dd>
        <dt>Reference:</dt>
        <dd>
          <t>this document</t>
        </dd>
      </dl>
      <t>To the "Hypertext Transfer Protocol (HTTP) Field Name Registry" maintained at
<eref target="https://www.iana.org/assignments/http-fields">https://www.iana.org/assignments/http-fields</eref>:</t>
      <dl>
        <dt>Field Name:</dt>
        <dd>
          <t>Selected-ALPN</t>
        </dd>
        <dt>Template:</dt>
        <dd>
          <t>None</t>
        </dd>
        <dt>Status:</dt>
        <dd>
          <t>permanent</t>
        </dd>
        <dt>Reference:</dt>
        <dd>
          <t>this document</t>
        </dd>
        <dt>Comments:</dt>
        <dd>
          <t>None</t>
        </dd>
      </dl>
      <t>To the "Well-Known URIs" registry maintained at
<eref target="https://www.iana.org/assignments/well-known-uris">https://www.iana.org/assignments/well-known-uris</eref>:</t>
      <dl>
        <dt>URI Suffix:</dt>
        <dd>
          <t>listen-tcp</t>
        </dd>
        <dt>Change Controller:</dt>
        <dd>
          <t>IETF</t>
        </dd>
        <dt>Reference:</dt>
        <dd>
          <t>this document</t>
        </dd>
        <dt>Status:</dt>
        <dd>
          <t>permanent</t>
        </dd>
        <dt>Related Information:</dt>
        <dd>
          <t>Includes all resources identified with the path prefix
"./well-known/listen-tcp/".</t>
        </dd>
      </dl>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="HTTP-SEMANTICS">
          <front>
            <title>HTTP Semantics</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <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="EXTENDED-CONNECT-H2">
          <front>
            <title>Bootstrapping WebSockets with HTTP/2</title>
            <author fullname="P. McManus" initials="P." surname="McManus"/>
            <date month="September" year="2018"/>
            <abstract>
              <t>This document defines a mechanism for running the WebSocket Protocol (RFC 6455) over a single stream of an HTTP/2 connection.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8441"/>
          <seriesInfo name="DOI" value="10.17487/RFC8441"/>
        </reference>
        <reference anchor="EXTENDED-CONNECT-H3">
          <front>
            <title>Bootstrapping WebSockets with HTTP/3</title>
            <author fullname="R. Hamilton" initials="R." surname="Hamilton"/>
            <date month="June" year="2022"/>
            <abstract>
              <t>The mechanism for running the WebSocket Protocol over a single stream of an HTTP/2 connection is equally applicable to HTTP/3, but the HTTP-version-specific details need to be specified. This document describes how the mechanism is adapted for HTTP/3.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9220"/>
          <seriesInfo name="DOI" value="10.17487/RFC9220"/>
        </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"/>
            <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"/>
            <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="ALPN">
          <front>
            <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
            <author fullname="S. Friedl" initials="S." surname="Friedl"/>
            <author fullname="A. Popov" initials="A." surname="Popov"/>
            <author fullname="A. Langley" initials="A." surname="Langley"/>
            <author fullname="E. Stephan" initials="E." surname="Stephan"/>
            <date month="July" year="2014"/>
            <abstract>
              <t>This document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake. For instances in which multiple application protocols are supported on the same TCP or UDP port, this extension allows the application layer to negotiate which protocol will be used within the TLS connection.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7301"/>
          <seriesInfo name="DOI" value="10.17487/RFC7301"/>
        </reference>
        <reference anchor="ALPN-HEADER">
          <front>
            <title>The ALPN HTTP Header Field</title>
            <author fullname="A. Hutton" initials="A." surname="Hutton"/>
            <author fullname="J. Uberti" initials="J." surname="Uberti"/>
            <author fullname="M. Thomson" initials="M." surname="Thomson"/>
            <date month="August" year="2015"/>
            <abstract>
              <t>This specification allows HTTP CONNECT requests to indicate what protocol is intended to be used within the tunnel once established, using the ALPN header field.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7639"/>
          <seriesInfo name="DOI" value="10.17487/RFC7639"/>
        </reference>
        <reference anchor="FORWARDED">
          <front>
            <title>Forwarded HTTP Extension</title>
            <author fullname="A. Petersson" initials="A." surname="Petersson"/>
            <author fullname="M. Nilsson" initials="M." surname="Nilsson"/>
            <date month="June" year="2014"/>
            <abstract>
              <t>This document defines an HTTP extension header field that allows proxy components to disclose information lost in the proxying process, for example, the originating IP address of a request or IP address of the proxy on the user-agent-facing interface. In a path of proxying components, this makes it possible to arrange it so that each subsequent component will have access to, for example, all IP addresses used in the chain of proxied HTTP requests.</t>
              <t>This document also specifies guidelines for a proxy administrator to anonymize the origin of a request.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7239"/>
          <seriesInfo name="DOI" value="10.17487/RFC7239"/>
        </reference>
        <reference anchor="TEMPLATE">
          <front>
            <title>URI Template</title>
            <author fullname="J. Gregorio" initials="J." surname="Gregorio"/>
            <author fullname="R. Fielding" initials="R." surname="Fielding"/>
            <author fullname="M. Hadley" initials="M." surname="Hadley"/>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
            <author fullname="D. Orchard" initials="D." surname="Orchard"/>
            <date month="March" year="2012"/>
            <abstract>
              <t>A URI Template is a compact sequence of characters for describing a range of Uniform Resource Identifiers through variable expansion. This specification defines the URI Template syntax and the process for expanding a URI Template into a URI reference, along with guidelines for the use of URI Templates on the Internet. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6570"/>
          <seriesInfo name="DOI" value="10.17487/RFC6570"/>
        </reference>
        <reference anchor="URI">
          <front>
            <title>An Extensible Message Format for Message Tracking Responses</title>
            <author fullname="E. Allman" initials="E." surname="Allman"/>
            <date month="September" year="2004"/>
            <abstract>
              <t>Message Tracking is expected to be used to determine the status of undelivered e-mail upon request. Tracking is used in conjunction with Delivery Status Notifications (DSN) and Message Disposition Notifications (MDN); generally, a message tracking request will be issued only when a DSN or MDN has not been received within a reasonable timeout period.</t>
              <t>This memo defines a MIME content-type for message tracking status in the same spirit as RFC 3464, "An Extensible Message Format for Delivery Status Notifications". It is to be issued upon a request as described in "Message Tracking Query Protocol". This memo defines only the format of the status information. An extension to SMTP to label messages for further tracking and request tracking status is defined in a separate memo. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3886"/>
          <seriesInfo name="DOI" value="10.17487/RFC3886"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="BASIC-AUTH">
          <front>
            <title>The 'Basic' HTTP Authentication Scheme</title>
            <author fullname="J. Reschke" initials="J." surname="Reschke"/>
            <date month="September" year="2015"/>
            <abstract>
              <t>This document defines the "Basic" Hypertext Transfer Protocol (HTTP) authentication scheme, which transmits credentials as user-id/ password pairs, encoded using Base64.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7617"/>
          <seriesInfo name="DOI" value="10.17487/RFC7617"/>
        </reference>
        <reference anchor="TLS">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <reference anchor="I-D.bt-httpbis-reverse-http-01">
          <front>
            <title>Reverse HTTP Transport</title>
            <author fullname="Benjamin M. Schwartz" initials="B. M." surname="Schwartz">
              <organization>Meta Platforms, Inc.</organization>
            </author>
            <author fullname="Tirumaleswar Reddy.K" initials="T." surname="Reddy.K">
              <organization>Nokia</organization>
            </author>
            <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
              <organization>Orange</organization>
            </author>
            <author fullname="Philipp S. Tiesel" initials="P. S." surname="Tiesel">
              <organization>SAP SE</organization>
            </author>
            <date day="23" month="October" year="2023"/>
            <abstract>
              <t>   This document defines a secure transport for HTTP in which the client
   and server roles are reversed.  This arrangement improves the origin
   server's protection from Layer 3 and Layer 4 denial-of-service
   attacks when an intermediary is in use.  It allows origin server's to
   be hosted without being publicly (and directly) accessible but allows
   clients to access these servers via an intermediary.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-bt-httpbis-reverse-http-01"/>
        </reference>
      </references>
    </references>
    <?line 400?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>This document is inspired by <xref target="I-D.bt-httpbis-reverse-http-01"/> and the
discussion at IETF 118.</t>
      <t>Thanks to Ben Schwartz for reviewing the initial version of the draft and
providing valuable feedback.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA8Vb63LjxpX+30/R4exFyhKUqJl4xrTHE44ulsoaSRY5di6V
cjWBJokIBLjohihaNX6WfZZ9sj2X7gZAUhqvk6okVcmQBLrP9TvfOd2KokjY
1GZ6IDu3+l6XRstxlec6kwV8kufj8U1HJEWcqwU8k5RqaqM79XM1L6K5tctJ
aqKS34ssvRcdHopYWT0ryvVAGpuI1Wwg3bMiXZYDacvK2KPDwy8Pj8SdXq+K
MhnINLe6zLWNaA9hrMqTn1RW5LDtWhuxTAfyr7aIu9IUpS311MC/1gv8x9+E
quy8KAdCRkLCf6ZVlrHA35Go8vquoh+Kcqby9Gdl0yIfyDNlbLamH/RCpdlA
smbFXfXHGX7Ri4uFyItyAS/ca1ie7BGNTj8Mr8YXx6OBvD07/rLfPxQiiiKp
JsaWKrZCjOepkWC1aqFzK81Sx+k01UaqnFaQ+sHq3IAQ0hZSg66TLDVzOUmj
JC11jOKpTE7WVoMhSq0WBuwj7VzL8LuclsVCGl2i8XEZ+DUtZZylsCXYprJp
lv6c5jPeUcHmgj2E3y10PAdLmEVPkqxquSwLFc9lXlhZ5NlaTlUMC1jwpJFg
hkWVpzHZTU60XWmdC793VqC/E/h+nuaJnIKEK5VlqG3ipLrLi1XuZZOTykqV
mQJ9XhZJFcMW8JxYFmAVm4Lm06LEbyAY22+CmrQrqlPqTK1NT17k0lQgeVzk
03RWlSSk6Qr/TgxGh/VWqkxQzcyrAQpDOBUZ2MIYNQMZYFNaVI6Pb3C5nC0N
a4E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