<?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.30 (Ruby 3.4.8) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-vance-socks-v4a-00" category="historic" submissionType="independent" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title abbrev="SOCKS 4A">SOCKS Protocol Version 4A</title>
    <seriesInfo name="Internet-Draft" value="draft-vance-socks-v4a-00"/>
    <author fullname="Daniel James Vance">
      <organization>Independent</organization>
      <address>
        <email>djvanc@outlook.com</email>
      </address>
    </author>
    <date year="2026" month="February" day="13"/>
    <abstract>
      <?line 48?>

<t>This document specifies SOCKS 4A, an extension to the SOCKS Version 4 protocol. This extension allows SOCKS clients to delegate domain name resolution to the SOCKS server. This is particularly useful in environments where the client host cannot resolve the destination host's domain name due to restrictive network policies or lack of DNS access.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/4socks/socks4"/>.</t>
    </note>
  </front>
  <middle>
    <?line 52?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The original SOCKSv4 protocol requires the client to provide the destination host's IPv4 address. However, in many firewall configurations, the client resides on a network without direct DNS access to the outside world. SOCKS 4A addresses this by allowing the client to provide a domain name string instead of a resolved IP address.</t>
    </section>
    <section anchor="conventions-and-terminology">
      <name>Conventions and Terminology</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?>

<t>This specification uses the following terms:</t>
      <ul spacing="normal">
        <li>
          <t>Client (Application Client): The program requesting a connection to an application server through the SOCKS server.</t>
        </li>
        <li>
          <t>SOCKS Server: The host, typically at a firewall, that intermediates the connection between the Client and the Application Server.</t>
        </li>
        <li>
          <t>Application Server: The host to which the Client ultimately wishes to connect (e.g., a Telnet daemon, an HTTP server).</t>
        </li>
        <li>
          <t>TCP Session: A connection established using the Transmission Control Protocol (TCP). SOCKSv4 only supports TCP sessions.</t>
        </li>
        <li>
          <t>DSTIP (Destination IP): The IP address of the Application Server, as specified in the SOCKS request.</t>
        </li>
        <li>
          <t>DSTPORT (Destination Port): The port number of the Application Server, as specified in the SOCKS request.</t>
        </li>
        <li>
          <t>USERID: A variable-length, NULL-terminated string identifying the client's user on the local system.</t>
        </li>
        <li>
          <t>NULL: A byte of all zero bits, used to terminate the USERID field.</t>
        </li>
      </ul>
    </section>
    <section anchor="protocol-mechanism">
      <name>Protocol Mechanism</name>
      <t>The SOCKS 4A extension is triggered by a specific, non-routable pattern in the <tt>DSTIP</tt> field of a standard SOCKSv4 request.</t>
      <section anchor="request-format">
        <name>Request Format</name>
        <t>To initiate a SOCKS 4A request (either CONNECT or BIND), the client sends a packet with the following structure:</t>
        <table anchor="socks4a-req-format">
          <name>SOCKS 4A Request Structure</name>
          <thead>
            <tr>
              <th align="left">Field</th>
              <th align="left">Description</th>
              <th align="left">Size (bytes)</th>
              <th align="left">Value/Notes</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">VN</td>
              <td align="left">Version Number</td>
              <td align="left">1</td>
              <td align="left">0x04</td>
            </tr>
            <tr>
              <td align="left">CD</td>
              <td align="left">Command Code</td>
              <td align="left">1</td>
              <td align="left">0x01 (CONNECT) or 0x02 (BIND)</td>
            </tr>
            <tr>
              <td align="left">DSTPORT</td>
              <td align="left">Destination Port</td>
              <td align="left">2</td>
              <td align="left">Network Byte Order</td>
            </tr>
            <tr>
              <td align="left">DSTIP</td>
              <td align="left">Destination IP</td>
              <td align="left">4</td>
              <td align="left">0x00, 0x00, 0x00, x (x != 0)</td>
            </tr>
            <tr>
              <td align="left">USERID</td>
              <td align="left">User Identifier</td>
              <td align="left">variable</td>
              <td align="left">Variable length, NULL terminated</td>
            </tr>
            <tr>
              <td align="left">DOMAIN</td>
              <td align="left">Destination Domain</td>
              <td align="left">variable</td>
              <td align="left">Variable length, NULL terminated</td>
            </tr>
          </tbody>
        </table>
        <section anchor="dstip-encoding-and-signaling">
          <name>DSTIP Encoding and Signaling</name>
          <t>To signal a SOCKS 4A extension request, the client <bcp14>MUST</bcp14> set the first three octets of the DSTIP field to 0x00 and the final octet to a non-zero value in network byte order (i.e., representing an IPv4 address in the range 0.0.0.1 through 0.0.0.255).</t>
          <t>This specific address range, part of the 0.0.0.0/8 block, is reserved by IANA for "this host on this network" <xref target="RFC1122"/> and is not a routable destination. This ensures that the 4A signal is syntactically distinct from standard SOCKSv4 requests. A SOCKS server receiving such a DSTIP <bcp14>MUST</bcp14> ignore its numerical value and proceed to extract the destination address from the DOMAIN field as defined in <xref target="destination-domain-name-field"/>.</t>
        </section>
        <section anchor="destination-domain-name-field">
          <name>Destination Domain Name Field</name>
          <t>The <tt>DOMAIN</tt> field contains the fully qualified domain name (FQDN) of the application server. To ensure protocol stability and prevent common parsing errors, the following rules <bcp14>MUST</bcp14> be observed:</t>
          <ul spacing="normal">
            <li>
              <t>Positioning: The <tt>DOMAIN</tt> field <bcp14>MUST</bcp14> begin immediately after the <tt>NULL</tt> (0x00) terminator of the <tt>USERID</tt> field.</t>
            </li>
            <li>
              <t>Encoding: The domain name <bcp14>SHOULD</bcp14> be encoded in US-ASCII. While some implementations support Internationalized Domain Names (IDNs), clients <bcp14>SHOULD</bcp14> use the Punycode-encoded A-label format <xref target="RFC5891"/> to ensure maximum compatibility.</t>
            </li>
            <li>
              <t>Termination: The field <bcp14>MUST</bcp14> be terminated by a single <tt>NULL</tt> (0x00) octet.</t>
            </li>
            <li>
              <t>Length Constraints: The <tt>DOMAIN</tt> string (excluding the terminator) <bcp14>SHOULD NOT</bcp14> exceed <strong>255 octets</strong>, consistent with the maximum length of a FQDN defined in <xref target="RFC1035"/>. Servers <bcp14>SHOULD</bcp14> enforce a maximum buffer limit for this field to mitigate resource exhaustion attacks.</t>
            </li>
          </ul>
        </section>
      </section>
    </section>
    <section anchor="server-processing">
      <name>Server Processing</name>
      <t>Upon receiving a request packet, a SOCKS 4A compliant server <bcp14>MUST</bcp14> perform the following steps:</t>
      <ol spacing="normal" type="1"><li>
          <t>Inspection: Read the first 8 bytes of the request to evaluate <tt>VN</tt>, <tt>CD</tt>, <tt>DSTPORT</tt>, and <tt>DSTIP</tt>.</t>
        </li>
        <li>
          <t>Logic Trigger: If <tt>DSTIP</tt> matches the pattern <tt>0.0.0.x</tt> (where ): Firstly, the server <bcp14>MUST</bcp14> continue reading the stream to extract the <tt>USERID</tt> (up to the first <tt>NULL</tt>). The server <bcp14>MUST</bcp14> then continue reading to extract the <tt>DOMAIN</tt> string (up to the second <tt>NULL</tt>).</t>
        </li>
        <li>
          <t>Resolution: The server attempts to resolve the <tt>DOMAIN</tt> string to an IPv4 address.</t>
        </li>
        <li>
          <t>Action: If the domain resolves, the server proceeds with the connection to the resolved IP and <tt>DSTPORT</tt>. If the domain cannot be resolved, the server <bcp14>MUST</bcp14> send a reply with <tt>CD=91</tt> (request rejected or failed) and terminate the connection.</t>
        </li>
      </ol>
      <t>When the SOCKS server has processed the request, it sends an 8-byte reply packet to the client:</t>
      <table anchor="socks4a-rep-format">
        <name>SOCKS 4A Reply Structure</name>
        <thead>
          <tr>
            <th align="left">Field</th>
            <th align="left">Description</th>
            <th align="left">Size (bytes)</th>
            <th align="left">Value/Notes</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">VN</td>
            <td align="left">Reply Version</td>
            <td align="left">1</td>
            <td align="left">0x00 (Null byte)</td>
          </tr>
          <tr>
            <td align="left">CD</td>
            <td align="left">Result Code</td>
            <td align="left">1</td>
            <td align="left">0x5A (Granted), 0x5B (Rejected/Failed), etc.</td>
          </tr>
          <tr>
            <td align="left">DSTPORT</td>
            <td align="left">Destination Port</td>
            <td align="left">2</td>
            <td align="left">Ignored for CONNECT; provided for BIND</td>
          </tr>
          <tr>
            <td align="left">DSTIP</td>
            <td align="left">Destination IP</td>
            <td align="left">4</td>
            <td align="left">Ignored for CONNECT; provided for BIND</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>See <xref target="security-analysis"/>.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>No IANA actions required.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="SOCKS4" target="https://www.openssh.org/txt/socks4.protocol">
          <front>
            <title>SOCKS: A protocol for TCP proxy across firewalls</title>
            <author initials="Y.-D." surname="Lee" fullname="Ying-Da Lee">
              <organization>NEC Systems Laboratory, CSTC</organization>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="SOCKS">
          <front>
            <title>SOCKS</title>
            <author initials="D." surname="Koblas" fullname="David Koblas">
              <organization>Netskope</organization>
            </author>
            <date year="1992"/>
          </front>
          <seriesInfo name="1992 Usenix Security Symposium" value=""/>
        </reference>
        <reference anchor="SOCKS4a" target="https://www.openssh.org/txt/socks4a.protocol">
          <front>
            <title>SOCKS 4A: A  Simple Extension to SOCKS 4 Protocol</title>
            <author initials="Y.-D." surname="Lee" fullname="Ying-Da Lee">
              <organization>NEC Systems Laboratory, CSTC</organization>
            </author>
            <date>n.d.</date>
          </front>
        </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>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC791">
          <front>
            <title>Internet Protocol</title>
            <author fullname="J. Postel" initials="J." surname="Postel"/>
            <date month="September" year="1981"/>
          </front>
          <seriesInfo name="STD" value="5"/>
          <seriesInfo name="RFC" value="791"/>
          <seriesInfo name="DOI" value="10.17487/RFC0791"/>
        </reference>
        <reference anchor="RFC1122">
          <front>
            <title>Requirements for Internet Hosts - Communication Layers</title>
            <author fullname="R. Braden" initials="R." role="editor" surname="Braden"/>
            <date month="October" year="1989"/>
            <abstract>
              <t>This RFC is an official specification for the Internet community. It incorporates by reference, amends, corrects, and supplements the primary protocol standards documents relating to hosts. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="3"/>
          <seriesInfo name="RFC" value="1122"/>
          <seriesInfo name="DOI" value="10.17487/RFC1122"/>
        </reference>
        <reference anchor="RFC9293">
          <front>
            <title>Transmission Control Protocol (TCP)</title>
            <author fullname="W. Eddy" initials="W." role="editor" surname="Eddy"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>This document specifies the Transmission Control Protocol (TCP). TCP is an important transport-layer protocol in the Internet protocol stack, and it has continuously evolved over decades of use and growth of the Internet. Over this time, a number of changes have been made to TCP as it was specified in RFC 793, though these have only been documented in a piecemeal fashion. This document collects and brings those changes together with the protocol specification from RFC 793. This document obsoletes RFC 793, as well as RFCs 879, 2873, 6093, 6429, 6528, and 6691 that updated parts of RFC 793. It updates RFCs 1011 and 1122, and it should be considered as a replacement for the portions of those documents dealing with TCP requirements. It also updates RFC 5961 by adding a small clarification in reset handling while in the SYN-RECEIVED state. The TCP header control bits from RFC 793 have also been updated based on RFC 3168.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="7"/>
          <seriesInfo name="RFC" value="9293"/>
          <seriesInfo name="DOI" value="10.17487/RFC9293"/>
        </reference>
        <reference anchor="RFC1928">
          <front>
            <title>SOCKS Protocol Version 5</title>
            <author fullname="M. Leech" initials="M." surname="Leech"/>
            <author fullname="M. Ganis" initials="M." surname="Ganis"/>
            <author fullname="Y. Lee" initials="Y." surname="Lee"/>
            <author fullname="R. Kuris" initials="R." surname="Kuris"/>
            <author fullname="D. Koblas" initials="D." surname="Koblas"/>
            <author fullname="L. Jones" initials="L." surname="Jones"/>
            <date month="March" year="1996"/>
            <abstract>
              <t>This memo describes a protocol that is an evolution of the previous version of the protocol, version 4 [1]. This new protocol stems from active discussions and prototype implementations. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="1928"/>
          <seriesInfo name="DOI" value="10.17487/RFC1928"/>
        </reference>
        <reference anchor="RFC1929">
          <front>
            <title>Username/Password Authentication for SOCKS V5</title>
            <author fullname="M. Leech" initials="M." surname="Leech"/>
            <date month="March" year="1996"/>
            <abstract>
              <t>The protocol specification for SOCKS Version 5 specifies a generalized framework for the use of arbitrary authentication protocols in the initial socks connection setup. This document describes one of those protocols, as it fits into the SOCKS Version 5 authentication "subnegotiation". [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="1929"/>
          <seriesInfo name="DOI" value="10.17487/RFC1929"/>
        </reference>
        <reference anchor="RFC3552">
          <front>
            <title>Guidelines for Writing RFC Text on Security Considerations</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <author fullname="B. Korver" initials="B." surname="Korver"/>
            <date month="July" year="2003"/>
            <abstract>
              <t>All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC authors on how to write a good Security Considerations section. 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="72"/>
          <seriesInfo name="RFC" value="3552"/>
          <seriesInfo name="DOI" value="10.17487/RFC3552"/>
        </reference>
        <reference anchor="RFC3365">
          <front>
            <title>Strong Security Requirements for Internet Engineering Task Force Standard Protocols</title>
            <author fullname="J. Schiller" initials="J." surname="Schiller"/>
            <date month="August" year="2002"/>
          </front>
          <seriesInfo name="BCP" value="61"/>
          <seriesInfo name="RFC" value="3365"/>
          <seriesInfo name="DOI" value="10.17487/RFC3365"/>
        </reference>
        <reference anchor="RFC5891">
          <front>
            <title>Internationalized Domain Names in Applications (IDNA): Protocol</title>
            <author fullname="J. Klensin" initials="J." surname="Klensin"/>
            <date month="August" year="2010"/>
            <abstract>
              <t>This document is the revised protocol definition for Internationalized Domain Names (IDNs). The rationale for changes, the relationship to the older specification, and important terminology are provided in other documents. This document specifies the protocol mechanism, called Internationalized Domain Names in Applications (IDNA), for registering and looking up IDNs in a way that does not require changes to the DNS itself. IDNA is only meant for processing domain names, not free text. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5891"/>
          <seriesInfo name="DOI" value="10.17487/RFC5891"/>
        </reference>
        <reference anchor="RFC1035">
          <front>
            <title>Domain names - implementation and specification</title>
            <author fullname="P. Mockapetris" initials="P." surname="Mockapetris"/>
            <date month="November" year="1987"/>
            <abstract>
              <t>This RFC is the revised specification of the protocol and format used in the implementation of the Domain Name System. It obsoletes RFC-883. This memo documents the details of the domain name client - server communication.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="13"/>
          <seriesInfo name="RFC" value="1035"/>
          <seriesInfo name="DOI" value="10.17487/RFC1035"/>
        </reference>
      </references>
    </references>
    <?line 151?>

<section anchor="common-operational-extensions">
      <name>Common Operational Extensions</name>
      <section anchor="proxy-chaining">
        <name>Proxy Chaining</name>
        <t>In complex network topologies, a "SOCKSified" server (a proxy that acts as a client to another proxy) may receive a SOCKS 4A request. If the intermediate server cannot resolve the domain name itself (e.g., it is also behind a restrictive firewall), it <bcp14>MAY</bcp14> pass the SOCKS 4A request intact to the next-hop upstream SOCKS server. This allows resolution to happen at the most external point of the network.</t>
      </section>
      <section anchor="handling-leaky-clients">
        <name>Handling "Leaky" Clients</name>
        <t>Some client implementations may attempt to send SOCKS 4A requests even if they have already resolved the IP. While the specification suggests 4A is for clients that <em>cannot</em> resolve names, servers <bcp14>SHOULD</bcp14> accept 4A requests regardless of the client's local capabilities to ensure maximum compatibility.</t>
      </section>
    </section>
    <section anchor="security-analysis">
      <name>Security Analysis</name>
      <t>This section provides an analysis of the security implications introduced by the SOCKS 4A extension. As an extension to SOCKSv4, it inherits the fundamental insecurities of the base protocol while introducing new vectors related to remote name resolution.</t>
      <section anchor="dns-privacy-and-information-leakage">
        <name>DNS Privacy and information Leakage</name>
        <t>SOCKS 4A functions as a countermeasure against DNS leakage at the client-side network layer. In the base SOCKSv4 protocol, the Requirement for the client to provide a literal IPv4 address necessitates a local DNS lookup. This transaction is typically unencrypted and occurs outside the proxy tunnel, exposing the destination hostname to local network observers and the DNS recursive resolver.</t>
        <t>By delegating resolution to the SOCKS server, the client encapsulates the intent (the DOMAIN string) within the TCP session established to the SOCKS server. However, this merely shifts the point of leakage; the SOCKS server’s own DNS queries may still be observable unless the server implements encrypted DNS transport (e.g., DNS over TLS).</t>
      </section>
      <section anchor="server-side-request-forgery">
        <name>Server-Side Request Forgery</name>
        <t>The SOCKS 4A resolution mechanism enables a primitive form of Server-Side Request Forgery. Because the server performs resolution and subsequent connection on behalf of the client, a malicious client may use the SOCKS server to:</t>
        <ul spacing="normal">
          <li>
            <t>Probe Internal Infrastructure: Access or scan hostnames and IP addresses that are non-routable or firewalled from the public internet but reachable from the SOCKS server’s internal interface.</t>
          </li>
          <li>
            <t>Resolve Split-Horizon DNS: Enumerate internal DNS records that are only visible to the SOCKS server's configured resolvers.</t>
          </li>
        </ul>
        <t>Implementations <bcp14>SHOULD</bcp14> employ strict egress filtering and Access Control Lists (ACLs) to prevent the SOCKS server from connecting to loopback addresses (127.0.0.0/8), private address space (RFC 1918), or link-local addresses.</t>
      </section>
      <section anchor="denial-of-service-and-resource-exhaustion">
        <name>Denial of Service and Resource Exhaustion</name>
        <t>The variable-length nature of the SOCKS 4A request introduces two primary vectors for resource exhaustion:</t>
        <ol spacing="normal" type="1"><li>
            <t>Memory Exhaustion: A SOCKS 4A request involves two variable-length NULL-terminated strings (USERID and DOMAIN). An implementation that fails to enforce strict bounds on these fields during the "read-until-NULL" phase is vulnerable to heap exhaustion. Servers <bcp14>MUST</bcp14> enforce a maximum buffer limit (<bcp14>RECOMMENDED</bcp14> 255 octets for DOMAIN) and terminate connections that exceed this limit without a NULL terminator.</t>
          </li>
          <li>
            <t>Resolver Tarpitting: DNS resolution is an asynchronous, I/O-bound operation. A client may initiate numerous concurrent 4A requests targeting non-responsive or slow DNS authoritative servers. This can exhaust the server's thread pool or file descriptors. Servers <bcp14>MUST</bcp14> implement a per-request resolution timeout.</t>
          </li>
        </ol>
      </section>
      <section anchor="lack-of-cryptographic-integrity-and-authentication">
        <name>Lack of Cryptographic Integrity and Authentication</name>
        <t>SOCKS 4A, like its predecessor, provides no facility for session encryption, message integrity, or robust authentication.</t>
        <ul spacing="normal">
          <li>
            <t>Identity Spoofing: The <tt>USERID</tt> field is provided by the client without any cryptographic proof of identity. It is trivial to spoof and <bcp14>SHOULD NOT</bcp14> be relied upon for security-critical authorization.</t>
          </li>
          <li>
            <t>Active Interception: The entire handshake, including the <tt>DOMAIN</tt> string, is transmitted in plaintext. An attacker in the path between the client and the SOCKS server can perform a Man-in-the-Middle (MITM) attack, observing the destination domain or modifying the server's reply to redirect the client.</t>
          </li>
        </ul>
        <t>Implementations requiring confidentiality or integrity <bcp14>MUST</bcp14> wrap the SOCKS 4A transaction in a secure transport layer, such as TLS or an SSH tunnel.</t>
      </section>
    </section>
    <section numbered="false" anchor="original-author">
      <name>Original Author</name>
      <artwork><![CDATA[
      Ying-Da Lee
      Principal Member Technical Staff
      NEC Systems Laboratory, CSTC
      ylee@syl.dl.nec.com

      David Koblas
      Netskope
]]></artwork>
      <t>We sincerely apologize that, due to the document's long history and the passage of time, many early contributors may not have been formally included in this list. We extend our deepest gratitude to all who have contributed to this work. If you believe your name should be added to the acknowledgments, please contact the draft maintainers.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA81a23IbOZJ951dg5IehHCRtyfa2rZmeGVmy19rRbUS5Ozo6
OkJgFUhiVCzUFKoo0ZeN/Y1922/ZT9kv2ZOZQF0o9WVjYyPW3e0miwUkkJeT
JxMYj8eDylaZOVA704ujv07VZekql7hMfWdKb12uXh7uDPRsVpp18w49SnRl
Fq7cHKil9ZUrbTIYpC7J9QpzpaWeV+O1zhMz9i659eP1Sz1+/nzg69nKepq3
2hR40eapKQz+yqsB5n8xGOi6WrryYKDGA4U/8zrLZM5jnVuTqX/BF6++o6n5
BVcu8MMnXWHOA3XSmY9+NSttM6zn77SWv7i6ypy7nSRuNRjkrlxh1NpAluJ9
vTzgMfjTU8mBOlRF1Mrcler66JIe3G+UTkrnvZrb0tzpLPM7cYJmF/GP7OEH
my/Gx1qdGtP+hB0cqPN3R2q68ZV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