@cloakbits/manager
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Note: This utility is an interface for Cloakbits launcher that can be downloaded after signing up an account at Cloakbits.

Cloakbits Manager for NodeJS

npm version npm version typedoc

logo

A utility for managing Cloakbits stealth sessions.

It facilitates communication with local API:

  • Create new stealth webdriver sessions,
  • Modify session parameters such as User-Agent, WebGL attributes or TCP fingerprint masking,
  • Monitor session activity

and more.

Usage

npm i @cloakbits/manager --save
# or alternatively
yarn add @cloakbits/manager

To use this utility, call configure(options) and checkHealth as early as possible. This will ensure launcher process is running, is correctly configured and ready to accept connections.

import manager from "@cloakbits/manager";

manager.configure();

(async () => {
    await manager.checkHealth();
    // ...
    const sessionParams = {
        autopersist: true,
        platform: "MacIntel",
        screen: {
            width: 1280,
            height: 800    
        }
    };
    const sessionId = await manager.sessions.create(sessionParams);
})();
 

Use session identifier sessionId as an additional parameter when launching webdriver.

import puppeteer from "puppeteer";

/// ...

const browser = await puppeteer.launch({
    executablePath: "/app/cloakbits",
    args: [
        `--cb-session-id=${sessionId}`
    ]
});

The identifier can be used to modify session behavior at runtime.

await manager.sessions.depersist(sessionId); // once webdriver process stops the session data will be removed  

Readme

Keywords

none

Package Sidebar

Install

npm i @cloakbits/manager

Weekly Downloads

3

Version

0.0.3

License

SEE LICENSE IN LICENSE

Unpacked Size

35.6 kB

Total Files

19

Last publish

Collaborators

  • niespodd