在Windows平台下使用 OpenList+Rclone 进行网盘挂载
下载amd64 版本所在文件夹运行 cmd——openlist server运行成功,用生成的密码登录在网页进行设置参考文档用户名为 admin。
·
OpenList
下载 https://github.com/OpenListTeam/OpenList/releases
amd64 版本
所在文件夹运行 cmd——openlist server
运行成功,用生成的密码登录在网页 http://127.0.0.1:5244 进行设置
参考文档https://doc.oplist.org/guide
用户名为 admin
Rclone
下载 https://github.com/rclone/rclone/releases
amd64 版本
所在文件夹运行 cmd——rclone config
运行成功,进行设置
WebDav 配置
可查看参考官方文档
1.进入设置
rclone config
2.新建
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
3.输入名称
Enter name for new remote.
name> webdav名称
4.选择类型
Choose a number from below, or type in your own value.
Storage> webdav的数字
5.输入URL地址(Openlist的地址)
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
6.vendor
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.
vendor> Other site的数字
7.设置用户名(Openlist的用户名)
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
8.设置密码(Openlist的密码)
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
输入两次密码
9.bearer_token
Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a value. Press Enter to leave empty.
bearer_token>
10.高级设置
Edit advanced config?
y) Yes
n) No (default)
y/n>
11.保存配置
Keep this "网盘名称" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
配置文件可在以下目录找到
C:\Users\用户名\AppData\Roaming\rclone\rclone.conf
也可尝试直接文件配置,在配置文件直接配置为
[ webdav名称 ]
type = webdav
url = http://127.0.0.1:5244/dav
vendor = other
user = admin
pass = 密码为openlist登录密码,但已加密,或许需要重新修改密码
挂载相关
需下载 winfsp
https://github.com/winfsp/winfsp/releases
挂载参数
rclone mount 挂载名称 : 挂载盘符 : --network-mode --header "Referer:https://pan.baidu.com/" --header "User-Agent:pan.baidu.com" --file-perms 0777 --vfs-cache-mode full --vfs-fast-fingerprint --vfs-cache-max-size 10G --vfs-cache-max-age 168h --vfs-read-ahead 1G --buffer-size 512M --multi-thread-streams 4 --dir-cache-time 45s --log-level ERROR --cache-dir E:\RcloneCache
挂载示例
rclone mount OpenList网盘: Z: --network-mode --header "Referer:https://pan.baidu.com/" --header "User-Agent:pan.baidu.com" --file-perms 0777 --vfs-cache-mode full --vfs-fast-fingerprint --vfs-cache-max-size 10G --vfs-cache-max-age 168h --vfs-read-ahead 1G --buffer-size 512M --multi-thread-streams 32 --dir-cache-time 45s --log-level ERROR --cache-dir E:\RcloneCache
参数 | 说明 |
---|---|
–rc | 远程控制用 开启远程控制,用于刷新缓存 |
–rc-addr = localhost: 0 | 远程控制用 远程控制地址,默认 localhost: 5572,0 自动选择端口 |
–rc-no-auth | 远程控制用 不需要身份验证 |
–network-mode | 使用网络挂载模式,而非 FUSE(适用于 Windows,避免文件锁问题或系统兼容问题)。这个选项使用 WinFsp 提供的网络驱动方式。 |
–header “Referer:” --header “Referer: https://pan.baidu.com/” --header “User-Agent: pan.baidu.com” | 添加一个 HTTP 头,值为空。 由于百度网盘 API 的限制,下载大于 20M 左右的文件需要携带 header:“User-Agent”: “pan.baidu.com” |
–file-perms 0777 | 设置文件权限为rwxrwxrwx ,即所有人可读写执行(主要对 Linux 有效,Windows 下效果有限)。 |
–vfs-cache-mode full | 使用完整的 VFS 缓存模式,读写都走本地缓存。优点是兼容性最高,能避免很多读写问题。缺点是磁盘空间占用高、延迟略高。 |
–vfs-fast-fingerprint | 启用快速指纹匹配算法,提高缓存一致性检查速度。这个参数适用于避免不必要的缓存命中错误(尤其在不支持 modtime 的云盘上)。 |
–vfs-cache-max-size 10G | 本地缓存大小上限 |
–vfs-cache-max-age 168h | 缓存文件最大保留时间 |
–vfs-read-ahead 1G | 预读,磁盘中缓存 |
–buffer-size 512M | 为每个文件分配的缓冲区容量,默认是 16M。缓冲区越大,读写性能越好,但占用内存越多。是在内存中缓冲,视频播放推荐至少 128M~512M。使用full 模式时,建议不要将–buffer-size 设置得太大,如果需要,可以将–vfs-read-ahead 设置得大一些 |
–multi-thread-streams 4 | 使用多线程下载一个大文件,加快读取速度。数字为线程数,适合看大视频或读取大文件。 |
–dir-cache-time 45s | 目录缓存保留时间,减少频繁 API 请求,提高响应速度 |
–no-modtime | 忽略云端文件的修改时间(modtime)。对于不支持精确修改时间的远程(例如阿里云盘、OneDrive),要及时查看更改信息可以不加 |
–log-level ERROR | 输出日志信息 |
–cache-dir E:\RcloneCache | 自定义指定缓存位置 |
OpenList+Rclone 开机启动脚本
进入开机启动文件夹
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
或者
“Win+R” 输入 “shell: startup” 命令(会换成另一个目录)
创建 OPRMRun.vbs 文件
脚本参数设置
Dim ws
Set ws = CreateObject("Wscript.Shell")
ws.run " Openlist目录 server",vbhide
WScript.Sleep(2000)
ws.run " RMount单独挂载命令bat ",vbhide
WScript.Sleep(5000)
WScript.quit
脚本示例
Dim ws
Set ws = CreateObject("Wscript.Shell")
ws.run "D:\Software\OpenList\openlist.exe server",vbhide
WScript.Sleep(2000)
ws.run "D:\Software\OpenList\RMount.bat",vbhide
WScript.Sleep(5000)
WScript.quit
RMount.bat
@echo off
::解决中文乱码问题——字符集UTF-8
chcp 65001
cmd /c "D:\Software\Rclone\rclone-v1.70.3-windows-amd64\rclone.exe mount OpenList网盘: Z: --network-mode --header "Referer:https://pan.baidu.com/" --header "User-Agent:pan.baidu.com" --file-perms 0777 --vfs-cache-mode full --vfs-fast-fingerprint --vfs-cache-max-size 10G --vfs-cache-max-age 168h --vfs-read-ahead 1G --buffer-size 512M --multi-thread-streams 32 --dir-cache-time 45s --log-level ERROR --cache-dir E:\RcloneCache"
pause
更多推荐
所有评论(0)