把主流网盘挂载为本地磁盘 给电脑增加几十T存储容量

126次阅读
一条评论

共计 5691 个字符,预计需要花费 15 分钟才能阅读完成。

提醒:本文最后更新于 2025-08-31 23:27,文中所关联的信息可能已发生改变,请知悉!

把网盘挂载在本地,可以有效缓解本地存储紧张问题,给电脑增加几 T,甚至几十 T 的存储容量!鉴于国内网盘种类繁多,有没有一套方案可以一次性挂载所有网盘?答案是肯定的,话不多说,开始教程!

免费工具

  1. alist Github 地址 官方网址(有详细使用说明,常规设置、添加网盘等等)
  2. rclone Github 地址
  3. winfsp Github 地址

第一步 安装配置 alist

免费开源的文件管理系统,棉袄之前的教程里有讲过,它可以把你所有的网盘整合在一起,并且以 Web 的形式进行管理。首先,根据自己的系统,在 Github 上下载 alist 对应版本程序,程序下载好后,解压在文件夹。然后,进入解压后的程序文件夹,在路径地址栏输入 cmd 打开控制台,在控制台窗口输入命令:alist server,弹出视频中文本,就说明 alist 正常启动了,切记这个窗口不能关闭!接着,打开浏览器,输入地址 127.0.0.1:5244 并访问,登录界面,输入用户名及密码登录,这些信息可以在控制台查看!成功登录后,点击页面下方管理,打开 alist 管理页面。最后,开始配置 alist,管理页面,依次点击存储 - 添加,添加网盘页面,驱动选项下拉可选择要添加的网盘,几乎主流网盘和存储,alist 几乎都支持。棉袄这里以 123 云盘为例,挂载路径,随便填写,便于你区分不同网盘即可;用户名和密码,填写你 123 云盘的,其他选项都默认就行,点击添加,完成网盘添加,至此,123 云盘就添加完成了!其他网盘的添加方式,可以看官方文档!回到 alist 主页,就可以查看编辑我们 123 云盘里的文件了!

第二步 安装 winfsp

Windows 平台下的文件系统代理软件。访问 winfsp 项目地址,下载程序安装包。安装包下载好后,直接双击安装,参数都默认就执行下一步操作,直至安装完成!

第三步 安装配置 rclone

免费开源网盘存储挂载程序。首先,访问 rclone 开源项目地址,根据自己的系统,下载对应程序安装包,程序下载好后,解压在文件夹。然后,进入解压后的程序文件夹,在路径地址栏输入 cmd 打开控制台,在控制台窗口输入命令:rclone config,以运行 rclone 配置。

Microsoft Windows [版本 10.0.22621.1485]
(c) Microsoft Corporation。保留所有权利。C:\rclone>rclone config
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n                                  // 输入 n 并回车确认,新建一个挂载配置;Enter name for new remote.
name> 123YUN                              // 给挂载配置命名,这个随意,也就是你成功挂载后硬盘名称;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, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Liara, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, 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, Memset Memstore, OVH)
   \ (swift)
34 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
35 / Pcloud
   \ (pcloud)
36 / Put.io
   \ (putio)
37 / QingCloud Object Storage
   \ (qingstor)
38 / SMB / CIFS
   \ (smb)
39 / SSH/SFTP
   \ (sftp)
40 / Sia Decentralized Cloud
   \ (sia)
41 / Storj Decentralized Cloud Storage
   \ (storj)
42 / Sugarsync
   \ (sugarsync)
43 / Transparently chunk/split large files
   \ (chunker)
44 / Union merges the contents of several upstream fs
   \ (union)
45 / Uptobox
   \ (uptobox)
46 / WebDAV
   \ (webdav)
47 / Yandex Disk
   \ (yandex)
48 / Zoho
   \ (zoho)
49 / premiumize.me
   \ (premiumizeme)
50 / seafile
   \ (seafile)
Storage> 46                                // 挂载的类型,以 WebDAV 形式挂载,所以输入 46 并回车确认;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             //WebDAV 地址,也就是 alist 的地址,在地址后加上一个 /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 / Nextcloud
   \ (nextcloud)
 2 / Owncloud
   \ (owncloud)
 3 / Sharepoint Online, authenticated by Microsoft account
   \ (sharepoint)
 4 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
   \ (sharepoint-ntlm)
 5 / Other site/service or software
   \ (other)
vendor> 5                                  // 这个不用理会什么意思,直接输入 5 回车确认;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                                //WebDAV 用户名,也就是 alist 的用户名,默认就是 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                                   // 选项输入 y 并回车确认;Enter the password:
password:                                  // 输入 WebDAV 密码,同样是 alist 密码;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> n                                     // 直接回车确认;Configuration complete.
Options:
- type: webdav
- url: http://127.0.0.1:5244/dav/123%E7%BD%91%E7%9B%98
- vendor: other
- user: admin
- pass: *** ENCRYPTED ***
Keep this "123YUN" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>                                     // 直接回车确认;Current remotes:

Name                 Type
====                 ====
123YUN               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                           // 输入 q 回车退出;C:\rclone>

至此,rclone 的配置工作就完成了!最后,在控制台输入如下代码,挂载刚才配置的 WebDAV,alist 为刚才我们配置的 WebDAV,W 为挂载后的盘符,回车后,打开资源管理器,就看见网盘已经挂载好了!

第四步 设置开机启动

虽然我们配置好了 alist 和 rclone,但是,每次开机,我们还需要手动启动 alist 和 rclone,况且控制台窗口也不能关闭,着实有点麻烦和碍眼!其实,我们可以通过 Windows 的批处,理来实现 alist 和 rclone 隐藏开机启动!咱们先给 alist 配置开机启动,在 alist 主文件夹下,新建文本文档,在文本文档中输入如下代码。

@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
.\alist server

前四段代码为隐藏控制台窗口,最后一段代码为 alist 启动命令,编辑好代码后,依次点击文件 - 另存为,保存类型选择全部,名称随意,后缀一定要是.bat,保存路径也一定在程序主目录下,关闭文本窗口,回到 alist 主目录,给你刚才创建的 bat 文件创建快捷方式备用!Win+ R 打开运行,输入 shell:startup 回车打开系统启动文件夹,将刚才创建好的 bat 快捷方式,拖放到此文件夹,至此,alist 隐藏开机启动就设置完成!咱们重启测试下,电脑重启好了,浏览器输入 alist 地址看下,可以正常访问 alist 了,而且也没有任何控制台窗口,证明我们这个隐藏启动 alist 的设置是成功的!

举一反三,在 rclone 主目录下,创建个文本文档,前四段代码直接复制过来就行,然后添加上 rclone 的挂载命令,其他和 alist 的相同!rclone 的开机启动也设置好了,咱们再重启下电脑,测试下,可以正常挂载网盘不!电脑启动好了,打开资源管理器,可以看见网盘已经正常挂载了,操作编辑也没有问题了!

@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
.\rclone mount Alist:/ W: --vfs-cache-mode full

以上,就是棉袄关于主流网盘挂载的教程,理论上,只要 alist 支持的网盘和存储,都可以挂载在本地,告别电脑存储紧张的同时,也能解锁更多网盘的新奇玩法!教程中的的工具及代码,可以在棉袄的博客中获取,也可以评论区留言或者私信棉袄!谢谢观看!

正文完
 0
鼠标
版权声明:本站原创文章,由 鼠标 于2023-04-24发表,共计5691字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(一条评论)
helipengye 评论达人 LV.1
2023-06-04 02:41:50 回复

按你的方法挂载成功了,但无法打开挂载盘里边的txt文件,新建的文件是可以正常用,也会自动保存到网盘

     中国湖南省长沙市电信