Skip to content
SpideyData
Engineering

Bot Detection Starts Before HTTP

TCP, TLS, HTTP/2, headers, and QUIC each reveal part of a client implementation—and contradictions across layers are stronger than any one fingerprint.

SFSpideyData team
9 min read

The connection speaks before the application does

A client does not arrive as a blank slate and then introduce itself with a User-Agent header. Establishing a connection already exposes implementation choices across the operating system, TLS library, protocol stack, and network path. By the time an application receives its first route and cookie, an edge service may have observed several layers of evidence.

This is why copying browser headers onto a general-purpose HTTP library is not the same as sending a browser request. The words may say Chrome while the handshake, protocol settings, compression behavior, and connection reuse describe something else. Defenses gain confidence from those contradictions, not from a magical fingerprint that never changes.

TCP offers a noisy baseline

Initial TCP packets can carry patterns in options, window scaling, maximum segment size, timestamps, and ordering that correlate with operating systems and network environments. They are useful context, but middleboxes, proxies, mobile carriers, and kernel tuning can transform them. A robust defense should not mistake an infrastructure observation for a device identity.

The practical value is coarse. A traffic population may look consistently like servers, residential devices, or one shared relay. That observation can adjust a prior risk score, especially when the claimed client implies a very different environment, but it should be cross-checked with the layers above it.

TLS reveals implementation choices

A TLS ClientHello advertises protocol versions, cipher suites, extensions, supported groups, signature algorithms, application protocols, and key-share behavior. Browser families and general-purpose libraries assemble these fields differently because they ship different TLS implementations and release on different schedules.

JA3 popularized compact ClientHello fingerprints, while later approaches such as JA4 were designed to remain useful as modern clients introduced more variation. The important design lesson is not which hash to buy. It is to retain the interpretable features behind the hash, account for normal browser evolution, and avoid treating a collision or a rare value as a verdict.

GREASE is a useful example of why literal templates age badly. RFC 8701 reserves values that clients can advertise so servers remain tolerant of unknown extensions. Their presence and handling are part of a living protocol implementation, not decorative bytes to paste into a static profile.

HTTP/2 has grammar beyond the request headers

After TLS negotiates HTTP/2, the client sends settings and manages streams, flow control, header compression, priority, errors, and connection reuse. Values and ordering can differ across implementations. A session whose TLS resembles one browser family but whose HTTP/2 behavior resembles a command-line library creates a cross-layer inconsistency.

These details should be evaluated as behavior, not a frozen signature. Browser releases change defaults; gateways normalize traffic; libraries improve. Defenders need versioned baselines and enough raw evidence to understand why a population moved instead of silently blocking it after an update.

A layered protocol path showing the observable transition from TCP and TLS through HTTP/2, headers, QUIC, and HTTP/3.

Headers are easy to copy and easy to contradict

Request headers carry browser and navigation context: accepted encodings, language preferences, client hints, priority, origin, referrer, and upgrade intent. Their presence, values, and relationships depend on browser version, platform, request destination, and protocol.

A complete-looking header block can still be implausible. Chromium client hints paired with a Safari identity, a mobile claim paired with desktop-only context, or a recent version label paired with an obsolete surrounding stack are stronger evidence than a missing optional field. The defense should model valid combinations and tolerate privacy-driven reduction rather than rewarding sheer header volume.

QUIC and HTTP/3 add another axis

QUIC moves transport security and stream management over UDP. Transport parameters, connection identifiers, resumption, migration, loss recovery, and HTTP/3 behavior create additional implementation differences. Adoption also varies by browser, network, geography, and enterprise policy, so the absence of HTTP/3 is not automatically suspicious.

Population context is more useful: if a large cohort claims the same current browser yet never follows the protocol distribution seen for legitimate users—and also repeats the same TLS, HTTP/2, and header template—the combined pattern deserves scrutiny.

Score consistency, freshness, and reuse

Defenses become more durable when they stop targeting named tools and evaluate three broader properties. Consistency asks whether adjacent protocol layers could come from one client. Freshness asks whether a claimed current browser evolves with real releases. Reuse asks whether an unlikely template appears across implausibly many IPs, accounts, or sessions.

  • Keep known library and abuse signatures as low-cost evidence, not the whole decision.
  • Version baselines and monitor legitimate distribution shifts before enforcement changes.
  • Correlate at a privacy-appropriate population level and avoid permanent device labels from transport data alone.
  • Apply graduated actions—observe, slow, challenge, then block—according to route value and confidence.

Raise abusive cost without breaking legitimate access

Network fingerprints are attractive because the edge can observe them before application code runs. That same power creates false-positive risk: privacy relays, VPNs, corporate egress, accessibility tools, old devices, and constrained networks all produce unusual combinations.

The objective is therefore economic and operational, not absolute classification. Make high-volume abuse progressively more expensive while preserving ordinary browsing, search discovery, partners, and declared automation. For responsible collectors, use supported APIs where possible, identify the integration, keep concurrency conservative, and retain connection and request evidence so changes can be diagnosed instead of answered with blind retries.

A User-Agent is a claim. TCP, TLS, HTTP/2, HTTP/3, and headers are the surrounding accent and grammar. The strongest signal is whether all of them sound like the same client over time.

Sources and further reading

Next step

Try the smallest path that fits your target

Start with the public Fetch guide, then add browser rendering, crawling, or extraction when the workflow needs it.