Files
crypto_key/README.md
T
dekun 3e52b8eb87 feat: add wallet types, image upload, backup tabs, and manage.sh
Add mnemonic/key credentials with image upload, tabbed UI for add/query
and settings (auth/types/backup), daily backup to /root, and interactive
deploy script that updates via git pull only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 20:35:24 +08:00

104 lines
2.9 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.
# crypto_key — 凭证保险库
本地 / 局域网 Web 工具,集中管理交易所 API、钱包助记词/密钥、网站、邮箱、机器人、微信/QQ 及自定义类型凭证。数据 **AES 加密** 存储,**用户名密码登录**,浏览器不缓存明文。
| 项目 | 说明 |
|------|------|
| 仓库 | [git.bz121.com/dekun/crypto_key](https://git.bz121.com/dekun/crypto_key.git) |
| 端口 | `5200``0.0.0.0`,局域网可访问) |
| Ubuntu 部署 | `/opt/crypto_key` + PM2 |
---
## 文档导航
| 文档 | 说明 |
|------|------|
| **[USAGE.md](./USAGE.md)** | 使用说明(登录、添加、查询、系统设置) |
| **[DEPLOY.md](./DEPLOY.md)** | 部署文档(Ubuntu/Windows、PM2、备份、排错) |
| **[CHANGELOG.md](./CHANGELOG.md)** | 更新说明与版本升级注意 |
---
## 快速开始
```bash
git clone https://git.bz121.com/dekun/crypto_key.git
cd crypto_key
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # 可选,首次运行也会自动生成
python app.py
```
浏览器打开:
- 本机:http://127.0.0.1:5200
- 局域网:`http://<本机IP>:5200`
默认账号(请尽快在系统设置中修改):`admin` / `admin123`
---
## 主要功能
- 登录鉴权(凭据在 `.env`Session 在服务端)
- 内置类型:交易所、**钱包助记词**、**钱包密钥**、网站、邮箱、企微/钉钉机器人、微信、QQ
- **图片上传**:助记词/密钥等可附带截图
- 自定义类型:系统设置中添加(小红书、抖音等)
- Tab 界面:添加凭证 / 查询凭证;查询类型为下拉筛选
- 系统设置 Tab:账户密码 / 自定义类型 / **备份恢复**
- 每日自动备份到 `/root/crypto_key_backups/`(无权限时回退到项目 `backups/`
- 旧版明文 `data.json` 自动迁移加密
---
## Ubuntu 一键部署(交互式)
```bash
sudo git clone https://git.bz121.com/dekun/crypto_key.git /opt/crypto_key
cd /opt/crypto_key
sudo bash scripts/manage.sh
```
菜单:
1. 一键部署
2. 更新(**仅 git pull**,严禁 scp
3. 一键卸载
详见 [DEPLOY.md](./DEPLOY.md)。
---
## 项目文件
| 文件 | 说明 |
|------|------|
| `app.py` | Flask 后端 |
| `storage.py` | 加密存储与迁移 |
| `backup.py` | 备份/恢复与每日自动备份 |
| `env_config.py` | `.env` 管理 |
| `index.html` | 前端单页 |
| `ecosystem.config.cjs` | PM2 配置 |
| `scripts/manage.sh` | 交互式部署/更新/卸载 |
---
## 安全提示
- 仅在可信局域网使用,勿将 5200 映射到公网
- 定期备份 `.env``data.json`(密钥丢失将无法解密)
- 勿将 `.env``data.json``uploads/` 提交到 Git
---
## 依赖
```
flask, python-dotenv, cryptography, werkzeug
```
服务器 PM2 部署另需 Node.js 16+。