Skip to content

Commit 1d438cc

Browse files
committed
docs: 更新项目文档至 v1.8.0,添加 WebSocket 通知和线程安全说明
1 parent 943385d commit 1d438cc

5 files changed

Lines changed: 81 additions & 13 deletions

File tree

AGENTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ sqlmapWebUI/
9191
- Sorting by multiple fields
9292
- Summary statistics row in task list
9393
- Smart polling (adjusts refresh rate based on task status)
94+
- WebSocket real-time notifications for task status changes
95+
- Confirmation dialogs for delete/stop operations
9496

9597
### Scan Configuration Management
9698
- **Default Configuration**: Global default scan parameters
@@ -316,6 +318,12 @@ Backend allows CORS from:
316318
- Header rules stored in SQLite (`header_rules.db`)
317319
- Automatic database migration for schema changes
318320

321+
### Thread Safety (Important)
322+
- `DataStore.tasks_lock` is a `threading.Lock` (synchronous)
323+
- In async functions, use `run_in_executor` with `ThreadPoolExecutor` to avoid blocking event loop
324+
- Never use `with tasks_lock:` directly in async functions
325+
- Task operations use thread pool pattern for safe concurrent access
326+
319327
## File Dependencies
320328

321329
### Backend Entry Point

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
</p>
66

77
<p align="center">
8-
<img src="https://img.shields.io/badge/Python-3.13+-blue.svg" alt="Python">
8+
<img src="https://img.shields.io/badge/Python-3.10+-blue.svg" alt="Python">
99
<img src="https://img.shields.io/badge/Vue-3.x-green.svg" alt="Vue">
1010
<img src="https://img.shields.io/badge/FastAPI-0.100+-red.svg" alt="FastAPI">
1111
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License">
12-
<img src="https://img.shields.io/badge/Version-1.7.9-orange.svg" alt="Version">
12+
<img src="https://img.shields.io/badge/Version-1.8.0-orange.svg" alt="Version">
1313
</p>
1414

1515
<p align="center">
@@ -271,16 +271,26 @@ sqlmapWebUI/
271271
## 📝 更新日志
272272

273273
### v1.8.0 (2025-12)
274+
275+
**新功能**
274276
- 新增后端服务启动脚本(Windows/Linux/macOS)
275277
- 支持自动创建和复用虚拟环境
276278
- 支持配置 PyPI 镜像(清华/阿里/中科大等)
277279
- 支持内网私域镜像配置
278280
- 支持完全离线环境部署
279-
- 解决 Windows/Linux 命令行中文乱码问题
280-
- Python 最低版本要求调整为 3.10+
281-
- 新增后端服务免责声明文档
281+
- 新增 WebSocket 实时通知机制,后端可主动推送任务状态变更
282+
- 任务列表页删除和停止操作添加确认对话框
283+
284+
**优化**
285+
- 优化任务操作线程安全,将同步锁操作移至线程池避免阻塞事件循环
282286
- 优化扫描配置预设选择UI
283287
- 完善提交按钮禁用逻辑和提示信息
288+
- Python 最低版本要求调整为 3.10+
289+
290+
**修复**
291+
- 解决 Windows/Linux 命令行中文乱码问题
292+
- 修复刷新间隔 API 响应数据结构处理错误
293+
- 新增后端服务免责声明文档
284294

285295
### v1.7.9 (2025-12)
286296
- 新增项目 Logo 设计(盾牌+注入针头概念)

README_EN.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
</p>
66

77
<p align="center">
8-
<img src="https://img.shields.io/badge/Python-3.13+-blue.svg" alt="Python">
8+
<img src="https://img.shields.io/badge/Python-3.10+-blue.svg" alt="Python">
99
<img src="https://img.shields.io/badge/Vue-3.x-green.svg" alt="Vue">
1010
<img src="https://img.shields.io/badge/FastAPI-0.100+-red.svg" alt="FastAPI">
1111
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License">
12-
<img src="https://img.shields.io/badge/Version-1.7.9-orange.svg" alt="Version">
12+
<img src="https://img.shields.io/badge/Version-1.8.0-orange.svg" alt="Version">
1313
</p>
1414

1515
<p align="center">
@@ -278,16 +278,26 @@ Please read the [Disclaimer](DISCLAIMER.md) before use.
278278
## Changelog
279279

280280
### v1.8.0 (2025-12)
281+
282+
**New Features**
281283
- Added backend service startup scripts (Windows/Linux/macOS)
282284
- Support for auto-creating and reusing virtual environments
283285
- Support for PyPI mirror configuration (Tsinghua/Aliyun/USTC, etc.)
284286
- Support for intranet private mirror configuration
285287
- Support for fully offline environment deployment
286-
- Fixed Windows/Linux command line encoding issues
287-
- Lowered Python minimum version requirement to 3.10+
288-
- Added backend service disclaimer document
288+
- Added WebSocket real-time notification mechanism, backend can actively push task status changes
289+
- Added confirmation dialogs for delete and stop operations on task list page
290+
291+
**Improvements**
292+
- Optimized task operation thread safety, moved sync lock operations to thread pool to avoid blocking event loop
289293
- Improved scan configuration preset selection UI
290294
- Enhanced submit button disable logic and hints
295+
- Lowered Python minimum version requirement to 3.10+
296+
297+
**Fixes**
298+
- Fixed Windows/Linux command line encoding issues
299+
- Fixed refresh interval API response data structure handling error
300+
- Added backend service disclaimer document
291301

292302
### v1.7.9 (2025-12)
293303
- Added project Logo design (shield + injection syringe concept)

doc/FEATURE_UPDATES.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,30 @@
137137
- 页面显示时恢复轮询
138138
- 防止重复请求
139139

140+
### 9. WebSocket 实时通知 ✅ (v1.8.0 新增)
141+
142+
#### 通知机制
143+
- 后端通过 WebSocket 主动推送任务状态变更
144+
- 新任务创建时自动通知前端刷新
145+
- 任务完成/失败时即时推送结果
146+
147+
#### 线程安全优化
148+
- 使用线程池执行同步锁操作,避免阻塞事件循环
149+
- 解决后端卡死导致通知失败问题
150+
- 确保高并发场景下的稳定性
151+
152+
### 10. 操作确认对话框 ✅ (v1.8.0 新增)
153+
154+
#### 防误操作保护
155+
- 删除单个任务需确认
156+
- 停止单个任务需确认
157+
- 批量操作需确认
158+
- 删除全部需二次确认
159+
160+
#### 用户反馈
161+
- 操作成功/失败 Toast 提示
162+
- 详细的操作结果信息
163+
140164
### 8. 响应式布局优化 ✅
141165

142166
#### 断点定义
@@ -229,7 +253,7 @@
229253

230254
## 更新日期
231255

232-
2025-01-XX
256+
2025-12-23 (v1.8.0)
233257

234258
## 开发者
235259

doc/USAGE_GUIDE.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,23 @@ python server.py
208208
- **扫描结果**: 发现的注入点和 Payload 详情
209209
- **实时日志**: 任务执行日志,支持刷新
210210

211-
### 3.5 智能轮询
211+
### 3.5 实时通知
212+
213+
系统采用 WebSocket 实时通知机制:
214+
- 后端主动推送任务状态变更
215+
- 新任务创建时自动通知前端刷新
216+
- 配合智能轮询策略,减少不必要的请求
217+
218+
### 3.6 操作确认
219+
220+
为防止误操作,以下操作需要确认:
221+
- 删除单个任务
222+
- 停止单个任务
223+
- 批量删除任务
224+
- 批量停止任务
225+
- 删除全部任务
226+
227+
### 3.7 智能轮询
212228

213229
系统采用智能轮询策略:
214230
- 当有运行中任务时,自动启动定时刷新
@@ -588,7 +604,7 @@ mvn clean package -DskipTests
588604
## 9. 常见问题
589605

590606
### Q: 后端服务启动失败?
591-
A: 检查 Python 版本(需要 3.13+),确保依赖安装完整。使用 `uv sync --extra thirdparty` 安装依赖。
607+
A: 检查 Python 版本(需要 3.10+),确保依赖安装完整。使用 `uv sync --extra thirdparty` 安装依赖。
592608

593609
### Q: 前端无法连接后端?
594610
A: 检查跨域配置,确保后端服务正在运行。后端默认监听 8775 端口。

0 commit comments

Comments
 (0)