0.0.3 • Published 5 years ago
@cloakbits/manager v0.0.3
Note: This utility is an interface for Cloakbits launcher that can be downloaded after signing up an account at Cloakbits.
Cloakbits Manager for NodeJS

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,WebGLattributes or TCP fingerprint masking, - Monitor session activity
and more.
Usage
npm i @cloakbits/manager --save
# or alternatively
yarn add @cloakbits/managerTo 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