本文主要内容
使用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 问题。
部署流程
配置容器
基本配置
- 创建对应文件夹和文件
bash
mkdir -p /docker_data/media && cd docker_data/media && mkdir video
- 编辑
docker-compose.yaml
bashnano docker-compose.yaml
yamlservices:
qbit:
image: linuxserver/qbittorrent:4.6.5
container_name: qbit
network_mode: bridge
environment:
- 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:32156
restart: unless-stoppedemby:
image: amilys/embyserver:latest
container_name: emby
network_mode: bridge
restart: unless-stopped
ports:
- 65037:8096
- 65038:8920
- 65039:7359/udp
- 65040:1900/udp
volumes:
- ./emby:/config
- ./video:/video # 同Qbit媒体目录。若上面修改,这里请同步修改
environment:
- PUID=0
- PGID=0
- GIDLIST=0
- TZ=Asia/Shanghai
- EMBY_PublishedServerUrl=xxx.xxx.xxx.xxx # 修改你成本地IPV4
privileged: truemoviepilotv2:
#image: jxxghp/moviepilot-v2:latest
build:
context: .
dockerfile: Dockerfile.mp # 解决海外VPS无法访问webapi.115.com问题,重新打包一下镜像
restart: always
stdin_open: true
tty: true
container_name: moviepilot-v2
hostname: moviepilot-v2
network_mode: bridge
ports:
- 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/clash
network_mode: bridge
restart: always
volumes:
- ./clash:/root/.config/clash
container_name: clash
ports:
# 主机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.conf
bashnano Dockerfile.mp
DockerfileFROM jxxghp/moviepilot-v2:latest
# 切换到 root 用户以安装软件包
USER root# 更新包列表并安装 proxychains-ng
# jxxghp/moviepilot-v2 通常基于 Debian/Ubuntu
RUN apt-get update && \
apt-get install -y proxychains-ng && \
rm -rf /var/lib/apt/lists/*# 复制包装器脚本到镜像中
COPY entrypoint-wrapper.sh /entrypoint-wrapper.sh
RUN chmod +x /entrypoint-wrapper.sh# 使用包装器脚本作为新的入口点
# 原镜像的 ENTRYPOINT 是 ["/entrypoint.sh"]
# 我们用 proxychains4 来执行它
ENTRYPOINT ["/entrypoint-wrapper.sh"]
bashnano entrypoint-wrapper.sh
sh
# 使用 proxychains4 执行原始的 /entrypoint.sh 脚本,并传递所有参数
exec proxychains4 /entrypoint.sh "$@"
bashnano proxychains.conf
conf# /etc/proxychains.conf
strict_chain
proxy_dnslocalnet 127.0.0.0/8
localnet 172.16.0.0/12
localnet 10.0.0.0/8 # 改为你本地的IPV4 CIDR[ProxyList]
http 172.17.0.1 7890
- 配置
clash
bashmkdir clash && nano ./clash/config.yaml
yamlmixed-port: 7890
allow-lan: true
mode: Rule
log-level: info
#external-ui: dashboard
external-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: PROXY
type: select
proxies:
- test
rules:
- DOMAIN-KEYWORD,115.com,PROXY
- MATCH,DIRECT
- 启动服务
bash
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-Plugins
https://github.com/madrays/MoviePilot-Plugins
https://github.com/aClarkChen/MoviePilot-Plugins
https://github.com/justzerock/MoviePilot-Plugins
https://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
镜像默认是开心版,自带神医插件。(因为我没怎么使用过神医插件,也就不介绍了)
Comments NOTHING