mirror of
https://github.com/nianzhibai/91.git
synced 2026-06-15 00:44:30 +08:00
0f111b846d47e9f79abd51be6196d4e7a89b03c7
Local .strm files that pointed to a path outside the configured storage root previously failed cover/preview/fingerprint generation and playback with "strm target escapes root", breaking the common layout where the strm library and the real media files (e.g. an rclone mount) live in separate directories (issue #22 follow-up). - localstorage driver gains STRMAllowOutsideRoot; when on, strm targets outside the root are allowed (still resolves symlinks and still rejects nested strm, so no new escape vector). Default off preserves the existing security boundary - Toggle persisted as the strm_allow_outside_root credential; editing a localstorage drive now merges credentials per-key so leaving the path blank keeps the old value while flipping the toggle - Saving a localstorage drive with the toggle on auto-re-enqueues previously-failed thumbnails/previews/fingerprints, so enabling it recovers without manually clicking the three retry buttons - Drives API exposes strmAllowOutsideRoot for form echo-back; admin drive form adds a "允许指向目录外" select with a security warning - Tests cover allow-outside-root on/off and that nested strm stays rejected even when the toggle is on Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
91
😄 个人私有视频站 😄
快速开始 · 功能特性 · 预览图 · 数据目录 · 许可证
功能特性
- 多后端支持 — 兼容 115 云盘、PikPak 云盘、123网盘、联通网盘、OneDrive、Google Drive 和本地存储
- 低带宽播放 — 115 云盘、PikPak 云盘、123网盘、联通网盘、OneDrive 支持302模式,在线播放视频时,不占用服务器带宽,播放体验不受服务器带宽影响;Google Drive 不支持302模式,走服务器中转,观看体验会受服务器带宽影响
- 封面 & 预览片段 — 自动为每个视频生成封面图和预览片段,首页快速选片
- 爬虫脚本 — 项目支持导入自定义脚本,但是有一些规范,具体可以参考 SpiderFor91,项目不再内置任何爬虫脚本
- 短视频模式 — 一键切换抖音风格,沉浸刷片
预览图
电脑端
手机端
快速开始
方式一:一键安装脚本(推荐)
sudo apt update && sudo apt install -y curl ca-certificates
curl -fsSL https://raw.githubusercontent.com/nianzhibai/91/main/install.sh -o install.sh
sudo bash install.sh
部署完成后访问:
| 地址 | 说明 |
|---|---|
http://服务器IP:9191/ |
前台 |
http://服务器IP:9191/admin |
后台管理 |
注意:如果首次访问,显示502,可以运行 91 restart 重启一下服务
安装后自动注册 91 管理命令:
91 # 打开管理菜单
91 status # 查看运行状态
91 logs # 查看日志
91 update # 更新到最新版本
91 restart # 重启服务
91 stop # 停止服务
video-site-91为等效别名,两者可互换使用。
自定义端口:
FRONTEND_PORT=8080 sudo -E bash install.sh
旧版本升级(v0.0.2 之前):
旧版脚本直接执行 91 update 可能失败,先执行以下修复命令:
curl -fsSL https://raw.githubusercontent.com/nianzhibai/91/main/install.sh -o /tmp/install-91.sh
sudo bash /tmp/install-91.sh update
方式二:Docker Compose 部署
1. 准备目录
mkdir -p video-site-91 && cd video-site-91
2. 创建 docker-compose.yml
services:
video-site-91:
image: ghcr.io/nianzhibai/91:stable
container_name: video-site-91
ports:
- "9191:9191"
volumes:
- ./data:/opt/video-site-91/data
restart: unless-stopped
创建yml文件后运行下面指令
docker compose pull
docker compose up -d
如果想固定某个 Release 版本,可以改成明确的 tag,例如:
image: ghcr.io/nianzhibai/91:v0.0.6
或直接拉取仓库内置配置:
curl -fsSL https://raw.githubusercontent.com/nianzhibai/91/main/docker-compose.yml -o docker-compose.yml
3. 启动
docker compose up -d
常用命令:
docker compose logs -f # 查看日志
docker compose pull # 拉取最新正式版 stable 镜像
docker compose up -d # 更新并重启
所有配置、数据库、封面、预览及上传文件均保存在
./data/目录下。
数据存放位置
一键脚本部署
| 路径 | 内容 |
|---|---|
/opt/video-site-91/config.yaml |
配置文件、管理员账号、网盘凭证 |
/opt/video-site-91/data/video-site.db |
SQLite 数据库 |
/opt/video-site-91/data/previews/ |
封面图和预览片段 |
Docker Compose 部署
| 路径 | 内容 |
|---|---|
./data/config.yaml |
配置文件、管理员账号、网盘凭证 |
./data/video-site.db |
SQLite 数据库 |
./data/previews/ |
封面图和预览片段 |
./data/uploads/ |
本地上传的视频文件 |
./data/spider91/ |
91 爬虫抓取的视频文件 |
使用须知
本项目面向个人私有部署,请仅接入你有权访问和管理的内容,并遵守对应网盘、站点的服务条款及所在地法律法规。
不对外传播,仅限个人使用。
PR提交规范
欢迎大家提交PR,一起来完善这个项目,但是这里要说明一下PR提交的规范
- 一个PR的功能改动要单一,不建议一个PR修改了大量功能。单个PR单个功能修改,这样也更容易Merge
- 完善项目的PR比新增功能的PR更容易Merge(例如:例如你发现开发者没有实现爬取的视频上传到某个网盘,并且你有这个需求,此时你可以实现一下这个功能然后提交PR,也感谢你为开发者分担工作量)
- 新增功能的PR不容易Merge,因为某些功能的需求可能不是所有人都需要的,如果一味的不断增加功能,会让项目变得过于庞大。当然如果你肯定你的新功能和想法很好,并且相信将会对于项目有很大的改善,那么热烈欢迎你的PR
许可证
本项目基于 MIT License 开源。
致谢
Languages
Go
64.3%
TypeScript
21%
CSS
10.6%
Python
2.1%
Shell
1.8%