115 + alist + rclone 实现 emby 直链播放

前言

  1. 通过 alist 将 115 网盘资源转成可以通过网络编辑和管理 webdav 协议。
  2. 通过 rclone 将 webdav 协议的资源挂载到本地硬盘
  3. embyserver 读取、刮削、入库 「2」 挂载好的资源
  4. 安装 nginx 实现对访问 embyserver 的流量进行转发、重写。将: 静态资源转发到 embyserver 服务上,视频资源的访问直接转发到 alist,从而利用 alist 的 302 转发实现直接访问网盘资源。(如图,少走了 alist -> webdav -> rclone -> emby 的过程,实现不走主机流量,直连网盘)

教程

1、安装list

看官方文档:https://alist.nn.ci/zh/guide/install/script.html,不做赘述

2、添加115网盘

看官方文档:https://alist.nn.ci/zh/guide/drivers/115.html ,不做赘述

3、rclone 挂载115网盘

root@localhost:~# rclone config
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n

Enter name for new remote.
name> 115pan

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Outscale, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, Selectel, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
   \ (s3)
 5 / Backblaze B2
   \ (b2)
 6 / Better checksums for other remotes
   \ (hasher)
 7 / Box
   \ (box)
 8 / Cache a remote
   \ (cache)
 9 / Citrix Sharefile
   \ (sharefile)
10 / Cloudinary
   \ (cloudinary)
11 / Combine several remotes into one
   \ (combine)
12 / Compress a remote
   \ (compress)
13 / Dropbox
   \ (dropbox)
14 / Encrypt/Decrypt a remote
   \ (crypt)
15 / Enterprise File Fabric
   \ (filefabric)
16 / FTP
   \ (ftp)
17 / Files.com
   \ (filescom)
18 / Gofile
   \ (gofile)
19 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
20 / Google Drive
   \ (drive)
21 / Google Photos
   \ (google photos)
22 / HTTP
   \ (http)
23 / Hadoop distributed file system
   \ (hdfs)
24 / HiDrive
   \ (hidrive)
25 / ImageKit.io
   \ (imagekit)
26 / In memory object storage system.
   \ (memory)
27 / Internet Archive
   \ (internetarchive)
28 / Jottacloud
   \ (jottacloud)
29 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
30 / Linkbox
   \ (linkbox)
31 / Local Disk
   \ (local)
32 / Mail.ru Cloud
   \ (mailru)
33 / Mega
   \ (mega)
34 / Microsoft Azure Blob Storage
   \ (azureblob)
35 / Microsoft Azure Files
   \ (azurefiles)
36 / Microsoft OneDrive
   \ (onedrive)
37 / OpenDrive
   \ (opendrive)
38 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
   \ (swift)
39 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
40 / Pcloud
   \ (pcloud)
41 / PikPak
   \ (pikpak)
42 / Pixeldrain Filesystem
   \ (pixeldrain)
43 / Proton Drive
   \ (protondrive)
44 / Put.io
   \ (putio)
45 / QingCloud Object Storage
   \ (qingstor)
46 / Quatrix by Maytech
   \ (quatrix)
47 / SMB / CIFS
   \ (smb)
48 / SSH/SFTP
   \ (sftp)
49 / Sia Decentralized Cloud
   \ (sia)
50 / Storj Decentralized Cloud Storage
   \ (storj)
51 / Sugarsync
   \ (sugarsync)
52 / Transparently chunk/split large files
   \ (chunker)
53 / Uloz.to
   \ (ulozto)
54 / Union merges the contents of several upstream fs
   \ (union)
55 / Uptobox
   \ (uptobox)
56 / WebDAV
   \ (webdav)
57 / Yandex Disk
   \ (yandex)
58 / Zoho
   \ (zoho)
59 / iCloud Drive
   \ (iclouddrive)
60 / premiumize.me
   \ (premiumizeme)
61 / seafile
   \ (seafile)
Storage> 56

Option url.
URL of http host to connect to.
E.g. https://example.com.
Enter a value.
url> http://127.0.0.1:5244/dav/

Option vendor.
Name of the WebDAV site/service/software you are using.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
 1 / Fastmail Files
   \ (fastmail)
 2 / Nextcloud
   \ (nextcloud)
 3 / Owncloud
   \ (owncloud)
 4 / Sharepoint Online, authenticated by Microsoft account
   \ (sharepoint)
 5 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
   \ (sharepoint-ntlm)
 6 / rclone WebDAV server to serve a remote over HTTP via the WebDAV protocol
   \ (rclone)
 7 / Other site/service or software
   \ (other)
vendor> 7

Option user.
User name.
In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a value. Press Enter to leave empty.
user> admin

Option pass.
Password.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y
Enter the password:
password: 输入alist管理员登录密码
Confirm the password:
password: 重复输入alist管理员登录密码

Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a value. Press Enter to leave empty.
bearer_token>  跳过

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Configuration complete.
Options:
- type: webdav
- url: http://127.0.0.1:5244/dav/
- vendor: other
- user: admin
- pass: *** ENCRYPTED ***
Keep this "115pan" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

Current remotes:

Name                 Type
====                 ====
115pan               webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

4、配置emby直链播放

详细见:https://www.886699.xyz/4607.html

By 行政