Profile Management
Relevant source files
The following files were used as context for generating this wiki page:Profile Management is the core system of GeekEZ Browser, designed to create, manage, and launch isolated browser environments. Each profile encapsulates a unique browser fingerprint, network configuration (proxy), and local storage, which is fundamental to the application's anti-detect capabilities for multi-account management.
The system handles everything from the data structure of a profile, its persistent storage, and the entire lifecycle including creation, editing, deletion, and the complex process of launching it as an independent browser instance with its own network stack.
Architecture Overview
The Profile Management system is split between the main process and the renderer process, communicating via IPC channels. The renderer process (renderer.js) handles the user interface and user interactions, while the main process (main.js) manages the backend logic, file system operations, and process spawning (Xray and Puppeteer).
This diagram illustrates the high-level interaction between components when managing profiles.
Sources: main.js, renderer.js, preload.js
Data Storage
Profile Data Structure
Each browser profile is represented as a JSON object with a set of properties that define its configuration and fingerprint. These objects are stored in an array within a single JSON file.
Sources: main.js:255-263, renderer.js:688-701
The table below details the main fields of a profile object.
| Field | Type | Description | Source File |
|---|---|---|---|
id | string | A unique identifier (UUIDv4) for the profile. | main.js:262 |
name | string | The user-defined name for the profile. | main.js:262 |
proxyStr | string | The full proxy connection string (e.g., vmess://..., ss://...). | main.js:262 |
tags | array | An array of strings for categorizing profiles. | main.js:262 |
fingerprint | object | An object containing all the generated browser fingerprint data. See diagram above. | main.js:260 |
preProxyOverride | string | Determines if the chain proxy is used for this profile. Values: default, on, off. | main.js:262 |
createdAt | number | The timestamp when the profile was created. | main.js:262 |
File System Layout
All profile data is stored within the application's user data path. The structure is managed by main.js.
[userData]/BrowserProfiles/profiles.json: A JSON file containing the array of all profile objects.[userData]/BrowserProfiles/[profile_id]/: A directory for each profile, containing its isolated browser data, configuration files, and logs.browser_data/: The user data directory for the Puppeteer instance.config.json: The generated Xray configuration for this profile's launch.extension/: A dynamically generated browser extension (GeekEZ Guard) that injects the fingerprint.
[userData]/_Trash_Bin/: When a profile is deleted, its directory is moved here instead of being permanently erased.
Sources: main.js:18-22, main.js:312-315, main.js:268-271
Core Operations (CRUD)
Profile operations are initiated from the UI (renderer.js) and executed in the main process (main.js) via IPC calls defined in preload.js.
IPC Channels
| Channel | Direction | Description |
|---|---|---|
get-profiles | Renderer -> Main | Fetches the list of all profiles. |
save-profile | Renderer -> Main | Creates and saves a new profile. |
update-profile | Renderer -> Main | Updates an existing profile. |
delete-profile | Renderer -> Main | Deletes a profile. |
launch-profile | Renderer -> Main | Launches a profile's browser instance. |
profile-status | Main -> Renderer | Notifies the UI of a profile's running status. |
Sources: preload.js:4-14
Create Profile
A new profile is created through the "New Profile" modal. The renderer collects basic information, and the main process generates the full profile object, including a unique fingerprint.
Update Profile
Editing a profile allows modification of its name, proxy, tags, and some fingerprint details.
Delete Profile
Deleting a profile removes it from the main list and moves its associated data directory to a trash folder.
- User clicks the "Delete" button for a profile.
renderer.jscallsremove(id), which shows a confirmation dialog.- On confirmation, it invokes the
delete-profileIPC channel with theprofileId. main.jshandles the request:- If the profile is running, it forcefully kills the associated Xray and browser processes.
- It filters the profile out of the
profiles.jsonarray and saves the file. - It renames/moves the profile's data directory (
[userData]/BrowserProfiles/[id]) to the_Trash_Bindirectory.
Sources: renderer.js:683-685, main.js:265-272
Profile Launching
The launch process is the most complex operation, orchestrating the setup of the network layer, fingerprint injection, and browser instantiation.
This flowchart details the steps taken in main.js after the user clicks "Launch".
Sources: main.js:300-425, renderer.js:673-677
Key Launch Steps
- Xray Configuration: A unique
config.jsonis generated for the profile usinggenerateXrayConfig. It sets up an inbound SOCKS5 proxy on a free local port and routes traffic through the profile's specifiedproxyStr. It also incorporates the chain proxy settings if enabled. - Fingerprint Injection: A temporary browser extension, "GeekEZ Guard," is created in the profile's directory. Its content script (
content.js) contains the JavaScript code needed to spoof fingerprint properties likescreen,webgl,languages, etc. This is done atdocument_startto ensure it runs before any website scripts. - Extension Loading: The browser is launched with the
--load-extensionflag pointing to both the generated "GeekEZ Guard" and any user-added extensions. The--disable-extensions-exceptflag ensures only these are loaded. - Process Management: The PIDs for both the Xray process and the browser are stored in the
activeProcessesobject. When the browser is closed (thedisconnectedevent fires), the corresponding Xray process is automatically terminated to free up resources. - Performance Optimization: On browser exit, cache directories (
Default/Cache,Default/Code Cache) are emptied to conserve disk space.
Sources: main.js:358-361, main.js:93-102, main.js:380-406, main.js:415-425
Summary
The Profile Management system is the cornerstone of GeekEZ Browser. It provides a robust mechanism for creating strictly isolated browser environments. By combining dynamic Xray configuration, on-the-fly fingerprint injection via a generated extension, and careful process management, it ensures that each profile operates with a unique identity and network stack, effectively preventing cross-account detection by web services.