Rclone maigsik 本地音乐

Posted on Wed, Nov 30, 2022 Web

配置的内容:

test tets

PS E:\Dev\rclone-v1.62.2-windows-amd64> .\rclone authorize "onedrive" "6cxxxoqMTDWnJtWbqE"
2023/03/22 12:18:45 NOTICE: Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config.
2023/03/22 12:18:45 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=h-IKR1LgmsDyQUd_tz2x-Q
2023/03/22 12:18:45 NOTICE: Log in and authorize rclone for access
2023/03/22 12:18:45 NOTICE: Waiting for code...
2023/03/22 12:18:49 NOTICE: Got code
Paste the following into your remote machine --->
 {"access_token":"","expiry":"2023-03-22T12:40:42.6524031+08:00"}
PS E:\Dev\rclone-v1.62.2-windows-amd64> .\rclone config
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

Enter name for new remote.
name> OneMusic

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> 31

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id> 6c1a28xxxxe0

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret> WVQxxxxxzoqMTDWnJtWbqE

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region> 1

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

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> n

Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
        rclone authorize "onedrive" "eyJjbGllxxUxxbkp0V2JxRSJ9"
Then paste the result.
Enter a value.
config_token>    {"access_token":"","expiry":"2023-03-22T12:40:42.6524031+08:00"}
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 1

Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (b!v83P4RgYYEWmnzOjKs3kRyJ-nHD7OyRIu8y4erYw7RmUsMPzXJQ-RZfn26kOtqlo).
 1 / OneDrive (business)
   \ (b!v83P4RgYYEWmnzOjKs3kRyJ-nHD7OyRIu8y4erYw7RmUsMPzXJQ-RZfn26kOtqlo)
config_driveid> 1

Drive OK?

Found drive "root" of type "business"
URL: https://mdx-my.sharxxxxsoft_com/Documents

y) Yes (default)
n) No
y/n> 1
This value must be one of the following characters: y, n.
y/n> y

Configuration complete.
Options:
- type: onedrive
- client_id: 6c1a285d-4fexxxxxx4109a6e0
- client_secret: WVQ8Q~UAksxxxxxxqMTDWnJtWbqE
- token: {"access_token":"","expiry":"2023-03-22T12:40:42.6524031+08:00"}
- drive_id: b!v83P4RgYYEWmnzOjKs3kRxxxxxxsMPzXJQ-RZfn26kOtqlo
- drive_type: business
Keep this "OneMusic" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

Current remotes:

Name                 Type
====                 ====
OneMusic             onedrive

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>

导出rclone.conf

path:C:\Users\Shaox\AppData\Roaming\rclone

其中我是配置Onedrive,访问速度看个人。

其中 .param的配置文件可以参看官方

我的配置global.param

NETCHK_ADDR=baidu.com
CACHEMODE=minimal
BINDSD=1
DIRCACHETIME=30m0s
ADD_PARAMS=--vfs-cache-max-size '2G' 
--fast-list --allow-non-empty 
--attr-timeout '30s' 
--use-mmap --no-modtime --uid '0' --gid '1015' 
--dir-perms '0775' --file-perms '0644'
 --umask '002' 
HTTP=0FTP=0
Rclone

Rclone syncs your files to cloud storage: Google Drive, S3, Swift, Dropbox, Google Cloud Storage, Azure, Box and many more.

可以查看VFS了解详细参数的配置