Torna al blog
Anti-rilevamento

Network Information API: How Connection Type Identifies You

The Network Information API exposes connection type, bandwidth, and round-trip time. Learn how these signals contribute to browser fingerprinting.

Introduction

The Network Information API (navigator.connection) provides information about the user's network connection, including effective connection type, estimated bandwidth, round-trip time, and whether data saving is enabled. While designed to help websites optimize content delivery, these signals contribute to browser fingerprinting and can reveal automation when misconfigured.

What the API Exposes

const conn = navigator.connection;

console.log({
  effectiveType: conn.effectiveType, // "4g", "3g", "2g", "slow-2g"
  rtt: conn.rtt,                     // 50 (milliseconds, rounded to 25ms)
  downlink: conn.downlink,           // 10 (Mbps, rounded to 25kbps)
  type: conn.type,                   // "wifi", "cellular", "ethernet"
  saveData: conn.saveData,           // false
});

Client Hints Headers

These values are also sent as HTTP headers when requested by the server:

Sec-CH-UA-Net-Type: wifi
RTT: 50
Downlink: 10
ECT: 4g
Save-Data: ?0

Why Network Info Matters for Detection

Geographic Consistency

Network characteristics should match the proxy location:

  • A session through a US proxy should have reasonable RTT for US infrastructure
  • A session claiming "cellular" connection type through a datacenter IP is suspicious
  • Extremely low RTT (< 10ms) suggests a local connection, not a remote proxy

Automation Detection

Default or missing network information signals automation:

  • Many headless configurations report effectiveType: "4g" with zero RTT
  • Missing navigator.connection on Chrome (where it should exist) suggests modification
  • Static network values that never change across long sessions are unusual

Correlation

Network characteristics can correlate sessions:

  • Sessions from the same datacenter may report identical RTT and downlink values
  • Unusual combinations (e.g., type: "wifi" with rtt: 300) stand out

Connection Change Events

Websites can monitor network changes:

navigator.connection.addEventListener('change', () => {
  console.log('Network changed:', {
    effectiveType: navigator.connection.effectiveType,
    rtt: navigator.connection.rtt,
  });
});

A session that never fires network change events during a long browsing period may be notable, since real users' network conditions fluctuate.

How BotCloud Handles Network Info

BotCloud profiles include network information configuration:

  • effectiveType set to realistic values for the connection context
  • RTT calibrated to match the proxy location and connection type
  • downlink set to reasonable bandwidth for the claimed network
  • Client Hints headers consistent with the JavaScript API values

All values are internally consistent and match what a real user on that type of connection would report.

Best Practices

  1. Set realistic RTT values matching the proxy distance (50-100ms for domestic, 100-300ms for international)
  2. Match connection type to context - "wifi" or "ethernet" for desktop, "cellular" for mobile
  3. Ensure Client Hints headers match JavaScript API - Sec-CH headers and navigator.connection must agree
  4. Use reasonable bandwidth values - 10 Mbps is typical for 4G, 1-2 Mbps for 3G
  5. Keep effectiveType as "4g" for most automation, since it is the most common value
#network#connection#fingerprinting#client-hints