<?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.29 (Ruby 3.4.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-vance-socks-v4-01" category="historic" submissionType="independent" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title abbrev="SOCKS4 SPEC">SOCKS Protocol Version 4 Specification</title>
    <seriesInfo name="Internet-Draft" value="draft-vance-socks-v4-01"/>
    <author fullname="Daniel James Vance">
      <organization>Independent</organization>
      <address>
        <email>djvanc@outlook.com</email>
      </address>
    </author>
    <date year="2025" month="November" day="04"/>
    <abstract>
      <?line 27?>

<t>This document is published as a historical record of the SOCKS 4 protocol. The original spec does not have an Abstract, so the Abstract below is added afterwards.</t>
      <t>This document describes SOCKS version 4, a protocol designed to facilitate TCP proxy services across a network firewall. SOCKS operates at the session layer, providing application users with transparent access to network services on the other side of the firewall. It is application-protocol independent, allowing it to support a wide range of services, including those utilizing encryption, while maintaining minimum processing overhead by simply relaying data after initial access control checks. The protocol defines two primary operations: CONNECT for establishing outbound connections to an application server, and BIND for preparing for and accepting inbound connections initiated by an application server.</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 34?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The SOCKS protocol, Version 4 (SOCKSv4), <bcp14>SHALL</bcp14> be used to relay TCP sessions between an application client and an an application server via a SOCKS server, often positioned at a firewall host. The protocol <bcp14>MUST</bcp14> provide transparent access across the firewall for application users.</t>
      <t>The protocol <bcp14>MUST</bcp14> be application-protocol independent, allowing it to be used for various services, including, but not limited to, telnet, ftp, finger, whois, gopher, and WWW.</t>
      <t>The SOCKS server <bcp14>MUST</bcp14> apply access control mechanisms at the beginning of each TCP session. Following successful establishment, the SOCKS server <bcp14>MUST</bcp14> simply relay data between the client and the application server, incurring minimum processing overhead. The protocol inherently supports applications utilizing encryption, as the SOCKS server is not required to interpret the application protocol's payload.</t>
      <t>Two primary operations are defined: CONNECT and BIND.</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>
        <li>
          <t>IDENT: A protocol (as described in RFC 1413) used by the SOCKS server to verify the user identity of the client.</t>
        </li>
      </ul>
    </section>
    <section anchor="connect-operation">
      <name>CONNECT Operation</name>
      <t>The client <bcp14>MUST</bcp14> initiate a CONNECT request when it desires to establish an outbound TCP connection to an application server.</t>
      <section anchor="connect-request-packet-format">
        <name>CONNECT Request Packet Format</name>
        <t>The client <bcp14>MUST</bcp14> send a request packet with the following structure:</t>
        <t><tt>
                +----+----+----+----+----+----+----+----+----+----+....+----+
                | VN | CD | DSTPORT |      DSTIP      | USERID      |NULL|
                +----+----+----+----+----+----+----+----+----+----+....+----+
 Size (bytes):   1    1       2           4         variable     1
</tt></t>
        <ul spacing="normal">
          <li>
            <t>VN (Version Number): <bcp14>MUST</bcp14> be 4, representing the SOCKS protocol version.</t>
          </li>
          <li>
            <t>CD (Command Code): <bcp14>MUST</bcp14> be 1, indicating a CONNECT request.</t>
          </li>
          <li>
            <t>DSTPORT (Destination Port): The port number of the application server (network byte order).</t>
          </li>
          <li>
            <t>DSTIP (Destination IP): The IP address of the application server (network byte order).</t>
          </li>
          <li>
            <t>USERID (User Identifier): A string of characters representing the client's user ID.</t>
          </li>
          <li>
            <t>NULL: A single byte with a value of all zero bits, terminating the USERID field.</t>
          </li>
        </ul>
      </section>
      <section anchor="connect-processing-and-reply">
        <name>CONNECT Processing and Reply</name>
        <t>The SOCKS server <bcp14>MUST</bcp14> determine whether to grant the request based on criteria such as the source IP address, DSTIP, DSTPORT, USERID, and information obtained via IDENT (cf. RFC 1413).</t>
        <t>If the request is granted, the SOCKS server <bcp14>MUST</bcp14> attempt to establish a TCP connection to the specified DSTPORT on the DSTIP.</t>
        <t>A reply packet <bcp14>MUST</bcp14> be sent to the client upon the establishment of the connection, rejection of the request, or operational failure.</t>
      </section>
      <section anchor="connect-reply-packet-format">
        <name>CONNECT Reply Packet Format</name>
        <t>The SOCKS server <bcp14>MUST</bcp14> send a reply packet with the following structure:</t>
        <t><tt>
                +----+----+----+----+----+----+----+----+
                | VN | CD | DSTPORT |      DSTIP      |
                +----+----+----+----+----+----+----+----+
 Size (bytes):   1    1       2           4
</tt></t>
        <t> - VN: <bcp14>MUST</bcp14> be 0, representing the reply version code.
 - CD (Result Code): The SOCKS server <bcp14>MUST</bcp14> use one of the following values:
     - 90: Request granted.
     - 91: Request rejected or failed.
     - 92: Request rejected due to inability to connect to identd on the client.
     - 93: Request rejected because the client program and identd report different user-IDs.
 - DSTPORT and DSTIP: These fields <bcp14>MUST</bcp14> be ignored by the client in a CONNECT reply.</t>
        <t>If the request is rejected or failed (CD != 90), the SOCKS server <bcp14>MUST</bcp14> close its connection to the client immediately after sending the reply.</t>
        <t>If the request is successful (CD = 90), the SOCKS server <bcp14>MUST</bcp14> immediately begin relaying traffic in both directions between the client connection and the established application server connection. The client <bcp14>MUST</bcp14> then treat its connection to the SOCKS server as if it were a direct connection to the application server.</t>
      </section>
    </section>
    <section anchor="bind-operation">
      <name>BIND Operation</name>
      <t>The client <bcp14>MUST</bcp14> initiate a BIND request when it requires the SOCKS server to prepare for an inbound connection from an application server. This operation is typically used for protocols that involve a secondary data connection originating from the server (e.g., FTP's active mode). A BIND request <bcp14>SHOULD</bcp14> only be sent after a primary connection to the application server has been successfully established using a CONNECT request.</t>
      <section anchor="bind-request-packet-format">
        <name>BIND Request Packet Format</name>
        <t>The client <bcp14>MUST</bcp14> send a request packet identical in format to the CONNECT request:</t>
        <t><tt>
                +----+----+----+----+----+----+----+----+----+----+....+----+
                | VN | CD | DSTPORT |      DSTIP      | USERID      |NULL|
                +----+----+----+----+----+----+----+----+----+----+....+----+
 Size (bytes):   1    1       2           4         variable     1
</tt></t>
        <t> - VN: <bcp14>MUST</bcp14> be 4.
 - CD: <bcp14>MUST</bcp14> be 2, indicating a BIND request.
 - DSTPORT: The port number of the primary connection to the application server.
 - DSTIP: The IP address of the application server.
 - USERID and NULL: As defined for the CONNECT request.</t>
      </section>
      <section anchor="bind-first-reply-socket-assignment">
        <name>BIND First Reply (Socket Assignment)</name>
        <t>The SOCKS server <bcp14>MUST</bcp14> first decide whether to grant the BIND request. The reply format <bcp14>MUST</bcp14> be the same as the CONNECT reply format.</t>
        <t>If the request is rejected (CD != 90), the SOCKS server <bcp14>MUST</bcp14> close its connection to the client immediately.</t>
        <t>If the request is granted (CD = 90):</t>
        <t>1.  The SOCKS server <bcp14>MUST</bcp14> obtain a local socket and begin listening for an incoming connection.
2.  The SOCKS server <bcp14>MUST</bcp14> send a first reply packet where the DSTPORT and DSTIP fields are meaningful:
    - DSTPORT <bcp14>MUST</bcp14> contain the port number of the newly listening socket (network byte order).
    - DSTIP <bcp14>MUST</bcp14> contain the IP address of the SOCKS server's listening interface (network byte order).
3.  If the SOCKS server returns a DSTIP of 0 (the value of constant 'INADDR_ANY'), the client <bcp14>MUST</bcp14> replace this value with the IP address of the SOCKS server to which the client is currently connected.
4.  The client <bcp14>MUST</bcp14> use this IP address and port to inform the application server via the primary connection, enabling the application server to initiate the anticipated inbound connection to the SOCKS server.</t>
      </section>
      <section anchor="bind-second-reply-connection-established">
        <name>BIND Second Reply (Connection Established)</name>
        <t>The SOCKS server <bcp14>MUST</bcp14> send a second reply packet to the client once the anticipated inbound connection from the application server is established. The reply format <bcp14>MUST</bcp14> be the same as the first reply.</t>
        <t>The SOCKS server <bcp14>MUST</bcp14> check the IP address of the newly connected application server host against the DSTIP value specified in the client's original BIND request.</t>
        <t>  - If the IP addresses match: The CD field in the second reply <bcp14>MUST</bcp14> be set to 90. The SOCKS server <bcp14>MUST</bcp14> then prepare to relay traffic between the client connection and the new application server connection.
  - If a mismatch is found: The CD field in the second reply <bcp14>MUST</bcp14> be set to 91. The SOCKS server <bcp14>MUST</bcp14> immediately close both the client connection and the connection from the application server.</t>
        <t>Upon a successful second reply, the client <bcp14>MUST</bcp14> perform I/O on its connection to the SOCKS server as if it were directly connected to the application server.</t>
      </section>
    </section>
    <section anchor="timeout-mechanism">
      <name>Timeout Mechanism</name>
      <t>For both CONNECT and BIND operations, the SOCKS server <bcp14>MUST</bcp14> employ a time limit for the establishment of its connection with the application server (e.g., 2 minutes). If the connection is not established before the time limit expires, the SOCKS server <bcp14>MUST</bcp14> close its connection to the client and abort the operation.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The SOCKS Version 4 (SOCKSv4) protocol, designed for TCP proxy traversal of network firewalls, operates exclusively at the session layer and <strong>inherently lacks robust security mechanisms</strong>. Its deployment and operational policy must be rigorously evaluated against the deficiencies outlined herein.</t>
      <section anchor="authentication-and-authorization-deficiencies">
        <name>Authentication and Authorization Deficiencies</name>
        <section anchor="weak-client-identification-mechanism">
          <name>Weak Client Identification Mechanism</name>
          <t>The SOCKSv4 request format incorporates a <strong><tt>USERID</tt></strong> field. This field is designated for rudimentary client identification, typically intended for conjunction with the <strong>IDENT protocol</strong> (specified in [RFC 1413]).</t>
          <ul spacing="normal">
            <li>
              <t><strong>Ident Protocol Vulnerability:</strong> Reliance on IDENT constitutes a <strong>significant security risk</strong>. The IDENT protocol operates via an untrusted daemon resident on the client host, rendering the identification process susceptible to trivial <strong>spoofing or malicious disabling</strong>.</t>
            </li>
            <li>
              <t><strong>Absence of Strong Authentication:</strong> SOCKSv4 <strong>lacks integrated provisions</strong> for strong client-to-server or server-to-client authentication. This includes the absence of any mechanism for verifying user credentials, such as passwords, or employing cryptographic challenge-response methods.</t>
            </li>
          </ul>
        </section>
        <section anchor="policy-dependent-authorization">
          <name>Policy-Dependent Authorization</name>
          <t>Access control (authorization) for SOCKSv4 services is <strong>exclusively managed</strong> by the local configuration and security policy of the SOCKS server implementation. A failure in the server's configuration or a weakness in its policy can directly result in <strong>unauthorized network access</strong> across the protective boundary of the firewall.</t>
        </section>
      </section>
      <section anchor="data-integrity-and-transport-limitations">
        <name>Data Integrity and Transport Limitations</name>
        <section anchor="absence-of-confidentiality-plaintext-relay">
          <name>Absence of Confidentiality (Plaintext Relay)</name>
          <t>SOCKSv4 functions as a session layer relay and <strong>does not incorporate any encryption</strong> capabilities for the application data stream. All application traffic traversing the SOCKS proxy is forwarded in <strong>plaintext</strong>. This inherent vulnerability exposes all transmitted data to <strong>passive network eavesdropping</strong> and interception.</t>
        </section>
        <section anchor="protocol-scope-restriction">
          <name>Protocol Scope Restriction</name>
          <t>The SOCKSv4 protocol is <strong>strictly confined</strong> to the proxying of <strong>Transmission Control Protocol (TCP)</strong> connections. It provides <strong>no native support</strong> for the relay of <strong>User Datagram Protocol (UDP)</strong> traffic or other protocols operating at the IP layer.</t>
        </section>
      </section>
      <section anchor="vulnerabilities-associated-with-the-bind-operation">
        <name>Vulnerabilities Associated with the BIND Operation</name>
        <t>The <strong>BIND</strong> command, utilized to establish a socket for an anticipated inbound connection (a callback) from an application server, introduces distinct security challenges.</t>
        <section anchor="source-address-verification-bypass">
          <name>Source Address Verification Bypass</name>
          <t>The SOCKS server attempts a rudimentary security check during the BIND operation by comparing the source IP address of the incoming connection with the target address (<tt>DSTIP</tt>) specified in the client's request.</t>
          <ul spacing="normal">
            <li>
              <t><strong>IP Address Spoofing Risk:</strong> A malicious actor could potentially <strong>forge the source IP address</strong> of the inbound connection, thereby bypassing this basic server check and facilitating the establishment of an <strong>unauthorized session</strong>.</t>
            </li>
            <li>
              <t><strong>NAT/PAT Incompatibility:</strong> In network topologies employing <strong>Network Address Translation (NAT)</strong> or <strong>Port Address Translation (PAT)</strong>, the source IP address is structurally altered. This modification renders the BIND source address verification mechanism <strong>unreliable, ineffectual, or operationally complex</strong> to maintain.</t>
            </li>
          </ul>
        </section>
      </section>
      <section anchor="denial-of-service-dos-vector">
        <name>Denial of Service (DoS) Vector</name>
        <section anchor="resource-exhaustion-potential">
          <name>Resource Exhaustion Potential</name>
          <t>Each successful SOCKS connection consumes finite server resources, including active sockets, allocated memory, and network bandwidth. A malicious client can exploit this by initiating a <strong>large volume of connection attempts</strong>—particularly through the resource-intensive <strong>BIND operation</strong>—to rapidly exhaust the SOCKS server's capacity. This constitutes a direct vector for a <strong>Denial of Service</strong> attack against legitimate users.</t>
        </section>
        <section anchor="inadequate-mitigations">
          <name>Inadequate Mitigations</name>
          <t>Although the protocol specifies a basic connection establishment <strong>timeout mechanism (2 minutes)</strong>, this measure is insufficient in scope and rigor to fully mitigate the risks associated with sophisticated DoS attacks.</t>
        </section>
      </section>
      <section anchor="recommended-mitigation-and-deployment-practices">
        <name>Recommended Mitigation and Deployment Practices</name>
        <t>Given the security deficiencies of SOCKSv4, deployment should be guided by the following principles:</t>
        <ol spacing="normal" type="1"><li>
            <t>Strict Operational Environment: SOCKSv4 is only recommended for use in environments designated as highly trusted and subject to stringent local policy control*.</t>
          </li>
          <li>
            <t>Layered Security via Encrypted Tunnels: Where SOCKSv4 must transport sensitive application traffic, the protocol must be encapsulated within an existing secure transport layer, such as a Transport Layer Security (TLS/SSL) or IPsec tunnel, to establish confidentiality and integrity.</t>
          </li>
          <li>
            <t>Protocol Migration: Operators should actively plan for the migration to or substitution with a more secure protocol version, specifically SOCKS Version 5 ([RFC 1928]), which incorporates native, robust authentication methods.</t>
          </li>
        </ol>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document describes the SOCKS Version 4 protocol, which is presented as a historical record. This protocol does not define any new protocol fields, codes, or registries that require assignment by the Internet Assigned Numbers Authority (IANA).</t>
      <t>The existing values used within the protocol are summarized below:</t>
      <section anchor="socks-protocol-version-number-vn">
        <name>SOCKS Protocol Version Number (VN)</name>
        <ul spacing="normal">
          <li>
            <t>The SOCKS protocol version number <tt>VN</tt> in requests is <strong>4 (0x04)</strong>.</t>
          </li>
          <li>
            <t>The SOCKS protocol version number <tt>VN</tt> in replies is <strong>0 (0x00)</strong>.</t>
          </li>
        </ul>
      </section>
      <section anchor="socks-command-code-cd">
        <name>SOCKS Command Code (CD)</name>
        <t>The SOCKS command code <tt>CD</tt> in requests defines two values:
    * <strong>1 (0x01):</strong> CONNECT
    * <strong>2 (0x02):</strong> BIND</t>
      </section>
      <section anchor="socks-reply-code-cd">
        <name>SOCKS Reply Code (CD)</name>
        <t>The SOCKS reply code <tt>CD</tt> in replies defines four values:
    * <strong>90 (0x5A):</strong> Request granted
    * <strong>91 (0x5B):</strong> Request rejected or failed
    * <strong>92 (0x5C):</strong> Request rejected because SOCKS server cannot connect to <tt>identd</tt> on the client
    * <strong>93 (0x5D):</strong> Request rejected because the client program and <tt>identd</tt> report different user-ids</t>
      </section>
      <section anchor="port-number">
        <name>Port Number</name>
        <t>The SOCKS protocol is conventionally known to use <strong>TCP port 1080</strong> for its service. This port number has already been registered in the <strong>IANA Service Name and Transport Protocol Port Number Registry</strong> for the <tt>socks</tt> service.</t>
      </section>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC1413">
          <front>
            <title>Identification Protocol</title>
            <author fullname="M. St. Johns" initials="M." surname="St. Johns"/>
            <date month="February" year="1993"/>
            <abstract>
              <t>The Identification Protocol was formerly called the Authentication Server Protocol. It has been renamed to better reflect its function. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="1413"/>
          <seriesInfo name="DOI" value="10.17487/RFC1413"/>
        </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="RFC793">
          <front>
            <title>Transmission Control Protocol</title>
            <author fullname="J. Postel" initials="J." surname="Postel"/>
            <date month="September" year="1981"/>
          </front>
          <seriesInfo name="RFC" value="793"/>
          <seriesInfo name="DOI" value="10.17487/RFC0793"/>
        </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>
      </references>
    </references>
    <?line 270?>

<section numbered="false" anchor="original-auther">
      <name>Original Auther</name>
      <artwork><![CDATA[
Ying-Da Lee
Principal Member Technical Staff
NEC Systems Laboratory, CSTC
ylee@syl.dl.nec.com
]]></artwork>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1b7XbbRpL9j6fo0fwIxSEZy1bOxDrzxYjKRruypBVp5+TM
5KxAoEkiBgEuGqDMfMzZh9gH8LP4UfZJ9lZVN9AgIcdOsv/Wx5ZFEOiurq66
dau6MBwOgzIpU32mjqY35/82VbdFXuZRnqpXujBJnqlTNd3oKFkkUVji81EQ
zueF3roH8PXtxflRgG/1Mi92Z2qVmDIvkigI4jzKwjXGjotwUQ63YRbpocmj
12a4PR0+OQlMNV8nhqYpdxvcl2Sx3mj8yMoAMzwLgrAqV3lxFqhhoPBnUaWp
DDkJs0Sn6l/xwahXNDLfkBdLfPE9i3qmLr3x6Fu9DpMU4nxHovwtr8o0z1+P
onwdBFlerPHUVmMudffl+cnpybOzIEiyxd4Xf3x+Uv/2zN38/Onnza/P8dxo
NAqC4XCowrkpizAqg2AGxSiopFpDHIXfN9U8TcxKxyo0Kqz1Fqaq0FFexCpf
qHKllWzMqdrYrRmpGa7i1mWS4WaD7cG4UEOWl2oVbrUKMzW28w6UyXkUd0HN
dZo/0PxhHNPci1IXD2ERm9G+jLE2UZHMMbKIsHUmMYC4Thq6K1lmGKnM1SKM
kjQpYQtqdn5L97zZKaOLbRJhlDAqckNLzXT5kBev1SIp9EOYYkUyQb7RBZ7F
LSXLbDQbh0rDnS4GNNw2iZNsqcLNJrUGqSqMb9RDUq4UFpiZTViQ8GGEKQ0J
5War5cBDNHqO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