Files
crypto_key/README.md
T
2026-05-27 07:45:16 +08:00

95 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.
# 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
- 自定义类型:系统设置中添加(小红书、抖音等)
- 查询后显示 + 类型/关键词搜索 + 敏感字段打码(复制为明文)
- 旧版明文 `data.json` 自动迁移加密
---
## Ubuntu 一键部署
```bash
sudo git clone https://git.bz121.com/dekun/crypto_key.git /opt/crypto_key
cd /opt/crypto_key
cp .env.example .env
sudo bash scripts/install-ubuntu.sh
```
详见 [DEPLOY.md](./DEPLOY.md)。
---
## 项目文件
| 文件 | 说明 |
|------|------|
| `app.py` | Flask 后端 |
| `storage.py` | 加密存储与迁移 |
| `env_config.py` | `.env` 管理 |
| `index.html` | 前端单页 |
| `ecosystem.config.cjs` | PM2 配置 |
| `scripts/install-ubuntu.sh` | Ubuntu 安装脚本 |
---
## 安全提示
- 仅在可信局域网使用,勿将 5200 映射到公网
- 定期备份 `.env``data.json`(密钥丢失将无法解密)
- 勿将 `.env``data.json` 提交到 Git
---
## 依赖
```
flask, python-dotenv, cryptography, werkzeug
```
服务器 PM2 部署另需 Node.js 16+。