Draft: draft-ietf-masque-connect-udp

Commentary: Work in progress , not yet ready for review 
 Throughout the text , the following terminology appears to be used inconsistently . a ) Please review these occurrences and let us know if / how they may be made consistent . HTTP CONNECT method vs. CONNECT ( should method follow ? ) HTTP Extended CONNECT vs. Extended CONNECT " connect - udp " HTTP Upgrade Token vs. " connect - udp " upgrade token Context ID vs. context ID ( perhaps the field name is capped ; then maybe add " field " ? ) b ) We have updated to use the form on the right for the few occurrences of the form on the left . Please let us know any objections . URI template / URI Template targethost / " targethost " UDP Proxying request streams / UDP proxying request streams c ) We see header field names in double quotes . Please review the following " field " names to ensure double quotes are not necessary . HTTP Datagram Payload field Context ID field Quarter Stream ID field 
 There 's one instance in the Intro where should be but everything else is fine Extended CONNECT is fine sounds best as it matches RFC 9110 for the concept , for the field . Adding field where relevant sounds good . b ) that 's fine As per the , HTTP header field names need quotes for the first time they 're mentioned than not . Other field names do n't need quotes . 
 We suggest splitting the following sentence into two for easy comprehension . Please confirm that the updates to this text maintain the intended meaning . Original : Since the original HTTP CONNECT method allowed conveying the target host and port but not the scheme , proxy authority , path , nor query , there exist clients with proxy configuration interfaces that only allow the user to configure the proxy host and the proxy port . Perhaps : The original HTTP CONNECT method allowed for the conveyance of the target host and port , but not the scheme , proxy authority , path , or query . Thus , clients with proxy configuration interfaces that only allow the user to configure the proxy host and the proxy port exist . 
 That change SGTM 
 When working on draft - schinazi - connect - udp - listen we realized that referring to the field in Section 5 of CONNECT - UDP can be confused with the from HTTP - DGRAM . Let 's rename this to to prevent miscomprehension . 
 I appreciate the problem but figure 6 already calls the combined context ID and payload fields the " UDP Proxying HTTP Datagram Payload " . So now is the proposal to call the field , in full expansion , " UDP Proxying HTTP Datagram Payload UDP Proxying Payload " ? Does n't really grok well 
 Though no one does " full expansion " of these fields right ? 
 If they did , we could avoid having redundant field names ;) But if we ignore that , and we go with ( a fine name ) , consider also adding that disambiguator to the field such as . This would help avoid it being confused with the CONNECT - IP context ID 
 Though I 'd argue that the CONNECT - UDP Context ID and the CONNECT - IP Context ID are the same field so there 's no confusion to be had (: 
 I dunno , they are defined to be very similar but they are different fields . 
 The draft currently states To avoid confusion , we should make an editorial tweak to specify this more formally . Probably something along the lines of using IPv6address , IPv4address , reg - name , and port from RFC 3986 . With the additional requirement that both targethost and target_port MUST NOT be empty . 
 Thinking about this some more , the more formal definition will need to discuss percent - encoding . I 'm also realizing that the draft currently says but that 's not quite right since it appears colons are allowed in the path and query of a URL 
 So " : " are allowed in URI as general delimiters . But , " : " is explicitly allowed in the pchar element that is used by path - abempty that the path segmenet specification that applies for HTTPs scheme per RFC 9110 . Thus , I appear that it would in fact be allowed . But , it would be good to check with someone that really knows the HTTPS scheme to understand how general interpreters would deal with the " : " . 
 I 've tested this locally and at least in  talking to httpd / php , and work fine in both the path and query
While HTTP provides the CONNECT method (see HTTP) for creating a TCP
TCP tunnel to a proxy, prior to this specification it lacked a method
for doing so for UDP UDP traffic.
This document describes a protocol for tunnelling UDP to a server
acting as a UDP-specific proxy over HTTP.  UDP tunnels are commonly
used to create an end-to-end virtual connection, which can then be
secured using QUIC QUIC or another protocol running over UDP.  Unlike
CONNECT, the UDP proxy itself is identified with an absolute URL
containing the traffic's destination.  Clients generate those URLs
using a URI Template TEMPLATE, as described in client-config.
While HTTP provides the CONNECT method (see HTTP) for creating a TCP
TCP tunnel to a proxy, it lacked a method for doing so for UDP UDP
traffic prior to this specification.
This document describes a protocol for tunneling UDP to a server
acting as a UDP-specific proxy over HTTP.  UDP tunnels are commonly
used to create an end-to-end virtual connection, which can then be
secured using QUIC QUIC or another protocol running over UDP.  Unlike
the HTTP CONNECT method, the UDP proxy itself is identified with an
absolute URL containing the traffic's destination.  Clients generate
those URLs using a URI Template TEMPLATE, as described in client-
config.
In this document, we use the term "UDP proxy" to refer to the HTTP
server that acts upon the client's UDP tunnelling request to open a
UDP socket to a target server, and generates the response to this
request.  If there are HTTP intermediaries (as defined in HTTP)
between the client and the UDP proxy, those are referred to as
"intermediaries" in this document.
In this document, we use the term "UDP proxy" to refer to the HTTP
server that acts upon the client's UDP tunneling request to open a
UDP socket to a target server and that generates the response to this
request.  If there are HTTP intermediaries (as defined in HTTP)
between the client and the UDP proxy, those are referred to as
"intermediaries" in this document.
The URI Template MUST be in absolute form, and MUST include non-
empty scheme, authority and path components.
The path component of the URI Template MUST start with a slash
"/".
The URI Template MUST be in absolute form and MUST include non-
empty scheme, authority, and path components.
The path component of the URI Template MUST start with a slash
("/").
Since the original HTTP CONNECT method allowed conveying the target
host and port but not the scheme, proxy authority, path, nor query,
there exist clients with proxy configuration interfaces that only
allow the user to configure the proxy host and the proxy port.
Client implementations of this specification that are constrained by
such limitations MAY attempt to access UDP proxying capabilities
using the default template, which is defined as:
"https://$PROXY_HOST:$PROXY_PORT/.well-known/masque/
udp/{target_host}/{target_port}/" where $PROXY_HOST and $PROXY_PORT
are the configured host and port of the UDP proxy respectively.  UDP
proxy deployments SHOULD offer service at this location if they need
to interoperate with such clients.
The original HTTP CONNECT method allowed for the conveyance of the
target host and port, but not the scheme, proxy authority, path, or
query.  Thus, clients with proxy configuration interfaces that only
allow the user to configure the proxy host and the proxy port exist.
Client implementations of this specification that are constrained by
such limitations MAY attempt to access UDP proxying capabilities
using the default template, which is defined as
"https://$PROXY_HOST:$PROXY_PORT/.well-known/masque/
udp/{target_host}/{target_port}/", where $PROXY_HOST and $PROXY_PORT
are the configured host and port of the UDP proxy, respectively.  UDP
proxy deployments SHOULD offer service at this location if they need
to interoperate with such clients.
To initiate a UDP tunnel associated with a single HTTP stream, a
client issues a request containing the "connect-udp" upgrade token.
The target of the tunnel is indicated by the client to the UDP proxy
via the "target_host" and "target_port" variables of the URI
Template, see client-config.  If the request is successful, the UDP
proxy commits to converting received HTTP Datagrams into UDP packets
and vice versa until the tunnel is closed.
When sending its UDP proxying request, the client SHALL perform URI
Template expansion to determine the path and query of its request.
target_host supports using DNS names, IPv6 literals and IPv4
literals.  Note that IPv6 scoped addressing zone identifiers are not
supported.  Also note that this URI Template expansion requires using
percent-encoding, so for example if the target_host is
"2001:db8::42", it will be encoded in the URI as
"2001%3Adb8%3A%3A42".
To initiate a UDP tunnel associated with a single HTTP stream, a
client issues a request containing the "connect-udp" upgrade token.
The target of the tunnel is indicated by the client to the UDP proxy
via the "target_host" and "target_port" variables of the URI
Template; see client-config.
both the "target_host" and "target_port" variables MUST NOT be
empty.
if "target_host" contains an IPv6 literal, the colons (":") MUST
be percent-encoded.  For example, if the target host is
"2001:db8::42", it will be encoded in the URI as
"2001%3Adb8%3A%3A42".
"target_port" MUST represent an integer between 1 and 65535
inclusive.
When sending its UDP proxying request, the client SHALL perform URI
Template expansion to determine the path and query of its request.
If the request is successful, the UDP proxy commits to converting
received HTTP Datagrams into UDP packets, and vice versa, until the
tunnel is closed.
if the recipient is configured to use another HTTP proxy, it will
act as an intermediary: it forwards the request to another HTTP
server.  Note that such intermediaries may need to reencode the
request if they forward it using a version of HTTP that is
different from the one used to receive it, as the request encoding
differs by version (see below).
otherwise, the recipient will act as a UDP proxy: it extracts the
"target_host" and "target_port" variables from the URI it has
reconstructed from the request headers, and establishes a tunnel
by directly opening a UDP socket to the requested target.
Unlike TCP, UDP is connection-less.  The UDP proxy that opens the UDP
socket has no way of knowing whether the destination is reachable.
Therefore, it needs to respond to the request without waiting for a
packet from the target.  However, if the target_host is a DNS name,
the UDP proxy MUST perform DNS resolution before replying to the HTTP
request.  If errors occur during this process, the UDP proxy MUST
reject the request and SHOULD send details using an appropriate
"Proxy-Status" header field PROXY-STATUS (for example, if DNS
resolution returns an error, the proxy can use the dns_error Proxy
Error Type from PROXY-STATUS).
if the recipient is configured to use another HTTP proxy, it will
act as an intermediary by forwarding the request to another HTTP
server.  Note that such intermediaries may need to re-encode the
request if they forward it using a version of HTTP that is
different from the one used to receive it, as the request encoding
differs by version (see below).
otherwise, the recipient will act as a UDP proxy.  It extracts the
"target_host" and "target_port" variables from the URI it has
reconstructed from the request headers, decodes their percent-
encoding, and establishes a tunnel by directly opening a UDP
socket to the requested target.
Unlike TCP, UDP is connectionless.  The UDP proxy that opens the UDP
socket has no way of knowing whether the destination is reachable.
Therefore, it needs to respond to the request without waiting for a
packet from the target.  However, if the "target_host" is a DNS name,
the UDP proxy MUST perform DNS resolution before replying to the HTTP
request.  If errors occur during this process, the UDP proxy MUST
reject the request and SHOULD send details using an appropriate
Proxy-Status header field PROXY-STATUS.  For example, if DNS
resolution returns an error, the proxy can use the dns_error Proxy
Error Type from PROXY-STATUS.
The lifetime of the socket is tied to the request stream.  The UDP
proxy MUST keep the socket open while the request stream is open.  If
a UDP proxy is notified by its operating system that its socket is no
longer usable (for example, this can happen when an ICMP "Destination
Unreachable" message is received, see ICMP6), it MUST close the
request stream.  UDP proxies MAY choose to close sockets due to a
period of inactivity, but they MUST close the request stream when
closing the socket.  UDP proxies that close sockets after a period of
inactivity SHOULD NOT use a period lower than two minutes, see
BEHAVE.
A successful response (as defined in resp1 and resp23) indicates that
the UDP proxy has opened a socket to the requested target and is
willing to proxy UDP payloads.  Any response other than a successful
response indicates that the request has failed, and the client MUST
therefore abort the request.
UDP proxies MUST NOT introduce fragmentation at the IP layer when
forwarding HTTP Datagrams onto a UDP socket; overly large datagrams
are silently dropped.  In IPv4, the Don't Fragment (DF) bit MUST be
set if possible, to prevent fragmentation on the path.  Future
extensions MAY remove these requirements.
The lifetime of the socket is tied to the request stream.  The UDP
proxy MUST keep the socket open while the request stream is open.  If
a UDP proxy is notified by its operating system that its socket is no
longer usable, it MUST close the request stream.  For example, this
can happen when an ICMP Destination Unreachable message is received;
see ICMP6.  UDP proxies MAY choose to close sockets due to a period
of inactivity, but they MUST close the request stream when closing
the socket.  UDP proxies that close sockets after a period of
inactivity SHOULD NOT use a period lower than two minutes; see
BEHAVE.
A successful response (as defined in Sections resp1 and resp23)
indicates that the UDP proxy has opened a socket to the requested
target and is willing to proxy UDP payloads.  Any response other than
a successful response indicates that the request has failed; thus,
the client MUST abort the request.
UDP proxies MUST NOT introduce fragmentation at the IP layer when
forwarding HTTP Datagrams onto a UDP socket; overly large datagrams
are silently dropped.  In IPv4, the Don't Fragment (DF) bit MUST be
set, if possible, to prevent fragmentation on the path.  Future
extensions MAY remove these requirements.
the request SHALL include a single "Host" header field containing
the origin of the UDP proxy.
the request SHALL include a "Connection" header field with value
"Upgrade" (note that this requirement is case-insensitive as per
HTTP).
the request SHALL include an "Upgrade" header field with value
"connect-udp".
A UDP proxying request that does not conform to these restrictions is
malformed.  The recipient of such a malformed request MUST respond
with an error, and SHOULD use the 400 (Bad Request) status code.
the request SHALL include a single Host header field containing
the origin of the UDP proxy.
the request SHALL include a Connection header field with value
"Upgrade" (note that this requirement is case-insensitive as per
HTTP).
the request SHALL include an Upgrade header field with value
"connect-udp".
A UDP proxying request that does not conform to these restrictions is
malformed.  The recipient of such a malformed request MUST respond
with an error and SHOULD use the 400 (Bad Request) status code.
the reponse SHALL include a "Connection" header field with value
"Upgrade" (note that this requirement is case-insensitive as per
HTTP).
the response SHALL include a single "Upgrade" header field with
value "connect-udp".
the response SHALL include a Connection header field with value
"Upgrade" (note that this requirement is case-insensitive as per
HTTP).
the response SHALL include a single Upgrade header field with
value "connect-udp".
The ":method" pseudo-header field SHALL be "CONNECT".
The ":protocol" pseudo-header field SHALL be "connect-udp".
The ":authority" pseudo-header field SHALL contain the authority
of the UDP proxy.
The ":path" and ":scheme" pseudo-header fields SHALL NOT be empty.
Their values SHALL contain the scheme and path from the URI
Template after the URI template expansion process has been
completed.
The :method pseudo-header field SHALL be "CONNECT".
The :protocol pseudo-header field SHALL be "connect-udp".
The :authority pseudo-header field SHALL contain the authority of
the UDP proxy.
The :path and :scheme pseudo-header fields SHALL NOT be empty.
Their values SHALL contain the scheme and path from the URI
Template after the URI Template expansion process has been
completed.
In order to allow implementations to support multiple draft versions
of this specification during its development, we introduce the
"connect-udp-version" header field.  When sent by the client, it
contains a list of draft numbers supported by the client (e.g.,
"connect-udp-version: 0, 2").  When sent by the UDP proxy, it
contains a single draft number selected by the UDP proxy from the
list provided by the client (e.g., "connect-udp-version: 2").
Sending this header field is RECOMMENDED but not required.  The
"connect-udp-version" header field is a List Structured Field [1].
Each list member MUST be an Integer.
The mechanism for proxying UDP in HTTP defined in this document
allows future extensions to exchange HTTP Datagrams that carry
different semantics from UDP payloads.  Some of these extensions can
augment UDP payloads with additional data, while others can exchange
data that is completely separate from UDP payloads.  In order to
accomplish this, all HTTP Datagrams associated with UDP Proxying
request streams start with a context ID, see format.
Registration is the action by which an endpoint informs its peer of
the semantics and format of a given context ID.  This document does
not define how registration occurs.  Future extensions MAY use HTTP
header fields or capsules to register contexts.  Depending on the
method being used, it is possible for datagrams to be received with
Context IDs which have not yet been registered, for instance due to
reordering of the packet containing the datagram and the packet
containing the registration message during transmission.
When HTTP Datagrams (see HTTP-DGRAM) are associated with UDP proxying
request streams, the HTTP Datagram Payload field has the format
defined in dgram-format.  Note that when HTTP Datagrams are encoded
using QUIC DATAGRAM frames DGRAM, the Context ID field defined below
directly follows the Quarter Stream ID field which is at the start of
the QUIC DATAGRAM frame payload (see HTTP-DGRAM).
UDP packets are encoded using HTTP Datagrams with the Context ID set
to zero.  When the Context ID is set to zero, the Payload field
contains the unmodified payload of a UDP packet (referred to as "data
octets" in UDP).
By virtue of the definition of the UDP header UDP, it is not possible
to encode UDP payloads longer than 65527 bytes.  Therefore, endpoints
MUST NOT send HTTP Datagrams with a Payload field longer than 65527
using Context ID zero.  An endpoint that receives an HTTP Datagram
using Context ID zero whose Payload field is longer than 65527 MUST
abort the corresponding stream.  If a UDP proxy knows it can only
send out UDP packets of a certain length due to its underlying link
MTU, it has no choice but to discard incoming HTTP Datagrams using
Context ID zero whose Payload field is longer than that limit.  If
the discarded HTTP Datagram was transported by a DATAGRAM capsule,
the receiver SHOULD discard that capsule without buffering the
capsule contents.
The mechanism for proxying UDP in HTTP defined in this document
allows future extensions to exchange HTTP Datagrams that carry
different semantics from UDP payloads.  Some of these extensions can
augment UDP payloads with additional data, while others can exchange
data that is completely separate from UDP payloads.  In order to
accomplish this, all HTTP Datagrams associated with UDP Proxying
request streams start with a Context ID field; see format.
Registration is the action by which an endpoint informs its peer of
the semantics and format of a given Context ID.  This document does
not define how registration occurs.  Future extensions MAY use HTTP
header fields or capsules to register Context IDs.  Depending on the
method being used, it is possible for datagrams to be received with
Context IDs that have not yet been registered.  For instance, this
can be due to reordering of the packet containing the datagram and
the packet containing the registration message during transmission.
When HTTP Datagrams (see HTTP-DGRAM) are associated with UDP Proxying
request streams, the HTTP Datagram Payload field has the format
defined in dgram-format, using notation from QUIC.  Note that when
HTTP Datagrams are encoded using QUIC DATAGRAM frames QUIC-DGRAM, the
Context ID field defined below directly follows the Quarter Stream ID
field, which is at the start of the QUIC DATAGRAM frame payload; see
HTTP-DGRAM.
UDP packets are encoded using HTTP Datagrams with the Context ID
field set to zero.  When the Context ID field is set to zero, the UDP
Proxying Payload field contains the unmodified payload of a UDP
packet (referred to as data octets in UDP).
By virtue of the definition of the UDP header UDP, it is not possible
to encode UDP payloads longer than 65527 bytes.  Therefore, endpoints
MUST NOT send HTTP Datagrams with a UDP Proxying Payload field longer
than 65527 using Context ID zero.  An endpoint that receives an HTTP
Datagram using Context ID zero whose UDP Proxying Payload field is
longer than 65527 MUST abort the corresponding stream.  If a UDP
proxy knows it can only send out UDP packets of a certain length due
to its underlying link MTU, it has no choice but to discard incoming
HTTP Datagrams using Context ID zero whose UDP Proxying Payload field
is longer than that limit.  If the discarded HTTP Datagram was
transported by a DATAGRAM capsule, the receiver SHOULD discard that
capsule without buffering the capsule contents.
Note that buffering datagrams (either because the request was not yet
received, or because the Context ID is not yet known) consumes
resources.  Receivers that buffer datagrams SHOULD apply buffering
limits in order to reduce the risk of resource exhaustion occuring.
For example, receivers can limit the total number of buffered
datagrams, or the cumulative size of buffered datagrams, on a per-
stream, per-context, or per-connection basis.
A client MAY optimistically start sending UDP packets in HTTP
Datagrams before receiving the response to its UDP proxying request.
However, implementers should note that such proxied packets may not
be processed by the UDP proxy if it responds to the request with a
failure, or if the proxied packets are received by the UDP proxy
before the request and the UDP proxy chooses to not buffer them.
Bursty traffic can often lead to temporally correlated packet losses,
which in turn can lead to suboptimal responses from congestion
controllers in protocols running over UDP.  To avoid this, UDP
proxies SHOULD strive to avoid increasing burstiness of UDP traffic:
they SHOULD NOT queue packets in order to increase batching.
Note that buffering datagrams (either because the request was not yet
received or because the Context ID is not yet known) consumes
resources.  Receivers that buffer datagrams SHOULD apply buffering
limits in order to reduce the risk of resource exhaustion occurring.
For example, receivers can limit the total number of buffered
datagrams or the cumulative size of buffered datagrams on a per-
stream, per-context, or per-connection basis.
A client MAY optimistically start sending UDP packets in HTTP
Datagrams before receiving the response to its UDP proxying request.
However, implementers should note that such proxied packets may not
be processed by the UDP proxy if it responds to the request with a
failure or if the proxied packets are received by the UDP proxy
before the request and the UDP proxy chooses to not buffer them.
Bursty traffic can often lead to temporally correlated packet losses;
in turn, this can lead to suboptimal responses from congestion
controllers in protocols running over UDP.  To avoid this, UDP
proxies SHOULD strive to avoid increasing burstiness of UDP traffic;
they SHOULD NOT queue packets in order to increase batching.
If a client or UDP proxy with a connection containing a UDP proxying
request stream disables congestion control, it MUST NOT signal
Explicit Congestion Notification (ECN) ECN support on that
connection.  That is, it MUST mark all IP headers with the Not-ECT
codepoint.  It MAY continue to report ECN feedback via QUIC ACK_ECN
frames or the TCP "ECE" bit, as the peer may not have disabled
congestion control.
If a client or UDP proxy with a connection containing a UDP Proxying
request stream disables congestion control, it MUST NOT signal
Explicit Congestion Notification (ECN) ECN support on that
connection.  That is, it MUST mark all IP headers with the Not-ECT
codepoint.  It MAY continue to report ECN feedback via QUIC ACK_ECN
frames or the TCP ECE bit, as the peer may not have disabled
congestion control.
When using HTTP/3 with the QUIC Datagram extension DGRAM, UDP
payloads are transmitted in QUIC DATAGRAM frames.  Since those cannot
be fragmented, they can only carry payloads up to a given length
determined by the QUIC connection configuration and the path MTU.  If
a UDP proxy is using QUIC DATAGRAM frames and it receives a UDP
payload from the target that will not fit inside a QUIC DATAGRAM
frame, the UDP proxy SHOULD NOT send the UDP payload in a DATAGRAM
capsule, as that defeats the end-to-end unreliability characteristic
that methods such as Datagram Packetization Layer Path MTU Discovery
(DPLPMTUD) depend on DPLPMTUD.  In this scenario, the UDP proxy
SHOULD drop the UDP payload and send an ICMP "Packet Too Big" message
to the target, see ICMP6.
When using HTTP/3 with the QUIC Datagram extension QUIC-DGRAM, UDP
payloads are transmitted in QUIC DATAGRAM frames.  Since those cannot
be fragmented, they can only carry payloads up to a given length
determined by the QUIC connection configuration and the Path MTU
(PMTU).  If a UDP proxy is using QUIC DATAGRAM frames and it receives
a UDP payload from the target that will not fit inside a QUIC
DATAGRAM frame, the UDP proxy SHOULD NOT send the UDP payload in a
DATAGRAM capsule, as that defeats the end-to-end unreliability
characteristic that methods such as Datagram Packetization Layer PMTU
Discovery (DPLPMTUD) depend on DPLPMTUD.  In this scenario, the UDP
proxy SHOULD drop the UDP payload and send an ICMP Packet Too Big
message to the target; see ICMP6.
Note that UDP proxying clients do not have the ability in this
specification to control the ECN codepoints on UDP packets the UDP
proxy sends to the target, nor can UDP proxies communicate the
markings of each UDP packet from target to UDP proxy.
A UDP proxy MUST ignore ECN bits in the IP header of UDP packets
received from the target, and MUST set the ECN bits to Not-ECT on UDP
packets it sends to the target.  These do not relate to the ECN
markings of packets sent between client and UDP proxy in any way.
In this specification, note that UDP proxying clients do not have the
ability to control the ECN codepoints on UDP packets the UDP proxy
sends to the target, nor can UDP proxies communicate the markings of
each UDP packet from target to UDP proxy.
A UDP proxy MUST ignore ECN bits in the IP header of UDP packets
received from the target, and it MUST set the ECN bits to Not-ECT on
UDP packets it sends to the target.  These do not relate to the ECN
markings of packets sent between client and UDP proxy in any way.
UDP proxies share many similarities to TCP CONNECT proxies when
considering them as infrastructure for abuse to enable denial of
service attacks.  Both can obfuscate the attacker's source address
from the attack target.  In the case of a stateless volumetric attack
(e.g., a TCP SYN flood or a UDP flood), both types of proxies pass
the traffic to the target host.  With stateful volumetric attacks
(e.g., HTTP flooding) being sent over a TCP CONNECT proxy, the proxy
will only send data if the target has indicated its willingness to
accept data by responding with a TCP SYN-ACK.  Once the path to the
target is flooded, the TCP CONNECT proxy will no longer receive
replies from the target and will stop sending data.  Since UDP does
not establish shared state between the UDP proxy and the target, the
UDP proxy could continue sending data to the target in such a
situation.  While a UDP proxy could potentially limit the number of
UDP packets it is willing to forward until it has observed a response
from the target, that provides limited protection against denial of
service attacks when attacks target open UDP ports where the protocol
running over UDP would respond, and that would be interpreted as
willingness to accept UDP by the UDP proxy.  Such a packet limit
could also cause issues for valid traffic.
UDP proxies share many similarities with TCP CONNECT proxies when
considering them as infrastructure for abuse to enable denial-of-
service (DoS) attacks.  Both can obfuscate the attacker's source
address from the attack target.  In the case of a stateless
volumetric attack (e.g., a TCP SYN flood or a UDP flood), both types
of proxies pass the traffic to the target host.  With stateful
volumetric attacks (e.g., HTTP flooding) being sent over a TCP
CONNECT proxy, the proxy will only send data if the target has
indicated its willingness to accept data by responding with a TCP
SYN-ACK.  Once the path to the target is flooded, the TCP CONNECT
proxy will no longer receive replies from the target and will stop
sending data.  Since UDP does not establish shared state between the
UDP proxy and the target, the UDP proxy could continue sending data
to the target in such a situation.  While a UDP proxy could
potentially limit the number of UDP packets it is willing to forward
until it has observed a response from the target, that provides
limited protection against DoS attacks when attacks target open UDP
ports where the protocol running over UDP would respond and that
would be interpreted as willingness to accept UDP by the UDP proxy.
Such a packet limit could also cause issues for valid traffic.
This document will request IANA to register "connect-udp" in the
"HTTP Upgrade Tokens" registry maintained at
<<https://www.iana.org/assignments/http-upgrade-tokens>>.
This document will request IANA to register "masque" in the "Well-
Known URIs" registry maintained at
<<https://www.iana.org/assignments/well-known-uris>>.
IANA has registered "connect-udp" in the "HTTP Upgrade Tokens"
registry maintained at <<https://www.iana.org/assignments/http-
upgrade-tokens>>.