Explainer

TCP vs UDP for proxies: which apps need UDP and which proxies carry it

TCP or UDP? One DNS lookup took 2 packets over UDP and 10 over TCP, and UDP lost 4 of 140 answers. What that means for proxies, from HTTP to SOCKS5.

HProxy Team··Updated October 10, 2026·7 min read
HProxy.Explainer

Skip the dead lists.

That list re-checks every exit every few minutes across 100+ countries, with a live last-checked time, so you copy IPs that worked moments ago, not a stale text dump.

Open the free SOCKS5 list→

TCP and UDP are the two ways most internet traffic travels. TCP opens a connection first and then delivers every byte in order, resending whatever gets lost. UDP sends each datagram on its own, with no connection and no promise that it arrives. Through a proxy, that difference decides what can pass at all. HTTP proxies and SOCKS4 carry TCP only. SOCKS5 can carry UDP, but few SOCKS5 proxies actually do. For web pages, APIs and scraping, use TCP. UDP matters for DNS, voice, video, games and HTTP/3, and only when both the proxy and the app support it.

We measured the difference on 10 October 2026 instead of describing it. Our server sent the same DNS lookup both ways, 140 times each, and we captured the packets. We also counted which protocols the proxies on our free list speak.

What is the actual difference between TCP and UDP?

TCP talks before it sends. RFC 9293 (IETF, August 2022) calls the setup a "three-way handshake", and once it is done TCP "provides a reliable, in-order, byte-stream service to applications". Lost data is sent again, and nothing reaches the application out of order.

UDP simply sends. RFC 768 (IETF, August 1980) says "delivery and duplicate protection are not guaranteed", and it tells applications that need ordered, reliable delivery to use TCP. Whatever reliability a UDP application needs, it builds itself.

The order guarantee has a cost of its own. RFC 9114 (June 2022) explains it for HTTP/2 over TCP: "a lost or reordered packet causes all active transactions to experience a stall". This is head-of-line blocking. QUIC, which carries HTTP/3, avoids it across streams, and RFC 9000 (May 2021) says "QUIC packets are carried in UDP datagrams".

TCPUDPSource
Before the first byteThree-way handshakeNothingRFC 9293, RFC 768
DeliveryReliable, in order, resent when lostNot guaranteedRFC 9293, RFC 768
Header20 bytes without options8 bytesRFC 9293, RFC 768
One lost packetHolds up what comes after itOnly that datagram is goneRFC 9114, RFC 9000
One DNS lookup, as we captured it10 packets2 packetsOur capture, 10 October 2026

What did the same lookup cost over each?

We sent one DNS question, the A record of example.com, from our server to public resolvers. It went over UDP and over TCP in turn, and tcpdump recorded every packet:

Terminal output from our server: one DNS lookup to 9.9.9.9 over UDP takes 2 packets, a 29-byte query and a 61-byte answer; over TCP it takes 10 packets: SYN, SYN-ACK, ACK, the 31-byte query, ACK, the 63-byte answer, ACK, FIN, FIN and ACK.
One DNS lookup each way, captured on our server on 10 October 2026, 20:20 UTC. Screenshot of our own terminal.

UDP needed two packets: the question and the answer. TCP needed ten. Three set up the connection, four carried the question and the answer with an acknowledgement for each, and three closed it. The query also grew by two bytes, because DNS over TCP puts the message length in front.

Then we timed 50 rounds each way to 1.1.1.1 and to 8.8.8.8:

One DNS lookup over UDP and over TCP, 50 rounds each, 10 October 2026 (ms)
  • UDP
  • TCP
TCP spends at least one extra round trip on the handshake before it can ask anything.Source: HProxy measurement from our server, Python sockets, 20:16 UTC

The fastest values show the protocols most clearly. TCP took 2.8 ms against 1.0 ms to 1.1.1.1, and 15.8 against 7.1 ms to 8.8.8.8. The medians are higher for both, because our server was busy, with a load average of 10 to 12 during the test.

UDP paid for its speed in the other column. Across both runs, 4 of 140 UDP lookups got no answer within three seconds, and nothing told the program why. All 140 TCP lookups were answered. A program using UDP has to notice the silence and ask again.

What is each one best at?

TCP is best when every byte matters and must arrive in order. Web pages and APIs run on it. RFC 9112 gives the http scheme "a default connection of TCP over IP", and RFC 9114 notes that HTTP/2 has run "primarily with TLS over TCP". It is also the traffic an HTTP proxy's CONNECT carries.

UDP is best when late data is worse than lost data, or when one question and one answer are all there is:

  • DNS. RFC 1035 (November 1987) offers name servers over both, with UDP messages "restricted to 512 bytes" and longer answers truncated. Since RFC 7766 (March 2016), TCP support is "a REQUIRED part of a full DNS protocol implementation".
  • Voice and video. Calls and live media use RTP, which applications run "on top of UDP to make use of its multiplexing and checksum services", in the words of RFC 3550 (July 2003).
  • HTTP/3. It runs on QUIC over UDP. But RFC 9114 adds that when UDP is blocked, "clients SHOULD attempt to use TCP-based versions of HTTP".

Which proxies carry TCP and which carry UDP?

Proxy typeCarriesWhere it says so
HTTP proxy, CONNECTTCPRFC 9114: a CONNECT proxy "establishes a TCP connection"
HTTP proxy with RFC 9298UDPRFC 9298 (August 2022), a newer standard few proxies offer
SOCKS4TCPRFC 1928 extends "the SOCKS Version 4 model to include UDP"
SOCKS5TCP, and UDP through UDP ASSOCIATERFC 1928

The table is the protocol. Real proxies are narrower. At 20:18 UTC on 10 October 2026, our free proxy list held 4,933 live proxies. 1,846 answered HTTP, 1,111 HTTPS, 726 SOCKS4 and 2,004 SOCKS5, and many answered more than one. Only the SOCKS5 group can carry UDP at all. In a sample of 575 of them tested that evening, 17 relayed a real DNS query. Our page on SOCKS5 UDP shows why the others failed.

The client has a say too. Chromium's documentation states that "In Chrome SOCKSv5 is only used to proxy TCP-based URL requests". So even with a UDP-capable SOCKS5 proxy, Chrome sends it TCP only.

Which should you use with a proxy?

For web pages, APIs, scraping and account work, use TCP, through an HTTP or a SOCKS5 proxy. UDP loses this comparison. It gains nothing for HTTP traffic, because HTTP/3 falls back to TCP when it has to. Few proxies relay it, common clients such as Chrome never send it through SOCKS5, and lost datagrams fail in silence. For HTTP or SOCKS5, the choice between those two matters more than TCP against UDP.

DNS does not need UDP through the proxy either. It can go over TCP, or the proxy can resolve names itself, which is what socks5h asks for, as SOCKS4 vs SOCKS5 shows.

Use UDP only when the application needs it: voice, video, games or a target that speaks only QUIC. Then you need a SOCKS5 proxy that really relays UDP and a client that asks for it, and you should test both. Our UDP proxy checker sends a real DNS query through the relay. On our network, Residential Premium SOCKS5 lines generated with udp: true open a UDP relay, billed from the same balance as TCP traffic, from $1.00 per GB; see UDP residential proxies.

What this page could not check

Our timings come from one busy server, so the medians include our own delay; the fastest values compare the protocols more fairly. We measured DNS only, not downloads, voice, games or HTTP/3. We sent no traffic through a proxy for this page: proxy support comes from the standards, our free list counts and the UDP test on our companion page. Four lost UDP answers out of 140 show that loss happens without warning; they are not a loss rate to plan with. Support for RFC 9298 among real proxies was not measured. Our free list changes by the minute, so the counts here will be redone by 10 January 2027.

Sources

Frequently asked questions

What is the difference between TCP and UDP?
TCP opens a connection with a three-way handshake and then delivers a reliable, in-order stream of bytes, resending anything lost. UDP sends each datagram on its own, with no connection and no promise that it arrives. A TCP header is at least 20 bytes, a UDP header 8.
Is UDP faster than TCP?
For one small exchange, yes, because it skips the handshake. Our fastest DNS lookup to 1.1.1.1 took 1.0 ms over UDP and 2.8 ms over TCP. But UDP lost 4 of 140 answers with no error at all, so an application using UDP has to notice and retry by itself.
Can a proxy carry UDP?
An HTTP proxy's CONNECT carries TCP only, and SOCKS4 too. SOCKS5 can carry UDP through its UDP ASSOCIATE command, but few public SOCKS5 proxies do: 17 of 575 relayed a DNS query in our test on 10 October 2026. HTTP has a newer standard for UDP, RFC 9298, which few proxies offer.
Do HTTP/3 websites work through a TCP proxy?
Yes. HTTP/3 runs on QUIC over UDP, but RFC 9114 tells clients to use TCP-based HTTP when a QUIC connection fails, for example when UDP is blocked. Through an HTTP proxy the browser simply uses HTTP/2 or HTTP/1.1.
Does DNS use TCP or UDP?
Both, on port 53. Most lookups use UDP, which carries up to 512 bytes in classic DNS, and TCP support has been a required part of DNS since RFC 7766. So DNS can travel through a TCP-only proxy path, or be resolved at the proxy itself.
Should I use TCP or UDP for web scraping through a proxy?
TCP. Web pages and APIs run on HTTP over TCP, and HTTP/3 falls back to TCP when it must. UDP adds nothing for scraping and very few proxies carry it. Keep UDP for voice, video, games or QUIC-only targets, and test both the proxy and the client first.

Get proxies that are alive right now

That list re-checks every exit every few minutes across 100+ countries, with a live last-checked time, so you copy IPs that worked moments ago, not a stale text dump. When the location has to survive a real check, the paid network holds up.

129M+ proxy checks run · 100+ countries · HTTP / HTTPS / SOCKS · re-checked every few minutes · no signup

HProxy.

Honest guides and comparisons on proxies, scraping and staying unblocked, from the team that runs the network.

RSS feed