TenantDrive/README.md

106 lines
2.2 KiB
Markdown
Raw Permalink 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.

# 网盘外链分享系统
这是一个基于Flask的网盘外链分享系统支持创建各种网盘服务的临时分享链接管理访问次数和过期时间。
## 功能
- 多种网盘服务支持(夸克网盘等)
- 外链管理(创建、删除、统计)
- 访问次数限制
- 外链过期时间设置
- 管理后台界面
- 数据统计分析
## 安装步骤
### 环境要求
- Python 3.8+
- 依赖的Python库见requirements.txt
### 安装指南
1. 克隆项目仓库
```bash
git clone https://github.com/yourusername/cloud-drive-share.git
cd cloud-drive-share
```
2. 创建并激活虚拟环境(可选但推荐)
```bash
python -m venv venv
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate
```
3. 安装依赖
```bash
pip install -r requirements.txt
```
4. 设置配置文件
创建`config.py`文件,填入你的配置信息:
```python
SECRET_KEY = 'your-secret-key'
DEBUG = True # 生产环境设置为False
```
## 使用方法
### 运行服务器
```bash
python main.py
```
默认情况下,服务器将在 http://localhost:5000 运行。
### 管理后台
访问 http://localhost:5000/admin/ 进入管理后台。
### API接口
系统提供以下API接口
- `/admin/drive_provider/<method>` - 网盘服务提供商管理
- `/admin/user_drive/<method>` - 用户网盘管理
- `/admin/exlink/*` - 外链管理
- `/login` - 登录接口
- `/exlink/<id>` - 外链访问
## 项目结构
```
cloud-drive-share/
├── main.py # 主程序入口
├── config.py # 配置文件
├── database.db # SQLite数据库
├── requirements.txt # 依赖列表
├── utils/ # 工具模块
│ ├── detebase.py # 数据库操作
│ ├── login.py # 登录相关功能
│ └── tools.py # 辅助工具
├── templates/ # 模板文件
└── static/ # 静态资源
```
## 贡献指南
1. Fork 本仓库
2. 创建你的特性分支 (`git checkout -b feature/amazing-feature`)
3. 提交你的更改 (`git commit -m 'Add some amazing feature'`)
4. 推送到分支 (`git push origin feature/amazing-feature`)
5. 打开一个 Pull Request
## 许可证
本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件