Skip to content

Commit 338ab87

Browse files
committed
docs: 更新文档
1 parent 1e73244 commit 338ab87

File tree

4 files changed

+92
-10
lines changed

4 files changed

+92
-10
lines changed

docs/admin/optimization.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
添加或修改以下内容:
4747

4848
```bash
49-
# 使用 zstd 压缩算法,速度和压缩率最平衡
50-
ALGO=zstd
49+
# 使用 lz4 压缩算法,速度和压缩率最平衡
50+
ALGO=lz4
5151

5252
# 使用内存总量的 60% 作为 ZRAM 大小
5353
PERCENT=60
@@ -85,8 +85,8 @@
8585
[zram0]
8686
# 使用内存总量的 60%
8787
zram-size = ram * 0.6
88-
# 使用 zstd 压缩算法
89-
compression-algorithm = zstd
88+
# 使用 lz4 压缩算法
89+
compression-algorithm = lz4
9090
# 优先级高于磁盘 Swap
9191
swap-priority = 100
9292
```
@@ -102,7 +102,7 @@
102102
无论使用哪种系统,都建议调整 `swappiness` 以更积极地使用 ZRAM。
103103

104104
```bash
105-
grep -q "vm.swappiness" /etc/sysctl.conf || echo "vm.swappiness=80" | tee -a /etc/sysctl.conf
105+
grep -q "vm.swappiness" /etc/sysctl.conf || echo "vm.swappiness=20" | tee -a /etc/sysctl.conf
106106
sysctl -p
107107
```
108108

docs/config/overview.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,27 @@ browser:
5757
# ⚠️ 风险提示: 正常 Firefox 用户默认开启 Fission,虽然关闭它不会泄露常规指纹,
5858
# 但极高阶的反爬系统可能会通过检测“单进程模型”或“跨进程通信延迟”来识别自动化特征!
5959
fission: true
60+
61+
# CSS 性能优化注入
62+
# 通过禁用网页特效在无显卡环境下降低 CPU 压力
63+
cssInject:
64+
# 禁用网页动画
65+
# 作用:移除 transition 和 animation
66+
# 收益:显著降低 CPU 持续占用
67+
# 风险:极低。几乎不影响浏览器指纹
68+
animation: false
69+
70+
# 禁用滤镜和阴影
71+
# 作用:移除 blur(模糊)、box-shadow(阴影) 等复杂渲染
72+
# 收益:在无显卡环境下,能避免 CPU 占用 100% 导致卡顿
73+
# 风险:中。界面会变得难看,少数反爬可能会检测样式计算结果
74+
filter: false
75+
76+
# 降低字体渲染质量
77+
# 作用:关闭字体抗锯齿,强制使用极速渲染模式
78+
# 收益:微量减少 CPU 绘图压力
79+
# ⚠️ 风险:高。会导致文字边缘有锯齿,且可能导致字体指纹与标准浏览器不符(易被高级反爬识别)
80+
font: false
6081

6182
# [全局代理] 如果 Instance 没有独立配置代理,将使用此配置
6283
proxy:
@@ -109,6 +130,26 @@ browser:
109130
| `headless` | boolean | `false` | 是否启用无头模式 |
110131
| `fission` | boolean | `true` | 是否启用站点隔离 (fission.autostart) |
111132
| `proxy` | object | - | 全局代理配置 |
133+
| `cssInject` | object | - | CSS 性能优化注入配置 |
134+
135+
#### CSS 优化注入 (cssInject)
136+
137+
针对无显卡 (CPU-Only) 环境的性能优化选项。通过注入 CSS 禁用部分网页特效来降低 CPU 负载。
138+
139+
| 配置项 | 类型 | 默认值 | 说明 |
140+
| --- | --- | --- | --- |
141+
| `animation` | boolean | `false` | **禁用动画** (推荐)<br>作用:移除 transition 和 animation<br>收益:显著降低 CPU 持续占用<br>风险:极低 (几乎不影响指纹) |
142+
| `filter` | boolean | `false` | **禁用特效**<br>作用:移除 blur、box-shadow 等<br>收益:避免复杂渲染导致的卡顿<br>风险:中 (界面美观度下降,极少反爬检测) |
143+
| `font` | boolean | `false` | **极速字体**<br>作用:关闭字体抗锯齿<br>收益:微量减少绘图压力<br>风险:**** (字体指纹异常,易被高级反爬识别) |
144+
145+
### 后端资源池 (backend.pool)
146+
147+
| 配置项 | 类型 | 默认值 | 说明 |
148+
| --- | --- | --- | --- |
149+
| `strategy` | string | `least_busy` | 负载均衡策略,可选:`least_busy` |
150+
| `failover.enabled` | boolean | `true` | 是否启用故障自动转移 |
151+
| `failover.maxRetries` | number | `2` | 故障转移最大重试次数 |
152+
| `instances` | array | - | 浏览器实例列表,详见 [实例配置](/config/instances) |
112153

113154
### 适配器配置 (backend.adapter)
114155

docs/en/admin/optimization.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ This English version is translated by **Gemini 3 Flash**.
5050
Add or modify the following:
5151

5252
```bash
53-
# Use zstd compression algorithm for the best balance of speed and ratio
54-
ALGO=zstd
53+
# Use lz4 compression algorithm for the best balance of speed and ratio
54+
ALGO=lz4
5555

5656
# Use 60% of total memory as ZRAM size
5757
PERCENT=60
@@ -89,8 +89,8 @@ Recommended to use `zram-generator` for these systems.
8989
[zram0]
9090
# Use 60% of total memory
9191
zram-size = ram * 0.6
92-
# Use zstd compression algorithm
93-
compression-algorithm = zstd
92+
# Use lz4 compression algorithm
93+
compression-algorithm = lz4
9494
# Higher priority than disk Swap
9595
swap-priority = 100
9696
```
@@ -106,7 +106,7 @@ Recommended to use `zram-generator` for these systems.
106106
Regardless of the system, it is recommended to adjust `swappiness` to use ZRAM more aggressively.
107107

108108
```bash
109-
grep -q "vm.swappiness" /etc/sysctl.conf || echo "vm.swappiness=80" | tee -a /etc/sysctl.conf
109+
grep -q "vm.swappiness" /etc/sysctl.conf || echo "vm.swappiness=20" | tee -a /etc/sysctl.conf
110110
sysctl -p
111111
```
112112

docs/en/config/overview.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,27 @@ browser:
6161
# ⚠️ Risk: Normal Firefox users have Fission enabled by default. While disabling it does not leak common fingerprints,
6262
# extremely advanced anti-bot systems might identify automated features via "single-process model" or "IPC delays".
6363
fission: true
64+
65+
# CSS Performance Injection
66+
# Reduce CPU load by disabling web effects (Best for CPU-only environments)
67+
cssInject:
68+
# Disable web animations
69+
# Effect: Removes transition and animation
70+
# Benefit: Significantly lowers continuous CPU usage
71+
# Risk: Very low. Almost no impact on browser fingerprint
72+
animation: false
73+
74+
# Disable filters and shadows
75+
# Effect: Removes blur, box-shadow, etc.
76+
# Benefit: Prevents CPU spikes and lag in no-GPU environments
77+
# Risk: Medium. Interface aesthetics degraded, few anti-bots might detect style calculations
78+
filter: false
79+
80+
# Reduce font rendering quality
81+
# Effect: Disables font anti-aliasing, forces fast rendering mode
82+
# Benefit: Slightly reduces CPU drawing pressure
83+
# ⚠️ Risk: High. Jagged text edges; font fingerprint differs from standard browsers (detected by advanced anti-bots)
84+
font: false
6485

6586
# [Global Proxy] Used if an Instance does not have its own proxy configuration
6687
proxy:
@@ -113,6 +134,26 @@ browser:
113134
| `headless` | boolean | `false` | Whether to enable headless mode. |
114135
| `fission` | boolean | `true` | Whether to enable Site Isolation (fission.autostart). |
115136
| `proxy` | object | - | Global proxy configuration. |
137+
| `cssInject` | object | - | CSS performance injection configuration. |
138+
139+
#### CSS Injection (cssInject)
140+
141+
Performance optimization options for CPU-Only environments. Reduces CPU load by disabling specific web effects via CSS injection.
142+
143+
| Item | Type | Default | Description |
144+
| --- | --- | --- | --- |
145+
| `animation` | boolean | `false` | **Disable Animations** (Recommended)<br>Effect: Removes transition and animation.<br>Benefit: Significantly reduces continuous CPU usage.<br>Risk: Very Low (Negligible impact on fingerprint). |
146+
| `filter` | boolean | `false` | **Disable Effects**<br>Effect: Removes blur, box-shadow, etc.<br>Benefit: Prevents UI lag caused by complex rendering.<br>Risk: Medium (UI Aesthetics degraded, rarely checked by anti-bots). |
147+
| `font` | boolean | `false` | **Fast Rendering Fonts**<br>Effect: Disables font anti-aliasing.<br>Benefit: Slightly reduces rendering pressure.<br>Risk: **High** (Font fingerprint anomaly, easily detected by advanced anti-bots). |
148+
149+
### Backend Resource Pool (backend.pool)
150+
151+
| Item | Type | Default | Description |
152+
| --- | --- | --- | --- |
153+
| `strategy` | string | `least_busy` | Load balancing strategy. Option: `least_busy`. |
154+
| `failover.enabled` | boolean | `true` | Whether to enable automatic failover. |
155+
| `failover.maxRetries` | number | `2` | Maximum retry attempts for failover. |
156+
| `instances` | array | - | List of browser instances. See [Instances Configuration](/en/config/instances). |
116157

117158
### Adapter Configuration (backend.adapter)
118159

0 commit comments

Comments
 (0)