node-tls-clientLatest version on npm

Browser profiles

Choose which browser or app to impersonate with ClientIdentifier.

A profile is a complete, captured fingerprint of one browser or app version: TLS ClientHello, HTTP/2 settings and frame priorities, pseudo-header order, and for a few profiles HTTP/3 settings. Pick one with clientIdentifier:

const profiles = {
  chrome: {
    clientIdentifier: ClientIdentifier.chrome_150,
    userAgent:
      "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36",
  },
  firefox: {
    clientIdentifier: ClientIdentifier.firefox_148,
    userAgent:
      "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0",
  },
  iphone: {
    clientIdentifier: ClientIdentifier.safari_ios_26_0,
    userAgent:
      "Mozilla/5.0 (iPhone; CPU iPhone OS 26_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",
  },
};

for (const [name, { clientIdentifier, userAgent }] of Object.entries(
  profiles,
)) {
  const session = new Session({
    clientIdentifier,
    headers: { "user-agent": userAgent }, // the profile doesn't set headers
  });
  const seen = await (await session.get("https://tls.peet.ws/api/all")).json();
  console.log(name.padEnd(8), seen.tls.ja4, seen.http2.akamai_fingerprint_hash);
  await session.close();
}
// chrome   t13d1516h2_8daaf6152771_806a8c22fdea 52d84b11737d980aef856699f885ca86
// firefox  t13d1917h2_4d8ed5baf28e_3cbfd9057e0d 6ea73faa8fc5aac76bded7bd238f6433
// iphone   t13d2013h2_a09f3c656075_7f0f34a4126d c52879e43202aeb92740be6e8c86ea96

Each profile produces its own JA4 and HTTP/2 fingerprint, as a real browser would.

Choosing a profile

  • Match the User-Agent. The profile doesn't set headers. A firefox_148 handshake with a Chrome User-Agent is an easy giveaway.
  • Prefer recent versions. Sites see few visitors on years-old browsers. Recent profiles are chrome_152/chrome_154, firefox_148, safari_27_2 (desktop), safari_ios_26_0 and brave_146.
  • Match the platform you claim. Desktop Safari and iOS Safari have different profiles; so do the mobile apps (okhttp4_android_*, nike_*, zalando_*).
  • Keep it stable. Use one profile per session. Switching profiles between requests to the same site looks nothing like a real user.

Without clientIdentifier (and without ja3string), a session uses chrome_150.

_psk variants

Profiles ending in _psk / _PSK (e.g. chrome_150_psk) add the TLS pre_shared_key extension, so reconnections resume the earlier TLS session the way a browser returning to a site does.

All profiles

ClientIdentifier reference: every profile, grouped by browser.

Profiles come from the native tls-client library. New ones arrive with new native releases and are added to the enum in later versions of this package.

Beyond the built-in profiles

To match a fingerprint that has no profile, build one from a JA3 string and HTTP/2 settings: see Custom fingerprints.

On this page