Files
browse/dist/chrome.d.ts
T
marauder-actual 5e1375f1a1
CI / test (push) Has been cancelled
style / style (push) Has been cancelled
v0.4.1: Chrome cookie import, config.json, session persistence
- Add Chrome cookie importer (macOS Keychain AES-128-CBC decryption)
- Add ~/.config/browse/config.json (headless, fullscreen, stealth, preview defaults)
- Add ~/.config/browse/session.json (auto-save/restore cookies + localStorage)
- Auto-import from all browsers (Safari + Firefox + Chrome) on first launch
- Deduplicate cookies across browsers (domain+name+path key)
- Defaults: headed, fullscreen, stealth, preview all enabled
- Fix BigInt overflow for Chrome timestamps (CAST to TEXT in SQL)
2026-06-06 16:10:50 +02:00

52 lines
1.4 KiB
TypeScript

/**
* Chrome cookie importer (macOS)
*
* Reads cookies from Chrome's SQLite database and decrypts values using
* the encryption key stored in the macOS Keychain ("Chrome Safe Storage").
*
* Encryption scheme (macOS):
* - Keychain password → PBKDF2(password, salt="saltysalt", iterations=1003, keylen=16)
* - AES-128-CBC with IV = 16 bytes of 0x20 (space)
* - Encrypted values prefixed with "v10" (3 bytes)
*
* Chrome timestamps are microseconds since Jan 1, 1601 (Windows/WebKit epoch).
* Database is copied to a temp directory to avoid WAL lock conflicts.
*/
export interface ChromeCookie {
name: string;
value: string;
domain: string;
path: string;
expires: number;
secure: boolean;
httpOnly: boolean;
sameSite: 'None' | 'Lax' | 'Strict';
}
/**
* List available Chrome profiles
*/
export declare function listChromeProfiles(): {
name: string;
path: string;
}[];
/**
* Import cookies from Chrome's Cookies SQLite database
*/
export declare function importChromeCookies(options?: {
profile?: string;
domain?: string;
}): ChromeCookie[];
/**
* Convert ChromeCookie to Playwright cookie format
*/
export declare function toPlaywrightCookie(cookie: ChromeCookie): {
name: string;
value: string;
domain: string;
path: string;
expires: number;
secure: boolean;
httpOnly: boolean;
sameSite: 'Strict' | 'Lax' | 'None';
};
//# sourceMappingURL=chrome.d.ts.map