API Reference

RezoStealth

RezoStealth makes HTTP requests indistinguishable from real browsers by controlling TLS fingerprints, HTTP/2 SETTINGS, header ordering, and client hints. Supports 18 browser profiles across Chrome, Firefox, Safari, Edge, Opera, and Brave.

Constructor

new RezoStealth(input?: BrowserProfileName | BrowserProfile | RezoStealthOptions)
ParameterTypeDescription
inputBrowserProfileName \| BrowserProfile \| RezoStealthOptionsOptional. Omit for auto-detect mode.

Input Modes

InputBehavior
Omitted (undefined)Auto-detect profile from the User-Agent header at request time.
BrowserProfileName stringUse the exact named profile (e.g., 'chrome-131').
BrowserProfile objectUse a custom profile object directly.
RezoStealthOptions objectConfigure family, rotation, platform, overrides.

Example

import { Rezo, RezoStealth } from 'rezo';

// Auto-detect from User-Agent header
const rezo1 = new Rezo({
  stealth: new RezoStealth(),
  headers: { 'user-agent': 'Mozilla/5.0 ... Chrome/131.0.0.0 ...' }
});

// Specific profile
const rezo2 = new Rezo({ stealth: new RezoStealth('chrome-131') });

// Random from a family
const rezo3 = new Rezo({ stealth: new RezoStealth({ family: 'chrome' }) });

// Rotate identity per request
const rezo4 = new Rezo({ stealth: new RezoStealth({ rotate: true }) });

// Rotate within a family with specific platform
const rezo5 = new Rezo({
  stealth: new RezoStealth({
    rotate: true,
    family: 'chrome',
    platform: 'windows'
  })
});

Instance Properties

isAutoDetect

true when constructed with no arguments. Profile will be detected from request headers.

get isAutoDetect: boolean

isRotate

true when rotate mode is enabled. A fresh identity is generated per resolve() call.

get isRotate: boolean

profileName

The resolved profile ID string (e.g., 'chrome-131'). Triggers resolution if not yet resolved.

get profileName: string

profile

The resolved BrowserProfile object. Triggers resolution if not yet resolved.

get profile: BrowserProfile

Instance Methods

resolve(userAgent?)

Resolves the stealth profile. When rotate: true, returns a fresh identity every call. Otherwise, caches after the first call.

resolve(userAgent?: string): ResolvedStealthProfile
ParameterTypeDescription
userAgentstringOptional User-Agent string for auto-detect mode.

Example

const stealth = new RezoStealth({ family: 'chrome' });
const profile = stealth.resolve();

console.log(profile.profileId);       // "chrome-131"
console.log(profile.defaultHeaders);  // { 'user-agent': '...', 'accept': '...', ... }
console.log(profile.tls);            // TLS fingerprint configuration
console.log(profile.h2Settings);     // HTTP/2 SETTINGS frame values
console.log(profile.headerOrder);    // Browser header ordering

// Auto-detect mode
const auto = new RezoStealth();
const resolved = auto.resolve('Mozilla/5.0 ... Chrome/131.0.0.0 ...');
console.log(resolved.profileId); // "chrome-131"

withOverrides(overrides)

Creates a new RezoStealth instance with merged overrides. The original instance is not modified.

withOverrides(overrides: Partial<RezoStealthOptions>): RezoStealth

Example

const base = new RezoStealth('chrome-131');
const custom = base.withOverrides({
  platform: 'macos',
  headers: { 'accept-language': 'fr-FR' }
});

Static Factory Methods

RezoStealth.from(name)

Creates a stealth instance with a specific profile by name.

static from(name: BrowserProfileName): RezoStealth
const stealth = RezoStealth.from('firefox-133');

RezoStealth.chrome()

Creates a stealth instance with a random Chrome profile.

static chrome(): RezoStealth

RezoStealth.firefox()

Creates a stealth instance with a random Firefox profile.

static firefox(): RezoStealth

RezoStealth.safari()

Creates a stealth instance with a random Safari profile.

static safari(): RezoStealth

RezoStealth.edge()

Creates a stealth instance with a random Edge profile.

static edge(): RezoStealth

RezoStealth.random()

Creates a stealth instance with a random profile from any browser family.

static random(): RezoStealth

RezoStealth.fromUserAgent(ua)

Auto-detects a browser profile from a User-Agent string. Falls back to random Chrome if no match.

static fromUserAgent(userAgent: string): RezoStealth

Example

// Quick factory usage
const rezo = new Rezo({ stealth: RezoStealth.chrome() });

// From User-Agent string
const stealth = RezoStealth.fromUserAgent(
  'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/131.0.0.0'
);
console.log(stealth.profileName); // "chrome-131"

// Random from all browsers
const random = RezoStealth.random();

ResolvedStealthProfile

The fully resolved stealth profile returned by resolve(). Read by adapters to configure TLS, headers, and HTTP/2.

interface ResolvedStealthProfile {
  profile: BrowserProfile;
  profileId: string;
  tls: TlsFingerprint;
  h2Settings: Http2Settings;
  headerOrder: string[];
  pseudoHeaderOrder: string[];
  defaultHeaders: Record<string, string>;
  navigator: BrowserProfile['navigator'];
}
PropertyTypeDescription
profileBrowserProfileThe underlying browser profile data.
profileIdstringProfile ID (e.g., 'chrome-131').
tlsTlsFingerprintResolved TLS fingerprint (cipher suites, extensions, ALPN, etc.).
h2SettingsHttp2SettingsHTTP/2 SETTINGS frame values (initial window, max streams, etc.).
headerOrderstring[]Browser-accurate header ordering.
pseudoHeaderOrderstring[]HTTP/2 pseudo-header ordering (:method, :path, etc.).
defaultHeadersRecord<string, string>Default headers (User-Agent, Accept, sec-ch-ua, etc.) with lowercase keys.
navigatorobjectNavigator properties for JS environment emulation.

BrowserProfileName

Union type of all 18 built-in browser profile IDs:

type BrowserProfileName =
  // Chrome desktop
  | 'chrome-120' | 'chrome-124' | 'chrome-128' | 'chrome-131'
  // Chrome mobile
  | 'chrome-131-android'
  // Firefox desktop
  | 'firefox-115' | 'firefox-121' | 'firefox-128' | 'firefox-133'
  // Safari desktop
  | 'safari-16.6' | 'safari-17.4' | 'safari-18.2'
  // Safari iOS
  | 'safari-17-ios' | 'safari-18-ios'
  // Edge
  | 'edge-120' | 'edge-131'
  // Opera
  | 'opera-115'
  // Brave
  | 'brave-1.73';

RezoStealthOptions

interface RezoStealthOptions {
  profile?: BrowserProfileName | BrowserProfile;
  family?: 'chrome' | 'firefox' | 'safari' | 'edge' | 'opera' | 'brave';
  rotate?: boolean;
  headers?: Record<string, string>;
  headerOrder?: string[];
  tls?: Partial<TlsFingerprint>;
  h2Settings?: Partial<Http2Settings>;
  language?: string;
  platform?: 'windows' | 'macos' | 'linux' | 'android' | 'ios';
}
PropertyTypeDescription
profileBrowserProfileName \| BrowserProfileSpecific profile to use.
familystringPick a random profile from this browser family. Ignored if profile is set.
rotatebooleanGenerate a fresh identity on every request.
headersRecord<string, string>Override specific headers.
headerOrderstring[]Override header order.
tlsPartial<TlsFingerprint>Override TLS parameters.
h2SettingsPartial<Http2Settings>Override HTTP/2 SETTINGS.
languagestringOverride Accept-Language.
platformstringOverride platform for UA selection.