0 問題的提出
0.1 關(guān)于115網(wǎng)盤
本文無意探究115網(wǎng)盤的好壞,也并非是要推崇特定產(chǎn)品,只是提供一套解決方案,其他網(wǎng)盤也可以使用。經(jīng)歷多輪環(huán)境的風(fēng)云變換,115還是活了下來,說明115還是經(jīng)受住了市場的考驗。問題的關(guān)鍵在于115網(wǎng)盤的門檻另很多人望而卻步,小眾帶來的問題便是相關(guān)的配套的生態(tài)不夠完善,很多不錯的插件也已不再更新,相關(guān)的教程少的可憐。
0.2本文的內(nèi)容安排
監(jiān)于網(wǎng)絡(luò)中的各種文章的質(zhì)量良莠不齊,本文將網(wǎng)絡(luò)中的內(nèi)容進(jìn)行了整合,主要內(nèi)容主要包以下幾個方面:
- AList 的安裝與115網(wǎng)盤的掛載
- Aria2 與 AList 的整合
- Rclone的安裝與 AList 掛載
1 安裝AList 的并掛載115網(wǎng)盤
1.1 安裝AList
本文建議手動安裝所有的軟件,原因主要有兩點(diǎn):一是不同軟件間的相互協(xié)作需要在相同的環(huán)境下,如alist
和aria2
,使用docker
會增加配置的難度;二是就個人經(jīng)驗而言docker
十分占用系統(tǒng)資源,增加電腦負(fù)擔(dān)。
安裝alist
參考官網(wǎng)的安裝教程:
- 打開
AList
的發(fā)布頁面AList Release,選擇自己喜歡的AList
版本并復(fù)制下載鏈接 - 下載并安裝
AList
# 進(jìn)入你喜歡的目錄并下載:
cd /your/path/
wget https://github.com/alist-org/alist/releases/download/v3.28.0/alist-darwin-arm64.tar.gz
# 解壓縮:
tar -zxvf alist-xxxx.tar.gz
# 賦其可執(zhí)行權(quán)限:
chmod +x alist
# 啟動服務(wù)
./alist server
# 不同版本設(shè)定管理員隨機(jī)密碼:
# 小于 v3.25.0 版
./alist admin
# 高于 v3.25.0 版
# 設(shè)定隨機(jī)密碼
./alist admin random
# 手動設(shè)定密碼 `NEW_PASSWORD` 改成自己歡的密碼
./alist admin set NEW_PASSWORD
- 配置開機(jī)啟動項
# 編輯配置文件
vi ~/Library/LaunchAgents/ci.nn.alist.plist
- 文件內(nèi)容
- 將
path_alist
改成自己所在的路徑- 將
path/to/working/dir
改為AList
的工作目錄,這兩個內(nèi)容可以相同
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>ci.nn.alist</string>
<key>KeepAlive</key>
<true/>
<key>ProcessType</key>
<string>Background</string>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>path/to/working/dir</string>
<key>ProgramArguments</key>
<array>
<string>path_alist/alist</string>
<string>server</string>
</array>
</dict>
</plist>
- 加載配置項:
launchctl load ~/Library/LaunchAgents/ci.nn.alist.plist
- 啟動
AList
:launchctl start ~/Library/LaunchAgents/ci.nn.alist.plist
- 停止
AList
:launchctl stop ~/Library/LaunchAgents/ci.nn.alist.plist
- 卸載配置項:
launchctl unload ~/Library/LaunchAgents/ci.nn.alist.plist
1.2 掛載115網(wǎng)盤
-
在流瀏器地址欄輸入
http://ip:5244
進(jìn)入AList
首頁,本機(jī)可以直接輸入127.0.0.1:5244
-
進(jìn)入管理界面
-
添加網(wǎng)盤
-
115網(wǎng)盤掛載需要填寫的相關(guān)信息
-
115網(wǎng)盤
Cookie
獲取 -
115網(wǎng)盤
Qrcode token
在此獲取QRCode 掃碼方式登錄 -
115網(wǎng)盤
Root folder id
獲取
2 Aria2 與 AList 的整合
2.1 Aria2 安裝與 RPC 設(shè)置
-
aria2
本文建議直接使用Motix - 獲取
rpc
設(shè)置
2.2 配置 Aria2
- 將
Motrix
中關(guān)于rpc
的信息填入AList
后端 -
AList
前端配置
3 Rclone 與 AList 整合
3.1 Rclone 安裝
- 環(huán)境依賴
Mac
下文件系統(tǒng)支持不全,需要Macfuse
提供第三方文件系的支持
brew install --cask macfuse
- 安裝
rclone
,參考官方教程
sudo -v ; curl https://rclone.org/install.sh | sudo bash
-
brew
安裝的rclone
不具備掛載功能
3.2 掛載 AList
- 在終端中輸入
rclone config
生成`rclone配置文件 -
n
新建一個遠(yuǎn)程鏈接
Current remotes:
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> alist
- 視情況而定選擇
Web Dav
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 Drive
\ (amazon cloud drive)
5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, China Mobile, Cloudflare, GCS, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Leviia, Liara, Lyve Cloud, Minio, Netease, Petabox, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
\ (s3)
6 / Backblaze B2
\ (b2)
7 / Better checksums for other remotes
\ (hasher)
8 / Box
\ (box)
9 / Cache a remote
\ (cache)
10 / Citrix Sharefile
\ (sharefile)
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 / Google Cloud Storage (this is not Google Drive)
\ (google cloud storage)
18 / Google Drive
\ (drive)
19 / Google Photos
\ (google photos)
20 / HTTP
\ (http)
21 / Hadoop distributed file system
\ (hdfs)
22 / HiDrive
\ (hidrive)
23 / In memory object storage system.
\ (memory)
24 / Internet Archive
\ (internetarchive)
25 / Jottacloud
\ (jottacloud)
26 / Koofr, Digi Storage and other Koofr-compatible storage providers
\ (koofr)
27 / Local Disk
\ (local)
28 / Mail.ru Cloud
\ (mailru)
29 / Mega
\ (mega)
30 / Microsoft Azure Blob Storage
\ (azureblob)
31 / Microsoft OneDrive
\ (onedrive)
32 / OpenDrive
\ (opendrive)
33 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
\ (swift)
34 / Oracle Cloud Infrastructure Object Storage
\ (oracleobjectstorage)
35 / Pcloud
\ (pcloud)
36 / PikPak
\ (pikpak)
37 / Proton Drive
\ (protondrive)
38 / Put.io
\ (putio)
39 / QingCloud Object Storage
\ (qingstor)
40 / Quatrix by Maytech
\ (quatrix)
41 / SMB / CIFS
\ (smb)
42 / SSH/SFTP
\ (sftp)
43 / Sia Decentralized Cloud
\ (sia)
44 / Storj Decentralized Cloud Storage
\ (storj)
45 / Sugarsync
\ (sugarsync)
46 / Transparently chunk/split large files
\ (chunker)
47 / Union merges the contents of several upstream fs
\ (union)
48 / Uptobox
\ (uptobox)
49 / WebDAV
\ (webdav)
50 / Yandex Disk
\ (yandex)
51 / Zoho
\ (zoho)
52 / premiumize.me
\ (premiumizeme)
53 / seafile
\ (seafile)
Storage> 49
- 輸入
http://ip:5244/dav
,本機(jī)可輸入http://127.0.0.1:5244/dav
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
- 視情況而定選擇
Other site/service or software
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 / Other site/service or software
\ (other)
vendor> 6
- 輸入
AList
帳戶名
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
- 選擇
y
,輸入兩次密碼
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:
Confirm the password:
password:
- 回車
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>
- 回車
Configuration complete.
Options:
- type: webdav
- url: http://127.0.0.1:5244/dav
- vendor: other
- user: admin
- pass: *** ENCRYPTED ***
Keep this "alist" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
- 選
q
退出
Current remotes:
Name Type
==== ====
alist 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
- 查看連接是否成功
# 查看 alist 掛載的硬盤 <name> 前面設(shè)定的名字
rclone lsd <name>:
# 查看 alist 中的文件
rclone ls <name>:
- 掛載到本地
# 建一個掛載點(diǎn)
mkdir /your/path
# 掛載
rclone mount <DriveName>:<Folder> <LocalFolder> --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --use-mmap
DriverName是你在配置rclone的時候設(shè)置的名字,Folder沒有需要求的話填/即可,LocalFolder是你本地掛載的地址,/tmp比較特殊,上傳時緩存目錄,其他類型掛載一般時不需要這個參數(shù)的,默認(rèn)/tmp地址即可,除非你的系統(tǒng)特殊。
例如:rclone mount alist:/ /webdav --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --use-mmap --daemon
- 解除本地掛載
# 解除本地掛載,后面跟的是掛載的本地目錄
# 當(dāng)自動取消掛載失敗時,也可以這樣手動取消掛載
fusermount -qzu /webdav
3.3 設(shè)置開機(jī)啟動
- 創(chuàng)建
plist
文件
vi ~/Library/LaunchAgents/com.example.mount_rclone.plist
- 填寫以下內(nèi)容
rclone
配置文件的位置為~/.config/rclone/rclone.conf
文章來源:http://www.zghlxwxcb.cn/news/detail-758125.html
<USER>
為Mac
本機(jī)用戶文章來源地址http://www.zghlxwxcb.cn/news/detail-758125.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.example.mount_rclone</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/rclone</string>
<string>mount</string>
<string>--allow-other</string>
<string>--allow-non-empty</string>
<string>--config=/Users/<USER>/.config/rclone/rclone.conf</string>
<string>--copy-links</string>
<string>--no-gzip-encoding</string>
<string>--no-check-certificate</string>
<string>--umask=000</string>
<string>--use-mmap</string>
<string><DriveName>:<Folder></string>
<string><LocalFolder></string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/Users/<USER>/Documents/logs/rclone-mount.log</string>
<key>StandardOutPath</key>
<string>/Users/<USER>/Documents/logs/stdout</string>
</dict>
</plist>
- 加載配置項:
launchctl load ~/Library/LaunchAgents/com.example.mount_rclone.plist
- 啟動
Rclone
:launchctl start ~/Library/LaunchAgents/com.example.mount_rclone.plist
- 停止
Rclone
:launchctl stop ~/Library/LaunchAgents/com.example.mount_rclone.plist
- 卸載配置項:
launchctl unload ~/Library/LaunchAgents/com.example.mount_rclone.plist
- 查掛載結(jié)果
- 下載效果展示
4 其他
4.1 可行的 Rclone 配置命令
- 最簡單的配置
rclone mount alist: /home/alist --allow-other
- 基礎(chǔ)配置
rclone mount DriveName:Folder LocalFolder --cache-dir /tmp --allow-other --vfs-cache-mode writes --allow-non-empty
# 官方命令
rclone mount alist:/ /webdav --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --use-mmap
- 后臺運(yùn)行
rclone mount tianyi:/video /tianyiwebdav –allow-other –vfs-cache-mode writes&
rclone mount tianyi:/video /tianyiwebdav –allow-non-empty –vfs-cache-mode full –vfs-cache-max-size 8G&
# 官方命令
# --daemon 強(qiáng)制后臺模式
rclone mount alist:/ /webdav --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --use-mmap --daemon
- 如果包含阿里云盤,可能需要設(shè)置
--header "Referer:"
參數(shù)
rclone mount 遠(yuǎn)程名稱:/ 本地掛載路徑 --cache-dir /tmp --allow-other --vfs-cache-mode writes --header "Referer:https://www.aliyundrive.com/drive"
rclone mount ali:/ W: --vfs-cache-mode writes --cache-dir E:\aliyun --network-mode --no-check-certificate --default-permissions --header "Referer:https://www.aliyundrive.com/" --vfs-read-chunk-size-limit 1G --vfs-read-chunk-size 64M --dir-cache-time 12h --buffer-size 32M
- 可能會提升流暢度的配置
# --network-mode至關(guān)重要,這個參數(shù)是影響都文件管理器打開掛載目錄的響應(yīng)速度。這個參數(shù)的原意是以網(wǎng)絡(luò)位置掛載即如下圖。如果沒有這個參數(shù),rclone就會掛載到設(shè)備和驅(qū)動器
# --header "Referer:"含阿里云盤時需要,否則掛載后打不開文件
# --buffer-size 512M緩存占用的最大內(nèi)存大小為512M,512可改為其他數(shù)字,不宜設(shè)置得過大,過大會導(dǎo)致文件過多的占用網(wǎng)絡(luò)和電腦內(nèi)存
# --vfs-fast-fingerprint使用快速的文件校驗檢測,加開文件打開速度
.\rclone mount alist: M: --network-mode --header "Referer:" --multi-thread-streams 8 --buffer-size 512M --vfs-fast-fingerprint
4.2 Rclone 啟動腳本
- 如果不想開機(jī)啟動,又不想每次啟動輸入各種參數(shù),可以采用腳本啟動的方式
cd /your/scripts/path
vi mount_rclone.sh
- 將
/path/to/your/mount/point
替換為掛載遠(yuǎn)程存儲的本地路徑,將your_remote_name
替換為rclone
配置文件中設(shè)置的遠(yuǎn)程存儲名稱
#!/bin/bash
RCLONE_CONFIG_PATH=~/.config/rclone/rclone.conf
MOUNT_POINT=/path/to/your/mount/point
REMOTE_NAME=your_remote_name
rclone mount --config $RCLONE_CONFIG_PATH --allow-non-empty --allow-other --vfs-cache-mode writes $REMOTE_NAME: $MOUNT_POINT &
- 設(shè)置執(zhí)行權(quán)限
chmod +x mount_rclone.sh
- 關(guān)于115網(wǎng)盤的下載
115 網(wǎng)盤最令人難以接受的莫過于它的客戶端,要想下載、上傳必須使用其拉跨的客戶端,即使你是尊貴的會員也不例外。如果不相使用其客端也可以使用docker
安裝其Linux
客戶端,將其當(dāng)成下載工具使用。至于類似本文的掛載方式,也可以使用CloudMounter
掛載AList
,還可以使用CloudDrive
直接掛載115網(wǎng)盤,不過這是一個人開發(fā)的工具,似乎并未開源,Rclone
的二次開發(fā)版本也可以直接掛載115網(wǎng)盤。
參考文獻(xiàn)
- AList 手動安裝
- Alist配合aria2 實現(xiàn)離線下載
- MacOS下開啟NTFS讀寫
- MacOS下開啟NTFS讀寫 - FUSE for Mac
- Mac掛載其他文件系統(tǒng)
- rclone和alist掛載網(wǎng)盤到本地
- rclone和alist掛載網(wǎng)盤到本地
- macOS系統(tǒng)下自動掛載rclone遠(yuǎn)程存儲:實現(xiàn)開機(jī)啟動項
- Callumpy/macos-rclone-launchd
- Help setting up rclone.plist on macos Sierra
- Error on MacOS with launchd and default user directories
- 如何在 macOS 使用 AList + RCLONE 把網(wǎng)盤掛載到本地
- 在Linux(Centos)上使用EMBY管理Alist掛載的網(wǎng)盤,以夸克網(wǎng)盤為例
- 用用AALLiisstt掛掛載載天天翼翼云云盤盤來來搭搭建建私私有有的的影影音音庫
- windows使用alist生成各種網(wǎng)盤webdav,掛載到本地硬盤
- 將阿里云盤掛載為Webdav并使用rclone掛載到本地
- MacOS APP無法自啟動,手動添加自啟動APP
- 在群暉(Synology) 中運(yùn)行115網(wǎng)盤Linux版(docker)
- 115網(wǎng)盤Linux版本的Docker封裝
- 基于威聯(lián)通 QNAP 115 + Clouddrive + Plex/Emby 搭建視頻服務(wù)
- 隨時隨地保存115網(wǎng)盤文件到QNAP
- Mac 使用 Docker 部署 Alist 并通過 CloudMounter 本地掛載網(wǎng)盤
- 使用alist將云盤映射為WebDAV
- macOS 如何設(shè)置 AList、RCLONE、xTeVe 開機(jī)啟動后臺運(yùn)行
- Rclone - 設(shè)置谷歌網(wǎng)盤
- 玩轉(zhuǎn)網(wǎng)盤
- 新項目:使用rclone掛載115網(wǎng)盤為webdav或者文件夾
- 群暉搭建AList云盤文件列表,支持掛載本地,各大云盤
- Alist 多網(wǎng)盤掛載目錄程序搭建
到了這里,關(guān)于Mac環(huán)境下Alist+Aria2+Rclone打造網(wǎng)盤下載終極解決方案——以115網(wǎng)盤為例的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!