Visual RFC.
ALL RFCs / RFC 1928
Read the RFC ↗
RFC 1928 / SOCKS PROXY RELAY

Wait for CONNECT success before relaying data

03

The proxy opens its own target connection and reports an outcome. A successful reply describes its bound endpoint, not an echo of the target.

RFC 1928 · § 6EXAMPLE
4 / 4
Wait for CONNECT success before relaying dataFour CONNECT views. Client sends a target request to the SOCKS server, before application data. The proxy establishes a separate target connection and sends REP00 back to the client, reporting its outgoing bound endpoint198.51.100.9 port40000 rather than echoing destination203.0.113.20 port443. Only after success does data cross both legs. An independent refused target attempt produces REP05 back to the client and a stopped data path; the SOCKS server closes TCP within the specified failure bound. Method-dependent protection is separate.Separate refused CONNECT attemptClientSOCKSTargettarget refusedREP05relay application dataServer closes TCP after failure reply≤10 s after detecting the failure condition
04
Stop an independent refused connection.

Separate failed attempt: target connection is refused. The proxy sends REP05 toward the client, then closes within the specified bound. No data path reaches the target.

Source for this drawing: RFC 1928 · Read RFC section 6 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A request starts a conversation.

A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Success joins two connection legs; failure stops them.

  • For CONNECT, the proxy uses DST.ADDR/DST.PORT to connect to the target. The reply fields are VER, REP, RSV, ATYP, BND.ADDR and BND.PORT.
  • REP00 means success. CONNECT BND.ADDR/BND.PORT describe the proxy endpoint used for the target connection; that address can differ from the client-facing proxy address.
  • A failure REP other than00 requires the SOCKS server to terminate TCP shortly after replying, no more than10 seconds after detecting the failure condition. Data and replies use method-dependent protection when applicable.
DETAILS

The worked request targets203.0.113.20:443; the chosen proxy outgoing endpoint is198.51.100.9:40000, distinct from its client-facing address192.0.2.10. REP02 is policy refusal;03 network unreachable;04 host unreachable;05 connection refused;06 TTL expired;07 unsupported command;08 unsupported address type;01 general failure. The failure scene is an alternative, not a failure after the pictured successful transfer. SOCKS is not itself a TLS or VPN guarantee.

Read the RFC section ↗

All chapters in RFC 1928

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗