简单来说
TCP(传输控制协议)是大多数互联网流量的主要传输协议——网页、电子邮件、文件传输。它通过三次握手建立连接,然后保证字节按顺序到达且不丢失,重新传输任何丢失的数据。这种可靠性需要一些开销和延迟:确认和重传需要时间,单个丢失的数据包可能会阻塞后面的所有内容(头部阻塞)。它的对应协议UDP为了速度放弃了这些保证,这就是为什么实时应用程序通常更喜欢它。
它是如何与s4m一起工作的
Because TCP is connection-oriented and universal, it is what most proxies relay. A SOCKS5 proxy forwards TCP (the s4m SOCKS5 also handles UDP), and an HTTP proxy's CONNECT tunnel carries the TCP stream underneath HTTPS. TCP's reliability is why bulk transfers and page loads work predictably through a proxy, while its latency sensitivity is why an extra hop can noticeably lower throughput on high-latency links. When performance matters, measure a real transfer through your chosen path rather than assuming the proxy hop is free.
实用说明
问题,已解答
TCP 和 UDP 之间有什么区别?
TCP 保证有序、可靠的交付,并通过重传实现,但代价是额外的延迟和开销。UDP 在没有这些保证的情况下发送数据包,因此速度更快、开销更小,但可能会丢失或重新排序数据。可靠的应用程序使用 TCP;实时应用程序通常使用 UDP。