前言

alist地址

AList是一款支持多种网络存储、挂载本地存储、阿里云盘、百度网盘、OneDrive、Google Drive 等,支持网页浏览和WebDAV 的文件列表程序。简单的来说就是能够管理各种网盘的应用,AList除了支持网盘存储之外,还支持对象存储,本地存储,FTP等等。

挂载到本地

Windows: RaiDrive/Rclone + PotPlayer

Linux: Rclone

Android: AListFlutter + Reex

rclone

配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# 进入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

# 设置名字
name> alist
Type of storage to configure.
Choose a number from below, or type in your own value
[snip]
XX / WebDAV
\ "webdav"
[snip]
Storage> webdav #这里输入webdav,也可以选择有个webdav的字段XX

# 设置远程地址url http://your_alist_ip:port/dav
URL of http host to connect to
Choose a number from below, or type in your own value
1 / Connect to example.com
\ "https://example.com"
url> http://127.0.0.1:5244/dav #这里设置alist的地址和端口,后面要带dav

# 选择other
Name of the WebDAV site/service/software you are using
Choose a number from below, or type in your own value
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

# 设置远程账号
User name
user> admin #alist的账号
# 设置远程密码
Password.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank
y/g/n> y #这里输入y
Enter the password: #alist密码,密码是看不到的
password:
Confirm the password: #再次输入密码
password:

# 直接回车即可
Bearer token instead of user/pass (e.g. a Macaroon)
bearer_token>

# 默认还是高级
Edit advanced config?
y) Yes
n) No (default)
y/n> n #选择n

#后面的回车即可
# 你的远程信息
--------------------
[remote]
type = webdav
url = http://127.0.0.1:5244/dav/
vendor = Other
user = admin
pass = *** ENCRYPTED ***
--------------------
# 确认
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y #输入y即可,
# 最后按q退出设置

rclone ls alist: 查看是否成功

为防止上传失败,我们需要禁用超时 ,vim /home/username/.config/rclone/rclone.conf 添加:

1
2
3
# 这设置了IO空闲超时。 如果一个传输已经开始,但在这个时间段内处于空闲状态,将被视为中断并断开连接。
# 默认是5m。 设置为 "0 "表示禁用。
timeout = 0

命令语法:

1
2
3
rclone [功能选项] <本地路径> <网盘名称:路径> [参数] [参数] ...
rclone [功能选项] <网盘名称:路径> <本地路径> [参数] [参数] ...
rclone [功能选项] <网盘名称:路径> <网盘名称:路径> [参数] [参数] ...

常用功能

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
rclone copy - 复制
rclone move - 移动,如果要在移动后删除空源目录,请加上 --delete-empty-src-dirs 参数
rclone sync - 同步:将源目录同步到目标目录,只更改目标目录。
rclone size - 查看网盘文件占用大小。
rclone delete - 删除路径下的文件内容。
rclone purge - 删除路径及其所有文件内容。
rclone mkdir - 创建目录。
rclone rmdir - 删除目录。
rclone rmdirs - 删除指定灵境下的空目录。如果加上 --leave-root 参数,则不会删除根目录。
rclone check - 检查源和目的地址数据是否匹配。
rclone ls - 列出指定路径下的所有的文件以及文件大小和路径。
rclone lsl - 比上面多一个显示上传时间。
rclone lsd 列出指定路径下的目录
rclone lsf - 列出指定路径下的目录和文件

-P 或 --progress:这个选项用于在过程中显示进度条。

添加SMB

注意,分享名称为分享文件夹的名称