使用Moviepilot实现115网盘+Emby Strm播放
本文主要内容使用Docker部署Moviepilot,并通过其中的115网盘STRM助手实现strm整理及刮削、MediaWrap插件进行302重定向播放。(注意,此教程更加适用于PT站已经毕业了的人使用)
前段时间购买了115永V,加上家里NAS内存实际上其实不够(本人有点点仓鼠症),想着与其买那么多硬盘不如直接上网盘了。本来想着白嫖OneDrive的E5账号,奈何直连效果确实不佳,且不能配合MP自动下资源(本人懒,追更找资源太麻烦)。我整套流程均部署在腾讯云香港服务器上(2C8G),性能完全够用,本文也会提供海外VPS被115封控导致连接webapi.115.com报错403的问题。废话不多说,直接开始。
组件说明
- Moviepilot(MP):搜索PT站资源下载,自动追更剧集电影等。详细请看官方WIKI。
- qBittorrent(Qbit):种子下载客户端。
- Emby:家庭媒体服务器。
- Nginx Proxy Manager:反向代理 MP、Qbit、Emby。
- Clash + proxychains-ng:解决海外 VPS 直连 115 网盘 Web API 被风控导致的 403 问题。
部署流程
配置容器
基本配置
- 创建对应文件夹和文件
Terminal window mkdir -p /docker_data/media && cd docker_data/media && mkdir video - 编辑
docker-compose.yamlTerminal window nano docker-compose.yamldocker-compose.yaml services:qbit:image: linuxserver/qbittorrent:4.6.5container_name: qbitnetwork_mode: bridgeenvironment:- PUID=0- PGID=0- TZ=Asia/Shanghai- WEBUI_PORT=8000 # WEBUI端口号,改成你想要的。同下。- TORRENTING_PORT=32156 # 做种端口号,改成你需要的,例如改成8080,那么ports mapping部分要改成xxxx:8080- QB_PASSWORD=xxxxxx # WEBUI登录密码- QB_USERNAME=xxxxxx # WEBUI登录用户名volumes:- ./qbit:/config- ./video:/video # 媒体目录。如果Map别的本地的目录,下面所有媒体目录部分也要跟着一起改。建议别动ports:- 65036:8000- 32156:32156restart: unless-stoppedemby:image: amilys/embyserver:latestcontainer_name: embynetwork_mode: bridgerestart: unless-stoppedports:- 65037:8096- 65038:8920- 65039:7359/udp- 65040:1900/udpvolumes:- ./emby:/config- ./video:/video # 同Qbit媒体目录。若上面修改,这里请同步修改environment:- PUID=0- PGID=0- GIDLIST=0- TZ=Asia/Shanghai- EMBY_PublishedServerUrl=xxx.xxx.xxx.xxx # 修改你成本地IPV4privileged: truemoviepilotv2:#image: jxxghp/moviepilot-v2:latestbuild:context: .dockerfile: Dockerfile.mp # 解决海外VPS无法访问webapi.115.com问题,重新打包一下镜像restart: alwaysstdin_open: truetty: truecontainer_name: moviepilot-v2hostname: moviepilot-v2network_mode: bridgeports:- 65041:3000- 65042:65042 # !!如果稍后在MP的MediaWarp环节设置的端口不是65042,这里请记得修改!!volumes:- ./video:/video # 同Qbit媒体目录。若上面修改,这里请同步修改- ./moviepilot:/config- ./mp-core:/moviepilot/.cache/ms-playwright- /var/run/docker.sock:/var/run/docker.sock:ro- ./proxychains.conf:/etc/proxychains.conf:ro # 使用proxychains4强制访问国内的代理绕过海外VPS封控限制environment:- NGINX_PORT=3000- PORT=3001- PUID=0- PGID=0- UMASK=000- SUPERUSER=改成你的用户名- TZ=Asia/Shanghai- AUTH_SITE=leaves # 参考MP WIKI设置认证站点,否则无法使用- LEAVES_UID=xxxxxxx #UID- LEAVES_PASSKEY=xxxxxxx #passkey- GITHUB_TOKEN=xxxxx # 设置Github Token防止获取插件过于频繁导致风控depends_on:- clashclash:image: dreamacro/clashnetwork_mode: bridgerestart: alwaysvolumes:- ./clash:/root/.config/clashcontainer_name: clashports:# 主机http代理端口:容器http代理端口,默认7890# 主机sock5代理端口:容器sock5代理端口,默认7890# 主机REST API端口:容器REST API端口,默认9090- 7890:7890- 7891:9090为什么要有Clash还要proxychains4?尽管你可以给
MP容器配置http_proxy、https_proxy等环境变量来一定程度上接管流量,但是实测,只有MP自己的115 OpenAPI会遵循环境代理,而MP里的115网盘STRM助手这个插件(里面的p115client这个python依赖)不honor环境变量,导致请求webapi.115.com依然不走回国代理。所以出此下策使用proxychains4强行接管MP容器流量到Clash容器。 - 编辑
Dockerfile.mp、entrypoint-wrapper.sh、proxychains.confTerminal window nano Dockerfile.mpDockerfile.mp FROM jxxghp/moviepilot-v2:latest# 切换到 root 用户以安装软件包USER root# 更新包列表并安装 proxychains-ng# jxxghp/moviepilot-v2 通常基于 Debian/UbuntuRUN apt-get update && \apt-get install -y proxychains-ng && \rm -rf /var/lib/apt/lists/*# 复制包装器脚本到镜像中COPY entrypoint-wrapper.sh /entrypoint-wrapper.shRUN chmod +x /entrypoint-wrapper.sh# 使用包装器脚本作为新的入口点# 原镜像的 ENTRYPOINT 是 ["/entrypoint.sh"]# 我们用 proxychains4 来执行它ENTRYPOINT ["/entrypoint-wrapper.sh"]Terminal window nano entrypoint-wrapper.sh#!/bin/sh# 使用 proxychains4 执行原始的 /entrypoint.sh 脚本,并传递所有参数exec proxychains4 /entrypoint.sh "$@"Terminal window nano proxychains.confproxychains.conf # /etc/proxychains.confstrict_chainproxy_dnslocalnet 127.0.0.0/8localnet 172.16.0.0/12localnet 10.0.0.0/8 # 改为你本地的IPV4 CIDR[ProxyList]http 172.17.0.1 7890 - 配置
clashTerminal window mkdir clash && nano ./clash/config.yamlmixed-port: 7890allow-lan: truemode: Rulelog-level: info#external-ui: dashboardexternal-controller: "0.0.0.0:9090"proxies:- {name: test, server: xxxxx.com, port: 2054, type: ss, cipher: aes-256-gcm, password: xxxx} # 替换成你自己的代理,这里只是举例proxy-groups:- name: PROXYtype: selectproxies:- testrules:- DOMAIN-KEYWORD,115.com,PROXY- MATCH,DIRECT - 启动服务
Terminal window docker compose up -d
配置Qbit
- 进入WEBUI界面,如图进行配置

配置MP
基本配置
- 配置下载器。请一定记得打开
自动分类管理和顺序下载。
- 配置媒体服务器,存储&目录
登录完成显示容量后再进行下一步目录配置。自动整理请一定记得改为下载器监控模式。
插件配置
- 配置插件源。如图复制粘贴。确认后,等待一会,然后搜索插件
115网盘STRM助手和MediaWarp这两个插件,安装即可。
https://github.com/jxxghp/MoviePilot-Plugins/https://github.com/thsrite/MoviePilot-Plugins/https://github.com/honue/MoviePilot-Plugins/https://github.com/InfinityPacer/MoviePilot-Plugins/https://github.com/dandkong/MoviePilot-Plugins/https://github.com/Aqr-K/MoviePilot-Plugins/https://github.com/AnjoyLi/MoviePilot-Plugins/https://github.com/WithdewHua/MoviePilot-Plugins/https://github.com/HankunYu/MoviePilot-Plugins/https://github.com/baozaodetudou/MoviePilot-Plugins/https://github.com/almus2zhang/MoviePilot-Plugins/https://github.com/Pixel-LH/MoviePilot-Plugins/https://github.com/lightolly/MoviePilot-Plugins/https://github.com/suraxiuxiu/MoviePilot-Plugins/https://github.com/gxterry/MoviePilot-Plugins/https://github.com/hotlcc/MoviePilot-Plugins-Third/https://github.com/boeto/MoviePilot-Plugins/https://github.com/xiangt920/MoviePilot-Plugins/https://github.com/yubanmeiqin9048/MoviePilot-Plugins/https://github.com/loongcheung/MoviePilot-Plugins/https://github.com/xcehnz/MoviePilot-Plugins/https://github.com/imaliang/MoviePilot-Plugins/https://github.com/wikrin/MoviePilot-Plugins/https://github.com/DDS-Derek/MoviePilot-Plugins/https://github.com/KoWming/MoviePilot-Pluginshttps://github.com/madrays/MoviePilot-Pluginshttps://github.com/aClarkChen/MoviePilot-Pluginshttps://github.com/justzerock/MoviePilot-Pluginshttps://github.com/Seed680/MoviePilot-Plugins - 配置
115网盘STRM助手。记得选上媒体服务器。
注如果你没改过
docker-composeyaml里的volume mapping的话,这里不需要填写媒体库服务器映射目录#MP映射目录。这里具体什么意思呢?如果你把本地的./video映射为了MP容器里的/video,但是在Emby容器里是例如:./video:/media,那么这里就需要填写了。媒体库服务器映射目录填写/media,MP映射目录填写/video。否则会导致插件刷新媒体库失败。 - 配置
MediaWarp
注注意,这里的端口的意思是你后期进入Emby的实际端口,设置后,访问
http://xxx.xxx.xxx:65042即可进入Emby界面。如果你这里修改为了别的端口,记得同步修改docker-compose.yaml里MP容器部分的port mapping设置。
NPM反代(应该不需要介绍了吧🙃,有点懒,写不动了)
后续使用
至此,配置全部完成。
- 在 MP 中搜索资源,自动下载至本地
./video/downloads,MP检测下载器下载完成,自动推送视频到115网盘,并根据分类自动在网盘创建对应文件夹。 115网盘STRM助手会在本地./video/strm自动创建对应目录,生成strm文件和刮削文件。- 至于
Emby添加媒体库乱七八糟的就不过多赘述了,docker-compose.yaml里的Emby镜像默认是开心版,自带神医插件。(因为我没怎么使用过神医插件,也就不介绍了)
部分内容可能已过时
Lim's Blog