Are you an LLM? You can read better optimized documentation at /en\wiki\TCP.md for this page in Markdown format
TCP
TCP is a connection-oriented transport protocol that provides ordered, reliable delivery of a byte stream. It sits between application protocols and IP.
Main characteristics
TCP uses sequence numbers, acknowledgments, retransmission, flow control and congestion control. These features improve reliability but add overhead compared with UDP.
Connection lifecycle
A connection normally starts with a three-way handshake: SYN, SYN-ACK, ACK. It closes with FIN/ACK exchange or an abrupt reset. Applications such as HTTP, SSH and many proxy protocols use TCP.
Proxy context
Clash accepts TCP through HTTP, SOCKS, Redirect or TProxy listeners. See inbound configuration and TProxy.
