Files
live-hub-py/README.md
T

86 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 斗鱼批量登录 Web 后台
全自动登录斗鱼账号、获取 Cookie 的 Web 管理平台。
## 功能特性
- 极验 v3 滑块自动识别
- 邮箱验证码自动获取(IMAP
- 批量登录 + 实时日志推送(WebSocket
- 代理 & 白名单自动管理
- 角色权限控制(超级管理员 / 运营 / 客服)
## 项目结构
```
douyu_login_py/
├── core/ # 核心业务逻辑
│ ├── models.py # Account, ProxyConfig 数据类
│ ├── douyu/ # 斗鱼登录模块
│ │ ├── login.py # 登录流程
│ │ ├── crypto.py # 密码加密
│ │ ├── email_verifier.py # 邮箱验证码
│ │ ├── proxy.py # 代理管理
│ │ └── whitelist.py # 白名单管理
│ └── geetest/ # 极验验证码求解
│ ├── common/ # 公共工具(网络/加密/图像/轨迹)
│ └── v3_slide/ # v3 滑块求解器
├── web/ # Web 后台
│ ├── backend/ # FastAPI 后端
│ │ ├── main.py # 入口
│ │ ├── routers/ # API 路由
│ │ └── services/ # 业务服务
│ └── frontend/ # React + Ant Design 前端
├── utils/ # 通用工具
│ └── logger.py
├── data/ # 运行时数据(gitignore
├── start_web.sh # 一键启动
└── pyproject.toml
```
## 快速开始
```bash
# 一键启动(自动检查依赖)
./start_web.sh
```
或手动启动:
```bash
# 后端
uv pip install -e .
.venv/bin/python -m uvicorn web.backend.main:app --reload --port 8000
# 前端
cd web/frontend && npm install && npm run dev
```
访问 `http://localhost:5173`,默认账号 `admin / admin123`
## 角色权限
| 角色 | 权限 |
|---|---|
| 超级管理员 | 全部功能 + 用户管理 + 权限分配 |
| 运营 | 账号管理 + 批量登录 + 代理配置 + Cookie 导出 |
| 客服 | 仅查看分配给自己的账号(只显示用户名) |
## 登录流程
```
1. 获取极验参数 → 滑块验证 → 自动识别缺口
2. 获取邮箱验证 code → 发送验证邮件
3. IMAP 获取验证码 → 提交验证码 → 获取 Cookie
```
## 技术栈
- 后端:FastAPI + SQLAlchemy + SQLite + JWT
- 前端:React + Ant Design + Vite
- 核心:Python + OpenCV + pycryptodome
## 许可证
MIT License