npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nxhung1610/stealth-browser

v0.1.0

Published

Playwright integration for browser fingerprinting evasion — 40 stealth features across 12 categories

Readme

@nxhung/stealth-browser

Playwright integration for browser fingerprinting evasion — stealth capabilities for automated browsers.

npm install @nxhung/stealth-browser
npm install playwright
npx playwright install chromium

Why?

Modern anti-bot systems detect automation by fingerprinting browser properties: canvas rendering, WebGL output, AudioContext, Navigator APIs, timezone, and dozens of other signals. @nxhung/stealth-browser neutralizes these vectors with a modular Playwright integration.

Features

| Category | Features | |----------|----------| | Automation markers | webdriver undefined, chrome.runtime stub, Playwright globals removal | | Canvas | getImageData noise injection | | WebGL | vendor/renderer spoofing | | Audio | AudioContext hook with noise | | Navigator | userAgent, platform, languages, permissions, doNotTrack | | Timezone | locale and timezone spoofing | | Hardware | hardwareConcurrency, deviceMemory, devicePixelRatio | | Screen | resolution, colorDepth |

Quick Start

StealthBrowser (Recommended)

import { StealthBrowser } from '@nxhung/stealth-browser';

const browser = await StealthBrowser.launch({
  headless: true,
  stealth: {
    userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/124.0.0.0',
    locale: 'en-US',
    timezone: 'America/New_York',
    screen: { width: 1920, height: 1080, availWidth: 1920, availHeight: 1040 },
    hardwareConcurrency: 8,
    deviceMemory: 8,
    devicePixelRatio: 1,
  },
});

const page = await browser.newPage();
await page.goto('https://example.com');
// ... you're now stealthy
await browser.close();

Payload Injection

Generate stealth payload for manual injection:

import { buildStealthPayload } from '@nxhung/stealth-browser';

const payload = buildStealthPayload({
  userAgent: 'Mozilla/5.0 Chrome/124',
  locale: 'en-US',
  timezone: 'America/New_York',
});

await page.addInitScript(payload);

CDP Patches (Chromium only)

For advanced stealth, apply CDP-level patches:

import { applyAllCDPPatches } from '@nxhung/stealth-browser';

const browser = await chromium.launch();
const page = await browser.newPage();
await applyAllCDPPatches(page);

CLI

Launch any URL with a preset stealth profile:

npx stealth --url https://example.com --preset windows_chrome

Available Presets

| Preset | Browser | OS | Screen | |--------|---------|-----|--------| | windows_chrome | Chrome 124 | Windows 10 | 1920×1080 | | macos_chrome | Chrome 124 | macOS | 1440×900 | | linux_firefox | Firefox 125 | Linux | 1920×1080 | | windows_edge | Edge 124 | Windows 10 | 1920×1080 | | mobile_chrome | Chrome 124 | Android | 412×915 |

CLI Options

--url <url>        Target URL (required)
--preset <name>    Use a preset (windows_chrome, macos_chrome, etc.)
--headless         Run in headless mode
--no-stealth       Disable stealth features (for comparison)
--browser <name>   Override browser (chromium, firefox, webkit)
--timeout <ms>     Navigation timeout (default: 30000)

API Reference

StealthBrowser

Static factory for launching stealth browsers.

class StealthBrowser {
  static async launch(options: BrowserLaunchOptions & {
    stealth?: StealthConfig;
  }): Promise<Browser>;

  static buildStealthPayload(config: StealthConfig): string;
}

StealthConfig

interface StealthConfig {
  userAgent?: string;
  locale?: string;
  timezone?: string;
  screen?: { width: number; height: number; availWidth: number; availHeight: number };
  hardwareConcurrency?: number;
  deviceMemory?: number;
  devicePixelRatio?: number;
}

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Public API (integrations/)                   │
├─────────────────────────────────────────────────────────────┤
│  playwright-stealth.ts     │  cdp-patches.ts   │  cli/       │
│  • StealthBrowser          │  • applyCDP*     │  • presets  │
│  • buildStealthPayload     │  • removeCDP*   │  • flags    │
├─────────────────────────────────────────────────────────────┤
│                    stealth.ts (Orchestrator)                  │
│  • StealthConfig interface                                    │
│  • applyAllPatches()                                        │
├─────────────────────────────────────────────────────────────┤
│                    Browser Context                            │
│  Patches modify prototypes to return spoofed values          │
└─────────────────────────────────────────────────────────────┘

Two integration paths:

  • JS Injection: Patches run in page context via addInitScript
  • CDP: Patches run before page JS via Page.addScriptToEvaluateOnNewDocument (Chromium only)

Browser Support

| Browser | JS Injection | CDP | |---------|-------------|-----| | Chromium 112+ | ✅ | ✅ | | Firefox 111+ | ✅ | ❌ | | WebKit 16.4+ | ✅ | ❌ |

Documentation

License

MIT