<?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" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-intarea-proxy-config-14" category="std" consensus="true" submissionType="IETF" xml:lang="en" number="10088" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <front>
    <title abbrev="Proxy Configuration PvDs">Communicating Proxy Configurations in Provisioning Domains</title>
    <seriesInfo name="RFC" value="10088"/>
    <author initials="T." surname="Pauly" fullname="Tommy Pauly">
      <organization>Apple, Inc.</organization>
      <address>
        <email>tpauly@apple.com</email>
      </address>
    </author>
    <author initials="D." surname="Damjanovic" fullname="Dragana Damjanovic">
      <organization>Microsoft</organization>
      <address>
        <email>ddamjanovic@microsoft.com</email>
      </address>
    </author>
    <author initials="Y." surname="Rosomakho" fullname="Yaroslav Rosomakho">
      <organization>Zscaler</organization>
      <address>
        <email>yrosomakho@zscaler.com</email>
      </address>
    </author>
    <date year="2026" month="December"/>
    <area>INT</area>
    <workgroup>intarea</workgroup>
    <abstract>
      
<t>This document defines a mechanism for accessing provisioning domain information
associated with a proxy, such as other proxy URIs that support different protocols
and information about which destinations are accessible using a proxy.</t>
    </abstract>
  </front>
  <middle>

<section anchor="introduction">
      <name>Introduction</name>
      <t>HTTP proxies that use the CONNECT method defined in <xref section="9.3.6" sectionFormat="of" target="RFC9110"/>
(often referred to as "forward" proxies) allow clients to open connections to
hosts via a proxy. These typically allow for TCP stream proxying, but can also support
UDP proxying <xref target="RFC9298"/> and IP packet proxying
<xref target="RFC9484"/>. The locations of these proxies are not just defined as
hostnames and ports, but can use URI templates <xref target="RFC6570"/>.</t>
      <t>In order to make use of multiple related proxies, clients need a way to understand
which proxies are associated with one another and which protocols can be used
to communicate with the proxies.</t>
      <t>Clients can also benefit from learning about additional information associated with
the proxy to optimize their proxy usage, such knowing that a proxy is configured
to only allow access to a limited set of destinations.</t>
      <t>These improvements to client behavior can be achieved through the use of
Provisioning Domains (PvDs). Provisioning Domains are defined in <xref target="RFC7556"/>
as consistent sets of network configuration information, which can include proxy
configuration details (<xref section="2" sectionFormat="of" target="RFC7556"/>). <xref section="4.3" sectionFormat="of" target="RFC8801"/> defines a JSON
<xref target="RFC8259"/> format for describing Provisioning Domain Additional Information,
which is an extensible dictionary of properties of the Provisioning Domain.</t>
      <t>This document defines several mechanisms to use PvDs to help clients understand how
to use proxies:</t>
      <ol spacing="normal" type="1"><li>
          <t>A way to fetch PvD Additional Information associated with a known proxy URI (<xref target="proxy-pvd"/>).</t>
        </li>
        <li>
          <t>A way to list one or more proxy URIs in a PvD, allowing clients to
learn about other proxy options given a known proxy (<xref target="proxy-enumeration"/>).</t>
        </li>
        <li>
          <t>A way to define the set of destinations that are accessible through the
proxy (<xref target="destinations"/>).</t>
        </li>
      </ol>
      <t>Using this mechanism, a client can learn that a legacy insecure HTTP proxy that
the client is configured with is also accessible using HTTPS. In this way,
clients can upgrade to a more secure connection to the proxy.</t>
      <section anchor="background">
        <name>Background</name>
        <t>Non-standard mechanisms for proxy configuration and discovery have been
used historically, some of which are described in <xref target="RFC3040"/>.
Proxy Auto Configuration (PAC) files (<xref section="6.2" sectionFormat="of" target="RFC3040"/>) are JavaScript
scripts that take URLs as input and provide an output of a proxy configuration
to use. The Web Proxy Auto-Discovery Protocol (WPAD) (<xref section="6.4" sectionFormat="of" target="RFC3040"/>) allows
networks to advertise proxies to use by advertising a PAC file. This solution
uses the DHCPv4 option 252, reserved for Private Use according to
<xref section="2.1" sectionFormat="of" target="RFC2939"/>. These common (but non-standard) mechanisms
only support defining proxies by hostname and port, and do not support configuring
a full URI template <xref target="RFC6570"/>.</t>
        <t>The mechanisms defined in this document are intended to offer a standard
alternative that works for URI-based proxies and avoids dependencies
on executing JavaScript scripts, which are prone to implementation inconsistencies
and security vulnerabilities.</t>
      </section>
      <section anchor="requirements-keywords">
        <name>Requirements Keywords</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>

</section>
    </section>
    <section anchor="proxy-pvd">
      <name>Fetching PvD Additional Information for Proxies</name>
      <t>This document defines a way to fetch PvD Additional Information associated with
a proxy. This PvD describes the properties of the network accessible through the proxy.</t>
      <t>Clients fetch PvD Additional Information associated with a proxy by issuing
an HTTP GET request for a PvD URI using the "application/pvd+json" media
type as defined in <xref section="4.1" sectionFormat="of" target="RFC8801"/>. The fetch <bcp14>MUST</bcp14> use the "https" scheme.</t>
      <t><xref target="RFC8801"/> defines the well-known PvD URI that uses a path of "/.well-known/pvd" and is
served on the standard port for HTTP over TLS (HTTPS), port 443. When a client is provisioned
with the hostname of a proxy for
which it wants to look up PvD Additional Information, the client <bcp14>SHALL</bcp14> use the
well-known PvD URI using the host authority of the proxy. A client can also be directly
configured with a HTTPS URI on which to fetch the PvD Information, in which case, the
fetch <bcp14>SHALL</bcp14> be made to that configured URI.</t>
      <t>A client <bcp14>MAY</bcp14> cache the information it obtained from PvD Additional Information, but it
<bcp14>MUST</bcp14> discard cached information if:</t>
      <ul spacing="normal">
        <li>
          <t>The current time is beyond the "expires" value defined in <xref section="4.3" sectionFormat="of" target="RFC8801"/>.</t>
        </li>
        <li>
          <t>A new Sequence Number for that PvD is received in a Router Advertisement (RA).</t>
        </li>
      </ul>
      <t>To avoid synchronized queries toward the server hosting the PvD Additional Information
when an object expires, clients <bcp14>MUST</bcp14> apply a randomized backoff as specified in <xref section="4.1" sectionFormat="of" target="RFC8801"/>.</t>
      <t>For example, a client would issue the following request for the PvD associated
with "https://proxy.example.org/masque{?target_host,target_port}":</t>
      <sourcecode type="http-message"><![CDATA[
:method = GET
:scheme = https
:authority = proxy.example.org
:path = /.well-known/pvd
accept = application/pvd+json
]]></sourcecode>
      <t>A client would send the same request as above for the PvD
associated with an HTTP CONNECT proxy on "proxy.example.org:8080".
Note that the client will not make the GET request for the PvD to port 8080, but
to port 443.</t>
      <t>Note that all proxies that are co-located on the same host share the same PvD
Additional Information. Proxy deployments that need separate PvD configuration properties
<bcp14>MUST</bcp14> use different hosts.</t>
      <t>PvD Additional Information is required to contain the "identifier", "expires", and
"prefixes" keys. For proxy PvDs as defined in this document, the "identifier" <bcp14>MUST</bcp14>
match the hostname of the HTTP proxy. The "prefixes" array <bcp14>MUST</bcp14> be empty for cases when the PvD identifier is not provided by a Router Advertisement as defined in <xref target="RFC8801"/>.</t>
      <section anchor="svcparamkey">
        <name>Discovery via HTTPS/SVCB Records</name>
        <t>To allow clients to determine whether PvD Additional Information is available for a particular
named host (which allows fetching proxy information, as well as any other information in the PvD),
this document defines a new SvcParamKey in HTTPS and Service Binding (SVCB) DNS records defined in <xref target="RFC9460"/>.</t>
        <t>Presence of this SvcParamKey, named <tt>pvd</tt>, indicates that the host supports PvD discovery via
the well-known PvD URI defined in <xref section="4.1" sectionFormat="of" target="RFC8801"/>. The presence of this key in an HTTPS
or SVCB record signals that PvD Additional Information can be fetched using the "https"
scheme from the host on port 443 using the well-known path. The value of the <tt>pvd</tt> SvcParamKey
<bcp14>MUST</bcp14> be empty.</t>
        <t>A client receiving a DNS record like the following:</t>
        <sourcecode type="dns-rr"><![CDATA[
proxy.example.org. 3600 IN HTTPS 1 . alpn="h3,h2" pvd
]]></sourcecode>
        <t>can interpret the presence of the <tt>pvd</tt> key as an indication that it <bcp14>MAY</bcp14> perform a PvD fetch from
"https://proxy.example.org/.well-known/pvd" using the HTTP GET method.</t>
        <t>This key is useful for detecting proxy configurations when looking up a DNS
record for a known proxy name, but is a generic hint that PvD Additional Information
is available. Future extensions to PvD Additional Information can also take advantage
of this discovery mechanism.</t>
        <t>This hint is advisory; clients <bcp14>MAY</bcp14> still attempt to fetch PvD Additional Information even if
<tt>pvd</tt> SvcParamKey is not present.</t>
        <t>The <tt>pvd</tt> SvcParamKey is registered with IANA as described in <xref target="svcparamkey-iana"/>.</t>
      </section>
    </section>
    <section anchor="proxy-enumeration">
      <name>Enumerating Proxies Within a PvD</name>
      <t>This document defines a new PvD Additional Information key, <tt>proxies</tt>, that
is an array of dictionaries, where each dictionary in the array defines
a single proxy that is available as part of the PvD (see <xref target="proxies-key-iana"/>).
Each proxy is defined by a proxy protocol and a proxy location (i.e., a hostname and port or a URI template
<xref target="RFC6570"/>), along with other optional keys.</t>
      <t>When a PvD that contains the <tt>proxies</tt> key is fetched from a known proxy
using the method described in <xref target="proxy-pvd"/>, the <tt>proxies</tt> array describes
proxies that can be used in addition to the known proxy. The proxies may
potentially supporting other protocols.</t>
      <t>Such cases are useful for informing clients of related proxies as a discovery
method with the assumption that the client already is aware of one proxy.
Many historical methods of configuring a proxy only allow configuring
a single hostname and port for the proxy. A client can attempt to fetch the
PvD information from the well-known URI to learn the list of complete
URIs that support non-default protocols, such as <xref target="RFC9298"/> and
<xref target="RFC9484"/>.</t>
      <section anchor="proxy-dictionary-keys">
        <name>Proxy Dictionary Keys</name>
        <t>This document defines two required keys for the sub-dictionaries in the
<tt>proxies</tt> array: <tt>protocol</tt> and <tt>proxy</tt>. There are also optional keys, including
<tt>mandatory</tt>, <tt>alpn</tt>, and <tt>identifier</tt>. Other optional keys (keys defined in
future extensions or proprietary key defined in <xref target="proxy-proprietary-keys"/>) can be added to the
dictionary to further define or restrict the use of a proxy. The keys
are registered with IANA as described in <xref target="proxy-info-iana"/> with the initial
content provided below.</t>
        <table anchor="proxy-information-keys-table">
          <name>Initial Proxy Information PvD Keys Registry Contents</name>
          <thead>
            <tr>
              <th align="left">JSON Key</th>
              <th align="left">Optional/Required</th>
              <th align="left">Description</th>
              <th align="left">Type</th>
              <th align="left">Example</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">protocol</td>
              <td align="left">required</td>
              <td align="left">The protocol used to communicate with the proxy</td>
              <td align="left">String</td>
              <td align="left">"connect-udp"</td>
            </tr>
            <tr>
              <td align="left">proxy</td>
              <td align="left">required</td>
              <td align="left">String containing the URI template or host and port of the proxy, depending on the format defined by the protocol</td>
              <td align="left">String</td>
              <td align="left">"https://<br/>example.org:4443/<br/>masque/{?target_host,<br/>target_port}"</td>
            </tr>
            <tr>
              <td align="left">mandatory</td>
              <td align="left">optional</td>
              <td align="left">An array of optional keys that client must understand and process to use this proxy</td>
              <td align="left">Array of Strings</td>
              <td align="left">["example_key"]</td>
            </tr>
            <tr>
              <td align="left">alpn</td>
              <td align="left">optional</td>
              <td align="left">An array of Application-Layer Protocol Negotiation protocol identifiers</td>
              <td align="left">Array of Strings</td>
              <td align="left">["h3","h2"]</td>
            </tr>
            <tr>
              <td align="left">identifier</td>
              <td align="left">optional</td>
              <td align="left">A string used to refer to the proxy, which can be referenced by other dictionaries, such as entries in <tt>proxy-match</tt></td>
              <td align="left">String</td>
              <td align="left">"udp-proxy"</td>
            </tr>
          </tbody>
        </table>
        <t>The values for the <tt>protocol</tt> key are defined in the "Proxy Protocol PvD Values" registry (<xref target="proxy-protocol-iana"/>) with the initial contents provided below.
For consistency, any new proxy types that use HTTP Upgrade Tokens (and use
the <tt>:protocol</tt> pseudo-header) <bcp14>MUST</bcp14> define the <tt>protocol</tt> value to match
the Upgrade Token / <tt>:protocol</tt> value. Extensions to proxy types that use
the same HTTP Upgrade Tokens ought to be covered by the same <tt>protocol</tt> value;
if there are properties specific to an extension, the extensions can either
define new optional keys or rely on negotiation within the protocol to discover
support.</t>
        <table anchor="proxy-protocol-value-table">
          <name>Initial PvD Proxy Protocol Registry Contents</name>
          <thead>
            <tr>
              <th align="left">Proxy Protocol</th>
              <th align="left">Proxy Location Format</th>
              <th align="left">Reference</th>
              <th align="left">Notes</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">socks5</td>
              <td align="left">host:port</td>
              <td align="left">
                <xref target="RFC1928"/></td>
              <td align="left"></td>
            </tr>
            <tr>
              <td align="left">http-connect</td>
              <td align="left">host:port</td>
              <td align="left">
                <xref section="9.3.6" sectionFormat="of" target="RFC9110"/></td>
              <td align="left">Standard CONNECT method, using unencrypted HTTP to the proxy</td>
            </tr>
            <tr>
              <td align="left">https-connect</td>
              <td align="left">host:port</td>
              <td align="left">
                <xref section="9.3.6" sectionFormat="of" target="RFC9110"/></td>
              <td align="left">Standard CONNECT method, using TLS-protected HTTP to the proxy</td>
            </tr>
            <tr>
              <td align="left">connect-udp</td>
              <td align="left">URI template</td>
              <td align="left">
                <xref target="RFC9298"/></td>
              <td align="left"></td>
            </tr>
            <tr>
              <td align="left">connect-ip</td>
              <td align="left">URI template</td>
              <td align="left">
                <xref target="RFC9484"/></td>
              <td align="left"></td>
            </tr>
            <tr>
              <td align="left">connect-tcp</td>
              <td align="left">URI template</td>
              <td align="left">
                <xref target="I-D.ietf-httpbis-connect-tcp"/></td>
              <td align="left"></td>
            </tr>
          </tbody>
        </table>
        <t>The value of <tt>proxy</tt> depends on the Proxy Location Format defined by proxy protocol.
The types defined here either use a host as defined in <xref section="3.2.2" sectionFormat="of" target="RFC3986"/> and port,
or a full URI template.</t>
        <t>The value of the <tt>mandatory</tt> key is an array of keys that the client must understand and process to be
able to use the proxy. A client that does not understand a key from the array or cannot fully process
the value of a key from the array <bcp14>MUST</bcp14> ignore the entire proxy dictionary.</t>
        <t>The <tt>mandatory</tt> array can contain keys that are either:</t>
        <ul spacing="normal">
          <li>
            <t>registered in an IANA registry, defined in <xref target="proxy-info-iana"/> and marked as optional, or</t>
          </li>
          <li>
            <t>proprietary, as defined in <xref target="proxy-proprietary-keys"/>.</t>
          </li>
        </ul>
        <t>The <tt>mandatory</tt> array <bcp14>MUST NOT</bcp14> include any entries that are not present in the sub-dictionary.</t>
        <t>If the <tt>alpn</tt> key is present, it provides a hint for the Application-Layer Protocol Negotiation
(ALPN) <xref target="RFC7301"/> protocol identifiers associated with this server. For HTTP proxies,
this can indicate if the proxy supports HTTP/3, HTTP/2, etc.</t>
        <t>The value of the <tt>identifier</tt> key is a string that can be used to refer to a particular
proxy from other dictionaries, specifically those defined in <xref target="destinations"/>. The
string value is an arbitrary non-empty JSON string using UTF-8 encoding
as discussed in <xref section="8.1" sectionFormat="of" target="RFC8259"/>. Characters that need to be escaped in JSON strings
per <xref section="7" sectionFormat="of" target="RFC8259"/> are <bcp14>NOT RECOMMENDED</bcp14>, as they can lead to difficulties in
string comparisons as discussed in <xref section="8.3" sectionFormat="of" target="RFC8259"/>. Identifier values <bcp14>MAY</bcp14> be duplicated
across different proxy dictionaries in the <tt>proxies</tt> array. References to a particular identifier
apply to the set of proxies sharing that identifier. Proxies without the <tt>identifier</tt> key are
expected to accept any traffic since their destinations cannot be contained in <tt>proxy-match</tt> array defined
in <xref target="destinations"/>. Proxies with <tt>identifier</tt> keys are expected to accept traffic based on
matching rules in the <tt>proxy-match</tt> array and <bcp14>MUST NOT</bcp14> be used if they are not included in
the <tt>proxy-match</tt> array.</t>
      </section>
      <section anchor="proxy-proprietary-keys">
        <name>Proprietary Keys in Proxy Configurations</name>
        <t>Implementations <bcp14>MAY</bcp14> include proprietary or vendor-specific keys in the sub-dictionaries of the <tt>proxies</tt>
array to convey additional proxy configuration information not defined in this specification.</t>
        <t>A proprietary key <bcp14>MUST</bcp14> contain at least one underscore character ("_") as a delimiter in the string, with
characters both before and after the underscore. The rightmost underscore serves
as a separator between a vendor-specific namespace and the key name; i.e., the string to the right of the
rightmost underscore is the key name and the string to the left of the rightmost underscore specifies the
vendor-specific namespace. For example, "example_tech_authmode" could be a proprietary key indicating an
authentication mode defined by a vendor named "Example Tech".</t>
        <t>When combined with <tt>mandatory</tt> array, this mechanism allows implementations to extend proxy metadata while
maintaining interoperability and ensuring safe fallback behavior for clients that do not support a given
extension.</t>
      </section>
      <section anchor="example">
        <name>Example</name>
        <t>Given a known HTTP CONNECT proxy Fully Qualified Domain Name (FQDN), "proxy.example.org", a client could
request PvD Additional Information with the following request:</t>
        <sourcecode type="http-message"><![CDATA[
:method = GET
:scheme = https
:authority = proxy.example.org
:path = /.well-known/pvd
accept = application/pvd+json
]]></sourcecode>
        <t>If the proxy has a PvD definition for this FQDN, it would return the following
response to indicate a PvD that has two related proxy URIs.</t>
        <sourcecode type="http-message"><![CDATA[
:status = 200
content-type = application/pvd+json
content-length = 322

{
  "identifier": "proxy.example.org.",
  "expires": "2026-06-23T06:00:00Z",
  "prefixes": [],
  "proxies": [
    {
      "protocol": "http-connect",
      "proxy": "proxy.example.org:80"
    },
    {
      "protocol": "connect-udp",
      "proxy":
        "https://proxy.example.org/masque{?target_host,target_port}"
    }
  ]
}
]]></sourcecode>
        <t>From this response, the client would learn the URI template of the proxy that supports UDP using <xref target="RFC9298"/>,
at "https://proxy.example.org/masque{?target_host,target_port}".</t>
      </section>
    </section>
    <section anchor="destinations">
      <name>Destination Accessibility Information for Proxies</name>
      <t>Destination accessibility information is used when only a subset of destinations is reachable through
a proxy. Destination restrictions are often used in VPN tunnel configurations such as split
DNS in Internet Key Exchange Protocol Version 2 (IKEv2) <xref target="RFC8598"/>, and in other proxy configuration mechanisms like PAC files (see <xref target="background"/>).</t>
      <t>PvD Additional Information can be used to indicate that a set of proxies only allows access to
a limited set of destinations.</t>
      <t>To support determining which traffic is supported by different proxies, this document defines
a new PvD Additional Information key <tt>proxy-match</tt>. This key has a value that is an array of
dictionaries, where each sub-dictionary describes a rule for matching traffic to one or more
proxies, or excluding the traffic from all proxies described in the PvD. These sub-dictionaries are referred
to as "destination rules", since they define rules about which destinations can be accessed
for a particular proxy or set of proxies.</t>
      <section anchor="destination-rule-keys">
        <name>Destination Rule Keys</name>
        <t>This document defines four keys for destination rules. Any destination rule <bcp14>MUST</bcp14> contain
the <tt>proxies</tt> key. Values corresponding to the <tt>proxies</tt> key may be either an empty array,
which implies that no proxy defined in this PvD can process matching traffic, or an array of strings
with at least one proxy <tt>identifier</tt> string. A destination rule <bcp14>MAY</bcp14> contain one or more additional
keys that describe destination properties. If no destination property keys are present, the
rule matches all destinations, subject to proxy protocol and proxy applicability checks
described in <xref target="using-destination-rules"/>. Each destination property key's value <bcp14>MUST</bcp14> be an
array with at least one entry.</t>
        <t>Extensions or proprietary deployments can define new keys to describe destination properties.
Any destination rules that include keys not known to the client, or values that cannot be
parsed, <bcp14>MUST</bcp14> be ignored in their entirety.</t>
        <t>Destination rule keys are registered with IANA as defined in <xref target="proxy-destination-iana"/>
with the initial content provided below.</t>
        <table anchor="destination-rule-keys-table">
          <name>Initial Contents of Proxy Destination Rule PvD Keys Registry</name>
          <thead>
            <tr>
              <th align="left">JSON Key</th>
              <th align="left">Optional/Required</th>
              <th align="left">Description</th>
              <th align="left">Type</th>
              <th align="left">Example</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">proxies</td>
              <td align="left">required</td>
              <td align="left">An array of strings that match <tt>identifier</tt> values from the top-level <tt>proxies</tt> array</td>
              <td align="left">Array of Strings</td>
              <td align="left">["tcp-proxy", "udp-proxy"]</td>
            </tr>
            <tr>
              <td align="left">domains</td>
              <td align="left">optional</td>
              <td align="left">An array of FQDNs and wildcard DNS domains</td>
              <td align="left">Array of Strings</td>
              <td align="left">["www.example.com", "*.internal.example.com"]</td>
            </tr>
            <tr>
              <td align="left">subnets</td>
              <td align="left">optional</td>
              <td align="left">An array of IPv4 and IPv6 addresses and subnets</td>
              <td align="left">Array of Strings</td>
              <td align="left">["2001:db8::1", "192.0.2.0/24"]</td>
            </tr>
            <tr>
              <td align="left">ports</td>
              <td align="left">optional</td>
              <td align="left">An array of TCP and UDP port ranges</td>
              <td align="left">Array of Strings</td>
              <td align="left">["80", "443", "1024-65535"]</td>
            </tr>
          </tbody>
        </table>
        <t>The <tt>domains</tt> array includes specific FQDNs and zones that are either accessible using specific proxy (for
rules with non-empty <tt>proxies</tt> array) or non-accessible through any proxies (for rules with empty <tt>proxies</tt> array).
Wildcards are allowed only as prefixes (<tt>*.</tt>). A wildcard prefix is used to indicate matching entire domains or subdomains instead of
specific hostnames. Note that this can be used to match multiple levels of subdomains. For example, "*.example.com"
matches "internal.example.com" as well as "www.public.example.com".
Entries that include the wildcard prefix also match an FQDN that only contains
the string after the prefix with no subdomain. So, an entry "*.example.com"
in the <tt>domains</tt> array of a <tt>proxy-match</tt> rule would match the FQDN "example.com".
This is done to prevent commonly needing to include both "*.example.com" and "example.com"
in the <tt>domains</tt> array of a <tt>proxy-match</tt> rule.
Matches are performed against absolute domain names, independent of the client's configured DNS search suffixes.
Clients <bcp14>MUST NOT</bcp14> apply local DNS suffix search rules when interpreting <tt>domains</tt> entries. A
string <bcp14>MAY</bcp14> have a trailing dot ("."); it does not affect the matching logic.</t>
        <t>The <tt>subnets</tt> array includes IPv4 and IPv6 address literals, as well as IPv4 address subnets
represented using Classless Inter-Domain Routing (CIDR) notation <xref target="RFC4632"/> and IPv6 address prefixes (<xref section="2.3" sectionFormat="of" target="RFC4291"/>).
Subnet-based destination information can apply to cases where
applications are communicating directly with an IP address (without having resolved a DNS name)
as well as cases where an application resolved a DNS name to a set of IP addresses. Note that
if destination rules include an empty <tt>proxies</tt> array (indicating that no proxy is applicable for
this subnet), an application can only reliably follow this destination rule if it resolves DNS
names prior to proxying.</t>
        <t>The <tt>ports</tt> array includes specific ports (used for matching TCP and/or UDP ports), as well as
ranges of ports written with a low port value and a high port value, with a <tt>-</tt> in between.
For example, "1024-2048" matches all ports from 1024 to 2048, including port 1024 and 2048.
If the <tt>ports</tt> key is not present, all ports are assumed to match. The array may
contain individual port numbers (such as "80") or inclusive ranges of ports.</t>
      </section>
      <section anchor="using-destination-rules">
        <name>Using Destination Rules</name>
        <t>The destination rules can be used to determine which traffic can be sent through proxies and
which specific set of proxies to use for any particular connection. By evaluating the rules in
order, a consistent behavior for usage can be achieved.</t>
        <t>Rules in the <tt>proxy-match</tt> array are provided in order of priority, such that a client
can evaluate the rules from the first in the array to the last in the array and attempt
using the matching proxy or proxies from the earliest matching rule first. If earliest matching
rule has empty array of <tt>proxies</tt>, a client <bcp14>MUST NOT</bcp14> send matching traffic to any proxy defined
in this PvD.</t>
        <t>In order to match a destination rule in the <tt>proxy-match</tt> array, all properties <bcp14>MUST</bcp14> apply. For
example, if a destination rule includes a <tt>domains</tt> array and a <tt>ports</tt> array, traffic that matches
the rule needs to match at least one of the entries in the <tt>domains</tt> array and one of the entries in the
<tt>ports</tt> array. In addition, a destination rule is considered a match only if at least one of the
associated proxy identifiers is supported by the client (the client understands all mandatory keys in the
protocol description) and supports the protocol required by the connection attempt (for
example, "connect-udp" for UDP traffic). If no listed proxy identifier is applicable,
the rule <bcp14>MUST</bcp14> be treated as not matching and the client continues evaluation of subsequent rules.</t>
        <t>A matched rule will then either point to one or more proxy <tt>identifier</tt> values, which correspond
to proxies defined in the array from <xref target="proxy-enumeration"/>, or instruct the client to not send the
matching traffic to any proxy. If a matching rule contains more than one <tt>identifier</tt>, the client
<bcp14>MUST</bcp14> treat the array as an ordered list, where the first <tt>identifier</tt> is the most preferred.
Multiple proxy dictionaries can contain the same <tt>identifier</tt> value. In this case, the client
can choose any of the proxies; however, the client ought to prefer using the same proxy for the consecutive requests
to the same proxy <tt>identifier</tt> to increase connection reuse.</t>
        <t>Entries listed in a <tt>proxy-match</tt> object <bcp14>MUST NOT</bcp14> expand the set of destinations that a client is
willing to send to a particular proxy. The array can only narrow the set of destinations
that the client is willing to send through the proxy. For example, if the client
has a local policy to only send requests for "*.example.com" to a proxy
"proxy.example.com", and <tt>domains</tt> array of a <tt>proxy-match</tt> object contains "internal.example.com" and
"other.company.com", the client would end up only proxying "internal.example.com"
through the proxy.</t>
      </section>
      <section anchor="proprietary-keys-in-destination-rules">
        <name>Proprietary Keys in Destination Rules</name>
        <t>Implementations <bcp14>MAY</bcp14> include proprietary or vendor-specific keys in destination rules to define custom matching logic
not specified in this document.</t>
        <t>Similar to proprietary keys in proxy dictionaries (<xref target="proxy-proprietary-keys"/>), a proprietary key in destination
rule <bcp14>MUST</bcp14> contain at least one underscore character ("_"), which separates a vendor-specific namespace from the key name.
For example, "acme_processid" could be a key used to apply rules only to traffic of a specific process identifier as
defined by a vendor named "acme".</t>
        <t>Clients that encounter a proprietary key they do not recognize <bcp14>MUST</bcp14> ignore the entire destination rule in which the
key appears. This ensures that unknown or unsupported matching logic does not inadvertently influence proxy selection
or bypass security controls.</t>
      </section>
      <section anchor="examples">
        <name>Examples</name>
        <t>In the following example, two proxies are defined with a common identifier ("default_proxy") with
a single destination rule for "*.internal.example.org".</t>
        <sourcecode type="json"><![CDATA[
{
  "identifier": "proxy.example.org.",
  "expires": "2026-06-23T06:00:00Z",
  "prefixes": [],
  "proxies": [
    {
      "protocol": "http-connect",
      "proxy": "proxy.example.org:80",
      "identifier": "default_proxy"
    },
    {
      "protocol": "http-connect",
      "proxy": "proxy2.example.org:80",
      "identifier": "default_proxy"
    }
  ],
  "proxy-match": [
    {
      "domains": [ "*.internal.example.org" ],
      "proxies": [ "default_proxy" ]
    }
  ]
}
]]></sourcecode>
        <t>The client could then choose to use either proxy associated with the "default_proxy" identifier
for accessing TCP hosts that fall within the "*.internal.example.org" zone. This would include the
hostnames "internal.example.org", "foo.internal.example.org", "www.bar.internal.example.org", and
all other hosts within "internal.example.org". The client will use the same proxy for the following
requests to hosts falling into the "*.internal.example.org" zone to increase connection reuse and make
use of the connection resumption. The client will not use the proxies defined in this configuration
to hosts outside of the "*.internal.example.org" zone.</t>
        <t>In the next example, two proxies are defined with a distinct identifier and there are
three destination rules:</t>
        <sourcecode type="json"><![CDATA[
{
  "identifier": "proxy.example.org.",
  "expires": "2026-06-23T06:00:00Z",
  "prefixes": [],
  "proxies": [
    {
      "protocol": "http-connect",
      "proxy": "proxy.example.org:80",
      "identifier": "default_proxy"
    },
    {
      "protocol": "http-connect",
      "proxy": "special-proxy.example.org:80",
      "identifier": "special_proxy"
    }
  ],
  "proxy-match": [
    {
      "domains": [ "*.special.example.org" ],
      "ports": [ "80", "443", "49152-65535" ],
      "proxies": [ "special_proxy" ]
    },
    {
      "domains": [ "no-proxy.internal.example.org" ],
      "proxies": [ ]
    },
    {
      "domains": [ "*.internal.example.org" ],
      "proxies": [ "default_proxy" ]
    }
  ]
}
]]></sourcecode>
        <t>In this case, the client would use "special-proxy.example.org:80"
for any TCP traffic that matches "*.special.example.org" destined to ports 80, 443, or any port between
49152 and 65535. The client would not use any of the defined proxies for access to
"no-proxy.internal.example.org". Finally, the client would use
"proxy.example.org:80" to access any other TCP traffic that matches
"*.internal.example.org".</t>
        <t>In the following example, three proxies are sharing a common identifier ("default_proxy"), but use separate protocols constraining the traffic that they can process.</t>
        <sourcecode type="json"><![CDATA[
{
  "identifier": "proxy.example.org.",
  "expires": "2026-06-23T06:00:00Z",
  "prefixes": [],
  "proxies": [
    {
      "protocol": "http-connect",
      "proxy": "proxy.example.org:80",
      "identifier": "default_proxy"
    },
    {
      "protocol": "connect-udp",
      "proxy":
  "https://proxy.example.org/masque/udp/{target_host},{target_port}",
      "identifier": "default_proxy"
    },
    {
      "protocol": "connect-ip",
      "proxy":
        "https://proxy.example.org/masque/ip{?target,ipproto}",
      "identifier": "default_proxy"
    }
  ],
  "proxy-match": [
    {
      "domains": [ "*.internal.example.org" ],
      "proxies": [ "default_proxy" ]
    }
  ]
}
]]></sourcecode>
        <t>The client would use proxies in the following way:</t>
        <ul spacing="normal">
          <li>
            <t>Traffic not destined to hosts within the "*.internal.example.org" zone is not sent
to any proxy defined in this configuration.</t>
          </li>
          <li>
            <t>TCP traffic destined to hosts within the "*.internal.example.org" zone is sent
either to the proxy with "http-connect" protocol or to the proxy with "connect-ip" protocol.</t>
          </li>
          <li>
            <t>UDP traffic destined to hosts within the "*.internal.example.org" zone is sent
either to the proxy with "connect-udp" protocol or to the proxy with "connect-ip" protocol.</t>
          </li>
          <li>
            <t>Traffic other than TCP and UDP destined to hosts within the "*.internal.example.org" zone is sent to the proxy with "connect-ip" protocol.</t>
          </li>
        </ul>
        <t>The following example provides a configuration of proxies to be used by default with a
set with exceptions to bypass:</t>
        <sourcecode type="json"><![CDATA[
{
  "identifier": "proxy.example.org.",
  "expires": "2026-06-23T06:00:00Z",
  "prefixes": [],
  "proxies": [
    {
      "protocol": "http-connect",
      "proxy": "proxy.example.org:80",
      "identifier": "default_proxy"
    },
    {
      "protocol": "http-connect",
      "proxy": "backup.example.org:80",
      "identifier": "secondary_proxy"
    }
  ],
  "proxy-match": [
    {
      "domains": [ "*.intranet.example.org" ],
      "proxies": [ ]
    },
    {
      "subnets": [ "192.0.2.0/24", "2001:db8::/32" ],
      "proxies": [ ]
    },
    {
      "proxies": [ "default_proxy", "secondary_proxy" ]
    }
  ]
}
]]></sourcecode>
        <t>In this case, the client will not forward TCP traffic that is destined to hosts matching
"*.intranet.example.org", 192.0.2.0/24, or 2001:db8::/32 through the proxies.
Due to the order in <tt>proxies</tt> array in the last rule of <tt>proxy-match</tt>, the client would prefer
"proxy.example.org:80" over "backup.example.org:80".</t>
        <t>The following example provides a configuration of proxies that enable setting one proxy
for "example.org" and a different proxy for all of its subdomains, i.e., "*.example.org":</t>
        <sourcecode type="json"><![CDATA[
{
  "identifier": "proxy.example.org.",
  "expires": "2026-06-23T06:00:00Z",
  "prefixes": [],
  "proxies": [
    {
      "protocol": "http-connect",
      "proxy": "proxy1.example.org:80",
      "identifier": "proxy1"
    },
    {
      "protocol": "http-connect",
      "proxy": "proxy2.example.org:80",
      "identifier": "proxy2"
    }
  ],
  "proxy-match": [
    {
      "domains": [ "example.org" ],
      "proxies": [ "proxy1" ]
    },
    {
      "domains": [ "*.example.org" ],
      "proxies": [ "proxy2" ]
    }
  ]
}
]]></sourcecode>
        <t>In this case, the client will forward TCP traffic that is destined to host "example.org"
to "proxy1.example.org:80" and all traffic to the subdomains of "example.org", i.e.,
"*.example.org" will be forwarded to "proxy2.example.org:80".</t>
      </section>
    </section>
    <section anchor="network-proxies">
      <name>Discovering Proxies from Network PvDs</name>
      <t><xref target="RFC8801"/> defines how PvD Additional Information is discovered based
on network advertisements using Router Advertisements <xref target="RFC4861"/>. This means
that a network defining its configuration via PvD information can include
the <tt>proxies</tt> key (<xref target="proxy-enumeration"/>). However, clients <bcp14>MUST NOT</bcp14> automatically
use these proxy configurations, unless the device has been explicitly provisioned
to trust this configuration from the network for specific proxy hosts; for example,
a corporate-managed device could use this mechanism on an authenticated corporate
network to learn which of an allowed set of proxy URIs are available at this
particular location.</t>
      <t>Future specifications can define ways to dynamically trust proxy configurations delivered
by a network, but such mechanisms are out of scope for this document.</t>
    </section>
    <section anchor="sec-considerations">
      <name>Security Considerations</name>
      <t>This document extends the PvD Additional Information defined in <xref target="RFC8801"/>; as such,
all security considerations from <xref target="RFC8801"/> apply here.</t>
      <t>The mechanisms in this document allow clients using a proxy to "upgrade" a configuration
for a cleartext HTTP/1.1 or SOCKS proxy into a configuration that uses TLS to communication to the proxy.
This upgrade can add protection to the proxied traffic so it is less observable by
entities along the network path; however, it does not prevent the proxy itself from
observing the traffic being proxied.</t>
      <t>Configuration advertised via PvD Additional Information, such as DNS zones or associated
proxies, can only be safely used when fetched over a secure TLS-protected connection
and the client has validated that the hostname of the proxy, the identifier of
the PvD, and the validated hostname identity on the certificate all match.</t>
      <t>The lists of proxies and destination rules provided by the PvD Additional Information might
exceed the memory constraints or processing capabilities of clients, particularly for constrained
devices. A client that is not able to process all of the content of either the proxies list
or destination rules due to resource limitations <bcp14>MUST</bcp14> ignore the proxy configuration entirely.
Clients <bcp14>MUST</bcp14> implement limits for the maximum number of proxy configurations and destination rules
that they are able to process; the specific limits will vary based on device capabilities.</t>
      <t>When using information in destination rules (<xref target="destinations"/>), clients <bcp14>MUST</bcp14> only allow
the PvD configuration to narrow the scope of traffic that they will send through a proxy.
Clients that are configured by policy to only send a particular set of traffic through
a particular proxy can learn about rules that will cause them to send more narrowly scoped
traffic, but <bcp14>MUST NOT</bcp14> send traffic that would go beyond what is allowed by local policy.</t>
      <t>As described in <xref target="network-proxies"/>, proxy configuration discovered based on RAs from a network
<bcp14>MUST NOT</bcp14> be automatically used by clients to start using proxies when they would otherwise
not proxy traffic.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="proxies-key-iana">
        <name>New Additional Information PvD Keys Registry</name>
        <t>This document registers two new keys in the "Additional Information PvD Keys" registry <xref target="IANA_PVD"/>.</t>
        <section anchor="proxies-key">
          <name><tt>proxies</tt> Key</name>
          <t>JSON Key: proxies</t>
          <t>Description: Array of proxy dictionaries associated with this PvD.</t>
          <t>Type: Array of dictionaries</t>
          <t>Example:</t>
          <sourcecode type="json"><![CDATA[
[
 {
  "protocol": "connect-udp",
  "proxy": 
    "https://proxy.example.org/masque{?target_host,target_port}"
 }
]
]]></sourcecode>
        </section>
        <section anchor="proxy-match-key">
          <name><tt>proxy-match</tt> Key</name>
          <t>JSON Key: proxy-match</t>
          <t>Description: Array of proxy match rules, as dictionaries, associated with
entries in the <tt>proxies</tt> array</t>
          <t>Type: Array of dictionaries</t>
          <t>Example:</t>
          <sourcecode type="json"><![CDATA[
[
 {
  "domains": [ "*.internal.example.org" ],
  "proxies": [ "default_proxy" ]
 }
]
]]></sourcecode>
        </section>
      </section>
      <section anchor="proxy-info-iana">
        <name>New Proxy Information PvD Keys Registry</name>
        <t>IANA has created a new registry "Proxy Information PvD Keys" within the "Provisioning Domains (PvDs)" registry page.
This new registry reserves JSON keys for use in sub-dictionaries under the <tt>proxies</tt> key.
The initial contents of this registry are given in <xref target="proxy-information-keys-table"/>.</t>
        <t>New assignments in the "Proxy Information PvD Keys" registry will be administered by IANA through Expert Review <xref target="RFC8126"/>.
Experts are requested to ensure that defined keys do not overlap in names or semantics, do not contain an underscore character ("_")
in the names (since underscores are reserved for vendor-specific keys), and have clear format definitions.
The reference field may be empty.</t>
      </section>
      <section anchor="proxy-protocol-iana">
        <name>New Proxy Protocol PvD Values Registry</name>
        <t>IANA has created a new registry "Proxy Protocol PvD Values" within the "Provisioning Domains (PvDs)" registry page.
This new registry reserves JSON values for the <tt>protocol</tt> key in <tt>proxies</tt> sub-dictionaries.
The initial contents of this registry are given in <xref target="proxy-protocol-value-table"/>.</t>
        <t>New assignments in the "Proxy Protocol PvD Values" registry will be administered by IANA through Expert Review <xref target="RFC8126"/>.
Experts are requested to ensure that defined keys do not overlap in names. The reference field may be empty.</t>
      </section>
      <section anchor="proxy-destination-iana">
        <name>New Proxy Destination Rule PvD Keys Registry</name>
        <t>IANA has created a new registry "Proxy Destination Rule PvD Keys" within the "Provisioning Domains (PvDs)" registry page.
This new registry reserves JSON keys for use in sub-dictionaries under the <tt>proxy-match</tt> key.
The initial contents of this registry are given in <xref target="destination-rule-keys-table"/>.</t>
        <t>New assignments in the "Proxy Destination Rule PvD Keys" registry will be administered by IANA through Expert Review <xref target="RFC8126"/>.
Experts are requested to ensure that defined keys do not overlap in names or semantics and do not contain an underscore character ("_")
in the names (since underscores are reserved for vendor-specific keys).</t>
      </section>
      <section anchor="svcparamkey-iana">
        <name>New DNS SVCB Service Parameter Key (SvcParamKey)</name>
        <t>IANA has added a new entry to the "DNS SVCB Service Parameter Keys (SvcParamKeys)" registry
<xref target="IANA_SVCB"/>:</t>
        <ul spacing="normal">
          <li>
            <t>Number: 11</t>
          </li>
          <li>
            <t>Name: pvd</t>
          </li>
          <li>
            <t>Meaning: PvD configuration is available at the well-known path</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Reference: RFC 10088, <xref target="svcparamkey"/></t>
          </li>
        </ul>
      </section>
    </section>
  </middle>
  <back>
    <displayreference target="RFC8801" to="PVDDATA"/>
    <displayreference target="RFC3986" to="URI"/>
    <displayreference target="RFC8259" to="JSON"/>
    <displayreference target="RFC9110" to="HTTP"/>
    <displayreference target="RFC4632" to="CIDR"/>
    <displayreference target="RFC4291" to="IPv6-ADDR"/>
    <displayreference target="RFC9460" to="SVCB-DNS"/>
    <displayreference target="RFC7301" to="ALPN"/>
    <displayreference target="RFC7556" to="PVD"/>
    <displayreference target="RFC1928" to="SOCKSv5"/>
    <displayreference target="I-D.ietf-httpbis-connect-tcp" to="CONNECT-TCP"/>
    <displayreference target="RFC8598" to="IKEV2SPLIT"/>
    <displayreference target="RFC9298" to="CONNECT-UDP"/>
    <displayreference target="RFC9484" to="CONNECT-IP"/>
    <displayreference target="RFC2939" to="IANA-DHCP"/>
    <displayreference target="RFC6570" to="URITEMPLATE"/>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8801.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4632.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4291.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9460.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7301.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="IANA_PVD" target="https://www.iana.org/assignments/pvds">
          <front>
            <title>Additional Information PvD Keys</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="IANA_SVCB" target="https://www.iana.org/assignments/dns-svcb">
          <front>
            <title>DNS SVCB Service Parameter Keys (SvcParamKeys)</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7556.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1928.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-httpbis-connect-tcp.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8598.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9298.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9484.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2939.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6570.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3040.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4861.xml"/>
      </references>
    </references>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The authors would like to thank <contact fullname="Phil Lisiecki"/>, <contact fullname="David Schinazi"/>, <contact fullname="Dale Worley"/>, <contact fullname="Tomas Dragoun"/>, <contact fullname="Keith Holleman"/>, <contact fullname="James Taft"/>, <contact fullname="Tommy Jensen"/>, and <contact fullname="Ryan Globus"/> for their detailed reviews, feedback, and suggestions during the development of this document.</t>
    </section>
  </back>
</rfc>
