Skip to content

Commit 0558ba8

Browse files
committed
docs: enhance CLI configuration documentation and guidance
Add examples and guidance for using CLI flags to override profile settings while preserving authentic fingerprint data.
1 parent de19dca commit 0558ba8

4 files changed

Lines changed: 186 additions & 25 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,25 @@ chromium-browser \
158158
--bot-profile="/path/to/chrome139_win11_x64.enc"
159159
```
160160

161+
#### Flexible Configuration with CLI Flags
162+
```bash
163+
# Keep profile integrity, override only what you need
164+
chrome.exe --bot-profile="authentic_user.enc" \
165+
--proxy-server="http://user:pass@proxy.com:8080" \
166+
--bot-title="Session-A"
167+
168+
# Same profile, different runtime settings
169+
chrome.exe --bot-profile="authentic_user.enc" \
170+
--proxy-server="socks5://user:pass@proxy2.com:1080" \
171+
--bot-title="Session-B"
172+
```
173+
174+
> 💡 **CLI flags override profile settings without modifying the encrypted profile file**
175+
>
176+
> This approach preserves authentic user fingerprints while enabling runtime flexibility.
177+
>
178+
> 📖 **For all available CLI flags**, see [CLI Flags Reference](cli-flags.md)
179+
161180
#### 2. [Playwright](examples/playwright) / [Puppeteer](examples/puppeteer) Examples
162181

163182
```javascript

cli-flags.md

Lines changed: 98 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This document provides a comprehensive reference for **BotBrowser-specific** com
77
- [🎯 Core BotBrowser Flags](#-core-botbrowser-flags)
88
- [🌐 Enhanced Proxy Configuration](#-enhanced-proxy-configuration)
99
- [🎨 BotBrowser Customization](#-botbrowser-customization)
10+
- [⚙️ Profile Configuration Override Flags](#️-profile-configuration-override-flags)
1011
- [📝 Usage Examples](#-usage-examples)
1112

1213
---
@@ -42,7 +43,7 @@ BotBrowser enhanced the standard `--proxy-server` flag to accept embedded creden
4243
--proxy-server="http://username:password@proxy.example.com:8080"
4344
--proxy-server="https://username:password@proxy.example.com:8080"
4445

45-
# SOCKS5 proxy with credentials
46+
# SOCKS5 proxy with credentials
4647
--proxy-server="socks5://username:password@proxy.example.com:1080"
4748
```
4849

@@ -99,6 +100,63 @@ Accepts a JSON string containing bookmark data for startup.
99100

100101
---
101102

103+
## ⚙️ Profile Configuration Override Flags
104+
105+
**High-priority configuration overrides - these CLI flags override any profile settings**
106+
107+
BotBrowser now supports command-line flags that override profile configuration values with the highest priority. These flags start with `--bot-config-` and directly map to profile `configs` properties.
108+
109+
> 💡 **Recommended Approach:** Use these CLI flags instead of modifying profile files. They provide the highest priority and don't require editing profile JSON files.
110+
111+
### Available Configuration Override Flags
112+
113+
The following `--bot-config-*` flags correspond directly to profile `configs` properties:
114+
115+
```bash
116+
--bot-config-browser-brand="chrome" # Browser brand: chrome, chromium, edge, brave
117+
--bot-config-color-scheme="light" # Color scheme: light, dark
118+
--bot-config-disable-debugger=true # Disable JavaScript debugger: true, false
119+
--bot-config-disable-device-scale-factor=true # Disable device scale factor: true, false
120+
--bot-config-fonts="profile" # Font settings: profile (use profile fonts), real (system fonts)
121+
--bot-config-inject-random-history=true # Inject random history: true, false
122+
--bot-config-keyboard="profile" # Keyboard settings: profile (emulated), real (system keyboard)
123+
--bot-config-languages="en-US,en" # Languages: "lang1,lang2" (comma-separated) or "auto" (IP-based)
124+
--bot-config-locale="en-US" # Browser locale: language code (e.g. en-US, zh-CN, fr-FR)
125+
--bot-config-location="40.7128,-74.0060" # Location: "lat,lon" (coordinates) or "auto" (IP-based)
126+
--bot-config-media-devices="profile" # Media devices: profile (fake devices), real (system devices)
127+
--bot-config-noise-audio-context=true # Audio context noise: true, false
128+
--bot-config-noise-canvas=true # Canvas fingerprint noise: true, false
129+
--bot-config-noise-client-rects=false # Client rects noise: true, false
130+
--bot-config-noise-text-rects=true # Text rects noise: true, false
131+
--bot-config-noise-webgl-image=true # WebGL image noise: true, false
132+
--bot-config-screen="profile" # Screen properties: profile (use profile), real (system screen)
133+
--bot-config-speech-voices="profile" # Speech voices: profile (synthetic), real (system voices)
134+
--bot-config-timezone="auto" # Timezone: "auto" (IP-based), "real" (system), or timezone name
135+
--bot-config-ua-full-version="139.0.6778.85" # User agent version: full version string matching Chromium major
136+
--bot-config-webgl="profile" # WebGL: profile (use profile), real (system), disabled (off)
137+
--bot-config-webgpu="profile" # WebGPU: profile (use profile), real (system), disabled (off)
138+
--bot-config-webrtc="profile" # WebRTC: profile (use profile), real (native), disabled (off)
139+
--bot-config-window="profile" # Window dimensions: profile (use profile), real (system window)
140+
```
141+
142+
### Key Benefits of CLI Configuration Flags
143+
144+
**✅ Highest Priority:** These flags override any profile settings
145+
146+
**✅ No Profile Editing:** Avoid modifying complex profile JSON files
147+
148+
**✅ Dynamic Configuration:** Perfect for automated deployments and scripts
149+
150+
**✅ Session Isolation:** Different configurations per browser instance without profile conflicts
151+
152+
### Configuration Priority Order
153+
154+
1. **🥇 CLI `--bot-config-*` flags** (Highest priority)
155+
2. **🥈 Profile `configs` settings** (Medium priority)
156+
3. **🥉 Profile default values** (Lowest priority)
157+
158+
---
159+
102160
## 📝 Usage Examples
103161

104162
### Basic BotBrowser Setup
@@ -135,9 +193,40 @@ chromium-browser \
135193
--remote-debugging-port=9222
136194
```
137195

138-
### Complete Stealth Setup
196+
### Configuration Override Examples
197+
```bash
198+
# Override specific profile settings with CLI flags
199+
chromium-browser \
200+
--bot-profile="./profiles/chrome139_win11_x64.enc" \
201+
--bot-config-browser-brand="edge" \
202+
--bot-config-timezone="Europe/London" \
203+
--bot-config-webgl="disabled" \
204+
--bot-config-noise-canvas=true \
205+
--bot-title="Custom Session"
206+
```
207+
208+
### Dynamic Multi-Instance Setup
209+
```bash
210+
# Instance 1 - Chrome brand with profile window settings
211+
chromium-browser \
212+
--bot-profile="./profiles/profile.enc" \
213+
--bot-config-browser-brand="chrome" \
214+
--bot-config-window="profile" \
215+
--bot-config-timezone="America/New_York" \
216+
--user-data-dir="/tmp/instance1" &
217+
218+
# Instance 2 - Edge brand with real window settings
219+
chromium-browser \
220+
--bot-profile="./profiles/profile.enc" \
221+
--bot-config-browser-brand="edge" \
222+
--bot-config-window="real" \
223+
--bot-config-timezone="Europe/London" \
224+
--user-data-dir="/tmp/instance2" &
225+
```
226+
227+
### Complete Stealth Setup with Configuration Overrides
139228
```bash
140-
# All BotBrowser features combined
229+
# All BotBrowser features combined with CLI configuration
141230
chromium-browser \
142231
--no-sandbox \
143232
--headless \
@@ -146,6 +235,11 @@ chromium-browser \
146235
--bot-cookies='[{"name":"auth","value":"token123","domain":".site.com"}]' \
147236
--bot-bookmarks='[{"name":"Home","url":"https://example.com"}]' \
148237
--proxy-server="http://user:pass@proxy.example.com:8080" \
238+
--bot-config-browser-brand="chrome" \
239+
--bot-config-timezone="auto" \
240+
--bot-config-webgl="profile" \
241+
--bot-config-noise-canvas=true \
242+
--bot-config-noise-webgl-image=true \
149243
--user-data-dir="$(mktemp -d)" \
150244
--remote-debugging-port=9222
151245
```
@@ -165,7 +259,7 @@ chromium-browser \
165259

166260
### BotBrowser-Specific Considerations
167261

168-
**Profile Priority:** Profile `configs` settings override equivalent CLI flags where applicable.
262+
**Configuration Priority:** CLI `--bot-config-*` flags have the highest priority and override profile `configs` settings.
169263

170264
**Session Management:** Use `--bot-title` to easily identify different browser instances in your system.
171265

profiles/README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,36 @@ await page.goto("https://abrahamjuliot.github.io/creepjs/");
114114

115115
---
116116

117-
## ⚙️ Profile Configuration
117+
## 🎛️ Configuration Approaches
118118

119-
**2025 Update:** Full environment customization now supported directly inside profiles.
119+
### Profile-Based Configuration
120+
- **Purpose**: Stores authentic user fingerprints and base settings
121+
- **When to use**: For core browser identity and fingerprint data
122+
- **Limitation**: Encrypted files are difficult to modify
120123

121-
**Configurable Settings:**
122-
- Proxy configuration
123-
- Timezone and language
124-
- Screen size and device pixel ratio
125-
- System properties
124+
### CLI-Based Configuration
125+
- **Purpose**: Runtime overrides without modifying profile files
126+
- **When to use**: For session-specific settings like proxy, title, cookies
127+
- **Advantage**: Preserves profile integrity while enabling flexibility
126128

127-
👉 **See [`profile-configs.md`](https://github.com/botswin/BotBrowser/blob/main/profiles/profile-configs.md) for complete configuration options.**
129+
### Best Practice: Hybrid Approach
130+
```bash
131+
# Keep authentic fingerprint data in profile
132+
# Override session-specific settings via CLI
133+
--bot-profile="real_user_fingerprint.enc" \
134+
--proxy-server="session_specific_proxy" \
135+
--bot-title="current_session_id"
136+
```
128137

129-
*No more manual CDP configuration required!*
138+
## ⚡ Why CLI Flags Matter
139+
- **🔒 Preserve authenticity**: Don't modify real user fingerprint data
140+
- **🚀 Runtime flexibility**: Adjust settings per session without file edits
141+
- **💼 Session isolation**: Multiple instances with different settings
142+
- **🛡️ Security**: Keep sensitive data (like proxy credentials) out of profile files
143+
144+
📖 **For complete CLI flags documentation**, see [CLI Flags Reference](../cli-flags.md)
145+
146+
👉 **See [`profile-configs.md`](https://github.com/botswin/BotBrowser/blob/main/profiles/profile-configs.md) for complete configuration options.**
130147

131148
---
132149

profiles/profile-configs.md

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# 📚 BotBrowser Profile Configuration Guide
22

3-
This document explains how to configure custom browser properties inside a **BotBrowser profile**, without relying on CDP.
3+
This document explains how to configure custom browser properties using **BotBrowser profiles** and **CLI configuration flags**.
4+
5+
> 💡 **Recommended Approach:** Use CLI `--bot-config-*` flags instead of modifying profile files. CLI flags have the highest priority and don't require editing profile JSON files. See [CLI Flags Reference](../cli-flags.md#⚙️-profile-configuration-override-flags).
46
57
## 📋 Table of Contents
68

9+
- [⚙️ Configuration Priority System](#️-configuration-priority-system)
710
- [⚠️ Important: Profile Data Integrity](#️-important-profile-data-integrity)
811
- [🔧 How to Apply Configuration](#-how-to-apply-configuration)
912
- [🛠️ Configurable Fields](#️-configurable-fields)
@@ -13,6 +16,36 @@ This document explains how to configure custom browser properties inside a **Bot
1316

1417
---
1518

19+
## ⚙️ Configuration Priority System
20+
21+
BotBrowser uses a three-tier priority system for configuration:
22+
23+
### Priority Order (Highest to Lowest)
24+
25+
1. **🥇 CLI `--bot-config-*` flags** - Highest priority, overrides everything
26+
2. **🥈 Profile `configs` settings** - Medium priority, overrides profile defaults
27+
3. **🥉 Profile default values** - Lowest priority, built-in profile data
28+
29+
### 💡 Why CLI Flags Are Recommended
30+
31+
**✅ Highest Priority:** Always takes precedence over profile settings
32+
**✅ No Profile Editing:** Avoid modifying complex encrypted profile files
33+
**✅ Dynamic Configuration:** Perfect for automation and different environments
34+
**✅ Session Isolation:** Different settings per browser instance without conflicts
35+
36+
**Example:**
37+
```bash
38+
# Use CLI flags to override profile settings dynamically
39+
chromium-browser \
40+
--bot-profile="./profiles/profile.enc" \
41+
--bot-config-browser-brand="edge" \
42+
--bot-config-timezone="Europe/London"
43+
```
44+
45+
> 📖 **Complete CLI flags reference:** [CLI Flags Reference](../cli-flags.md#⚙️-profile-configuration-override-flags)
46+
47+
---
48+
1649
## ⚠️ Important: Profile Data Integrity
1750

1851
**Profile data comes from real users; unless you are certain about the impact of a change, do not override any fingerprint property - keeping the defaults ensures the most authentic behavior.**
@@ -60,17 +93,15 @@ All configurations are embedded in the `configs` field inside your profile JSON
6093
| `proxy.username` | Proxy username for basic auth (optional). | `""` |
6194
| `proxy.password` | Proxy password for basic auth (optional). | `""` |
6295

63-
> 💡 **Tip:** If you prefer not to embed proxy settings in your profile, you can use BotBrowser's CLI parameters instead:
64-
> ```bash
65-
> --proxy-server=<username:password@hostname:port>
66-
> --proxy-server=<scheme://username:password@hostname:port>
67-
> ```
68-
> or
69-
>
96+
> 💡 **Better Approach:** Use CLI flags for proxy configuration:
7097
> ```bash
71-
> --proxy-server=<hostname:port>
72-
> --proxy-username=<user>
73-
> --proxy-password=<pass>
98+
> # Embedded credentials (recommended)
99+
> --proxy-server="http://username:password@proxy.example.com:8080"
100+
>
101+
> # Separate credentials
102+
> --proxy-server="proxy.example.com:8080"
103+
> --proxy-username="username"
104+
> --proxy-password="password"
74105
> ```
75106
>
76107
> 📖 **For complete CLI flags documentation**, see [CLI Flags Reference](../cli-flags.md)
@@ -232,7 +263,7 @@ All configurations are embedded in the `configs` field inside your profile JSON
232263
- Profile data comes from real users; change only if necessary and you understand the impact.
233264
- All string fields support multi-purpose values: string literal (`"auto"`, `"real"`, or custom), or object schema when more parameters are needed.
234265
- If a field is omitted, BotBrowser uses profile defaults where appropriate.
235-
- Values in the `configs` block **override** equivalent command-line arguments like `--window-size`, `--window-position`, etc.
266+
- CLI `--bot-config-*` flags **override** profile `configs` settings with highest priority
236267
- **uaFullVersion Tip**: When JavaScript calls `navigator.userAgentData.fullVersion`, BotBrowser will replace the default value with this field. Ensure that the specified full version corresponds to the Chromium engine’s major version (e.g., Chromium 138 → full version should begin with “138.”). You can look up the latest full version for each major release on https://chromiumdash.appspot.com/releases.
237268
238269
---

0 commit comments

Comments
 (0)