Insights

Can TCP and TLS Round-Trip Times Reveal a Residential Proxy?

BADPASS compared two server-side round trips to identify some residential proxy connections. Learn what the gap measures, when it can mislead, and how site teams can use it.

Illustration of a home network, a relay, and a server connected by blue and orange timing paths.

An HTTPS connection can complete its TCP handshake quickly and still take longer to move through the TLS handshake. If you operate the site, the useful question is which systems took part in each exchange. The TCP peer that answered the server may sit close to it, while the TLS peer is farther away.

BADPASS, a study presented at ISPEC 2022, tested whether that difference could help recognize a particular kind of residential proxy connection. It gives site operators a way to think about timing anomalies, along with a reminder to check where the timings were collected. BADPASS research paper

What the two clocks are measuring

On a direct HTTPS connection over TCP, the same client and server participate in both the TCP and TLS handshakes. The measurements still have different sources of delay, but the network path each exchange traverses is broadly the same.

In the architecture BADPASS studied, the proxy ends one TCP connection and opens another to the site. It relays TLS messages while the original client and site remain the TLS peers. From the site's vantage point, an acknowledgment on its TCP connection comes from the proxy exit. The corresponding TLS handshake response still comes from the client and passes through the proxy network. The two exchanges can therefore encounter different paths. BADPASS, sections 3.2–3.5

In a direct connection, TCP and TLS round trips both reach the client. With this proxy, the server’s TCP round trip stops at the exit while TLS still reaches the client.
Direct connection above, split TCP with TLS passthrough below. The arrows show endpoints, not elapsed time.

The distinction also matters when you read a dashboard. The paper's TCP and TLS RTT estimates came from timed exchanges at the destination server. Its TLS estimate uses an interval in which the server sends handshake data and waits for the corresponding client response. A browser's reported handshake duration or an application trace can start and stop at different moments, putting extra work inside the measurement. Compare timings only after checking how each instrument defines its interval. BADPASS, section 3.4

What the BADPASS experiment found

Over 110 days in 2022, the researchers generated direct and proxied HTTPS connections using an experimental infrastructure with 22 machines and four residential proxy services. The services did not all contribute for the full period. The researchers kept 92,712,461 connection records with complete measurements. They evaluated their timing rule against that controlled mix of traffic. BADPASS, sections 3.3 and 3.6

Evaluation reported in the paper

False-positive rate

False-negative rate

Accuracy

First TCP round-trip measurement

0.04%

1.93%

99.01%

Pessimistic calculation using the maximum observed TCP RTT per connection

0.01%

9.68%

92.78%

Here, a false positive is a direct connection flagged as proxied. A false negative is a proxied connection classified as direct. The second row is the authors' deliberately pessimistic calculation using RTT observations from the study. The increase in missed proxy connections shows how changing the TCP timing fed into the same rule can change the result. Both rows describe the researchers' setup and traffic mix. BADPASS, section 4

Why a low false-positive rate can still matter

Imagine a site with 100,000 comparable connections, of which 100, or 0.1%, use the kind of proxy being studied. Hold the first row's error rates fixed for this arithmetic example. A false-negative rate of 1.93% leaves roughly 98 correctly flagged proxy connections. A false-positive rate of 0.04% applied to the 99,900 direct connections yields about 40 flags on direct traffic. About 29% of the resulting 138 alerts would concern direct connections.

That calculation illustrates the role of prevalence. Even a small error rate applied to a much larger group can fill a review queue. The numbers are hypothetical. To estimate the burden at a real site, use its independently reviewed samples and measure how often the signal is wrong in each traffic group.

Where the signal stops being comparable

Timing varies with congestion, retransmissions, and time spent processing a handshake. The study also calls out certificate validation as a potential source of added delay. An isolated gap can have several explanations, even on a trace where both measurements are well defined. BADPASS, sections 4–5

The observation point matters as much as the timer. If a content delivery network or web application firewall terminates TLS at the edge, the origin may see a separate connection from that intermediary. Identify which peers belong to the exchange you are measuring before comparing the readings. Protocols can change the picture as well. HTTP/3 runs over QUIC, so the two measurements used by BADPASS for HTTPS over TCP are unavailable in that form. BADPASS, section 5 · HTTP/3 specification

How to use it in site operations

  1. Confirm the observation point. On infrastructure you operate or are authorized to monitor, map where TCP and TLS terminate. Check that the timings describe corresponding exchanges at the same point.
  2. Establish a baseline for comparable traffic. Group observations by protocol and edge region before comparing distributions. Begin with monitoring and use reviewed samples to estimate the false-positive burden.
  3. Review the timing signal alongside request behavior. Treat unusual timing as a reason to investigate. Compare it with traffic patterns and other evidence you already collect, then record what reviewers learn before deciding whether enforcement is warranted.

The practical use of the timing gap is to decide which connections merit a closer look. Keeping that decision separate from enforcement gives operators a chance to understand the alert and protect legitimate users. A later study, CalcuLatency, likewise explored measurements across network layers as an initial signal for proxy-enabled abuse. CalcuLatency, USENIX Security 2024

Why simulate TCP connection conditions?

On a live network, routing, TCP handshake behavior, and acknowledgment timing can change together. A single end-to-end duration cannot tell you which stage contributed to a slowdown. On an endpoint you operate or are authorized to test, system templates and ACK waits give you controlled connection conditions for examining compatibility and early data transfer. Record TCP, TLS, and application response times separately and use the logs to identify the stage that changed.

Sources

Ready to build cleaner data workflows?

Explore MIYAIP proxy infrastructure for scraping, automation, and data access.