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) | Parameter | Type | Description |
|---|---|---|
input | BrowserProfileName \| BrowserProfile \| RezoStealthOptions | Optional. Omit for auto-detect mode. |
Input Modes
| Input | Behavior |
|---|---|
Omitted (undefined) | Auto-detect profile from the User-Agent header at request time. |
BrowserProfileName string | Use the exact named profile (e.g., 'chrome-131'). |
BrowserProfile object | Use a custom profile object directly. |
RezoStealthOptions object | Configure 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 | Parameter | Type | Description |
|---|---|---|
userAgent | string | Optional 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'];
} | Property | Type | Description |
|---|---|---|
profile | BrowserProfile | The underlying browser profile data. |
profileId | string | Profile ID (e.g., 'chrome-131'). |
tls | TlsFingerprint | Resolved TLS fingerprint (cipher suites, extensions, ALPN, etc.). |
h2Settings | Http2Settings | HTTP/2 SETTINGS frame values (initial window, max streams, etc.). |
headerOrder | string[] | Browser-accurate header ordering. |
pseudoHeaderOrder | string[] | HTTP/2 pseudo-header ordering (:method, :path, etc.). |
defaultHeaders | Record<string, string> | Default headers (User-Agent, Accept, sec-ch-ua, etc.) with lowercase keys. |
navigator | object | Navigator 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';
} | Property | Type | Description |
|---|---|---|
profile | BrowserProfileName \| BrowserProfile | Specific profile to use. |
family | string | Pick a random profile from this browser family. Ignored if profile is set. |
rotate | boolean | Generate a fresh identity on every request. |
headers | Record<string, string> | Override specific headers. |
headerOrder | string[] | Override header order. |
tls | Partial<TlsFingerprint> | Override TLS parameters. |
h2Settings | Partial<Http2Settings> | Override HTTP/2 SETTINGS. |
language | string | Override Accept-Language. |
platform | string | Override platform for UA selection. |