使用Moviepilot实现115网盘+Emby Strm播放

fclyn 发布于 14 天前 34 次阅读


本文主要内容

使用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 问题。

部署流程

配置容器

基本配置

  1. 创建对应文件夹和文件
    bash

    mkdir -p /docker_data/media && cd docker_data/media && mkdir video

  2. 编辑docker-compose.yaml
    bash

    nano docker-compose.yaml

    yaml

    services:
    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-stopped

    emby:
    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: true

    moviepilotv2:
    #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:
    - clash

    clash:
    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容器。

  3. 编辑Dockerfile.mpentrypoint-wrapper.shproxychains.conf
    bash

    nano Dockerfile.mp

    Dockerfile

    FROM 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"]

    bash

    nano entrypoint-wrapper.sh

    sh

    #!/bin/sh
    # 使用 proxychains4 执行原始的 /entrypoint.sh 脚本,并传递所有参数
    exec proxychains4 /entrypoint.sh "$@"

    bash

    nano proxychains.conf

    conf

    # /etc/proxychains.conf
    strict_chain
    proxy_dns

    localnet 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

  4. 配置clash
    bash

    mkdir clash && nano ./clash/config.yaml

    yaml

    mixed-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

  5. 启动服务
    bash

    docker compose up -d

 

配置Qbit

  1. 进入WEBUI界面,如图进行配置6849b0afbaa1a

配置MP

基本配置

  1. 配置下载器。请一定记得打开自动分类管理顺序下载684abb66aee0b
  2. 配置媒体服务器,存储&目录684abd1dda437684ac4747bb6c登录完成显示容量后再进行下一步目录配置。自动整理请一定记得改为下载器监控模式。684ac53778f66

插件配置

  1. 配置插件源。如图复制粘贴。确认后,等待一会,然后搜索插件115网盘STRM助手MediaWarp这两个插件,安装即可。684ace64695a1

    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

  2. 配置115网盘STRM助手。记得选上媒体服务器。684ac5ff0719c684ac6c26e856

    如果你没改过docker-composeyaml里的volume mapping的话,这里不需要填写媒体库服务器映射目录MP映射目录。这里具体什么意思呢?如果你把本地的./video映射为了MP容器里的/video,但是在Emby容器里是例如:./video:/media,那么这里就需要填写了。媒体库服务器映射目录填写/mediaMP映射目录填写/video。否则会导致插件刷新媒体库失败。

  3. 配置MediaWarp684ac8fb12858

    注意,这里的端口的意思是你后期进入Emby的实际端口,设置后,访问http://xxx.xxx.xxx:65042即可进入Emby界面。如果你这里修改为了别的端口,记得同步修改docker-compose.yamlMP容器部分的port mapping设置。

NPM反代(应该不需要介绍了吧🙃,有点懒,写不动了)

后续使用

至此,配置全部完成。

  • 在 MP 中搜索资源,自动下载至本地 ./video/downloadsMP检测下载器下载完成,自动推送视频到115网盘,并根据分类自动在网盘创建对应文件夹。
  • 115网盘STRM助手会在本地./video/strm自动创建对应目录,生成strm文件和刮削文件。
  • 至于Emby添加媒体库乱七八糟的就不过多赘述了,docker-compose.yaml里的Emby镜像默认是开心版,自带神医插件。(因为我没怎么使用过神医插件,也就不介绍了)
此作者没有提供个人介绍。
最后更新于 2025-08-23