2020年7月

Google 虽然是大厂,但是数据只有一份,还是怕怕,多一个备份不是坏事。苹果 iCloud 不错,但是贼贵,况且我只有一个进过水的 SE……

那就 OneDrive 吧,Office 365 就有 1T,前阵子在老司机群看到博友合租 Office 365 家庭套餐,还挺划算的,于是就上车了。

1.1 rclone 安装
执行命令:curl https://rclone.org/install.sh | sudo bash

1.2 连接网盘
连接 Google Drive,执行命令进入配置菜单:rclone config

1.3 初次进入会有如下菜单提示:

#~:rclone config
No remotes found - make a new one
n) New remote -> 连接新远程网盘
s) Set configuration password -> 设置密码保护配置信息
q) Quit config -> 退出
n/s/q>

1.4 需要加密码保护配置信息就按 s 进入设置密码,若不需要,按 n 进入连接网盘。

n/s/q> n
name> gdrive -> 网盘名字,写一个方便自己识别的名字就好
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Alias for a existing remote
   \ "alias"
 2 / Amazon Drive
   \ "amazon cloud drive"
 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
   \ "s3"
 4 / Backblaze B2
   \ "b2"
 5 / Box
   \ "box"
 6 / Cache a remote
   \ "cache"
 7 / Dropbox
   \ "dropbox"
 8 / Encrypt/Decrypt a remote
   \ "crypt"
 9 / FTP Connection
   \ "ftp"
10 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
11 / Google Drive
   \ "drive"
12 / Hubic
   \ "hubic"
13 / JottaCloud
   \ "jottacloud"
14 / Local Disk
   \ "local"
15 / Mega
   \ "mega"
16 / Microsoft Azure Blob Storage
   \ "azureblob"
17 / Microsoft OneDrive
   \ "onedrive"
18 / OpenDrive
   \ "opendrive"
19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
20 / Pcloud
   \ "pcloud"
21 / QingCloud Object Storage
   \ "qingstor"
22 / SSH/SFTP Connection
   \ "sftp"
23 / Webdav
   \ "webdav"
24 / Yandex Disk
   \ "yandex"
25 / http Connection
   \ "http"
Storage> 11 -> 11 是 Google Drive
Google Application Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> -> 留空,按回车下一步就好
Google Application Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> -> 留空,按回车下一步就好
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope> 2 -> 1 是拥有所有权限,包括删除;2 是只能访问所有文件,不能删除,按需要选择吧
ID of the root folder
Leave blank normally.
Fill in to access "Computers" folders. (see docs).
Enter a string value. Press Enter for the default ("").
root_folder_id> -> 留空,按回车下一步就好
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default ("").
service_account_file> -> 留空,按回车下一步就好
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n -> 一般不需要高级设置,选择 n 就好
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine or Y didn't work
y) Yes
n) No
y/n> n -> 如果是在 VPS 上连接,选 n 吧
If your browser doesn't open automatically go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=**************************************
Log in and authorize rclone for access
Enter verification code> **************zN5****vd5*******************bwZethESs
Configure this as a team drive?
y) Yes
n) No
y/n> n
--------------------
[remote]
client_id = 
client_secret = 
scope = drive
root_folder_id = 
service_account_file =
token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2018-09-16T13:57:58.955387075Z"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y

1.5 Google Drive 连接完成,可以执行命令检查一下是否真的能连接上:

#列出顶级文件夹,(gdrive 是前面第一步设置的名字,如果配置设置了密码会提示输入密码)
rclone lsd gdrive:

#列出所有文件
rclone ls gdrive:

1.6 连接 OneDrive,方法类似,命令进入配置:rclone config

#~:rclone config
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> onedrive
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Alias for a existing remote
   \ "alias"
 2 / Amazon Drive
   \ "amazon cloud drive"
 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
   \ "s3"
 4 / Backblaze B2
   \ "b2"
 5 / Box
   \ "box"
 6 / Cache a remote
   \ "cache"
 7 / Dropbox
   \ "dropbox"
 8 / Encrypt/Decrypt a remote
   \ "crypt"
 9 / FTP Connection
   \ "ftp"
10 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
11 / Google Drive
   \ "drive"
12 / Hubic
   \ "hubic"
13 / JottaCloud
   \ "jottacloud"
14 / Local Disk
   \ "local"
15 / Mega
   \ "mega"
16 / Microsoft Azure Blob Storage
   \ "azureblob"
17 / Microsoft OneDrive
   \ "onedrive"
18 / OpenDrive
   \ "opendrive"
19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
20 / Pcloud
   \ "pcloud"
21 / QingCloud Object Storage
   \ "qingstor"
22 / SSH/SFTP Connection
   \ "sftp"
23 / Webdav
   \ "webdav"
24 / Yandex Disk
   \ "yandex"
25 / http Connection
   \ "http"
Storage> 17
Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n
Remote config
Choose OneDrive account type?
 * Say b for a OneDrive business account -> b 商业版
 * Say p for a personal OneDrive account -> p 个人版
b) Business
p) Personal
b/p> p
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> n
For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine:
        rclone authorize "onedrive"
Then paste the result below:(需要在能打开浏览器的电脑上获取,方法见下面:OneDrive 授权码获取方法)
result>{"access_token":"$$$$$$$$$$$$$$","expiry":"2018-09-03T08:43:55.5290909+08:00"}
2018/09/03 07:47:11 ERROR : Failed to save new token in config file: section 'onedrive' not found
--------------------
[onedrive]
type = onedrive
token = {"access_token":"$$$$$$$$$$$$$$","expiry":"2018-09-01T08:43:55.5290909+08:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:

Name                 Type
====                 ====
onedrive             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> q

1.7 OneDrive 授权码获取方法:

官网下载 rclone Windows 版,地址:https://rclone.org/downloads/

如 Rclone Download v1.43 Windows 64 位:https://downloads.rclone.org/v1.43/rclone-v1.43-windows-amd64.zip,解压到 C 盘根目录,文件夹重命名为 rc,然后参考下面方法即可获取授权。

Microsoft Windows [版本 10.0.14393]
(c) 2016 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd c:\rc
c:\rc>rclone authorize "onedrive"  -·-·- (PowerShell 可能需要使用此命令:.\rclone authorize "onedrive")
Choose OneDrive account type?
 * Say b for a OneDrive business account
 * Say p for a personal OneDrive account
b) Business
p) Personal
b/p> p
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Paste the following into your remote machine --->
{"access_token":"***************########################################################################################################################**************************************************************************************************************************************************************************************************************$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$","expiry":"2018-09-01T01:43:55.5290909+08:00"}
<---End paste

然后将 { } 内的内容(包括{})复制到前面 result> 后面,回车即可。

同样,执行 ls 或者 lsd 命令检查是否连接成功:

#列出顶级文件夹,(gdrive 是前面第一步设置的名字,如果配置设置了密码会提示输入密码)
rclone lsd onedrive:

#列出所有文件
rclone ls onedrive:

2.1 定时执行脚本 rclone 命令大全

如果用来备份或者同步文件,用到的命令可能就两个:rclone_copy 和 rclone_sync。

rclone_copy 是复制,配合附加参数 --ignore-existing 可以假装增量备份;

rclone_sync 是源目录同步到目标目录,使两者一致,会删除目标目录多余内容,测试时可以加上 --dry-run,检查会复制和删除那些文件。

rclone about - Get quota information from the remote.
rclone authorize - Remote authorization.
rclone cachestats - Print cache stats for a remote
rclone cat - Concatenates any files and sends them to stdout.
rclone check - Checks the files in the source and destination match.
rclone cleanup - Clean up the remote if possible
rclone config - Enter an interactive configuration session.
rclone copy - Copy files from source to dest, skipping already copied
rclone copyto - Copy files from source to dest, skipping already copied
rclone copyurl - Copy url content to dest.
rclone cryptcheck - Cryptcheck checks the integrity of a crypted remote.
rclone cryptdecode - Cryptdecode returns unencrypted file names.
rclone dbhashsum - Produces a Dropbox hash file for all the objects in the path.
rclone dedupe - Interactively find duplicate files and delete/rename them.
rclone delete - Remove the contents of path.
rclone deletefile - Remove a single file from remote.
rclone genautocomplete - Output completion script for a given shell.
rclone gendocs - Output markdown docs for rclone to the directory supplied.
rclone hashsum - Produces an hashsum file for all the objects in the path.
rclone link - Generate public link to file/folder.
rclone listremotes - List all the remotes in the config file.
rclone ls - List the objects in the path with size and path.
rclone lsd - List all directories/containers/buckets in the path.
rclone lsf - List directories and objects in remote:path formatted for parsing
rclone lsjson - List directories and objects in the path in JSON format.
rclone lsl - List the objects in path with modification time, size and path.
rclone md5sum - Produces an md5sum file for all the objects in the path.
rclone mkdir - Make the path if it doesn’t already exist.
rclone mount - Mount the remote as a mountpoint. EXPERIMENTAL
rclone move - Move files from source to dest.
rclone moveto - Move file or directory from source to dest.
rclone ncdu - Explore a remote with a text based user interface.
rclone obscure - Obscure password for use in the rclone.conf
rclone purge - Remove the path and all of its contents.
rclone rc - Run a command against a running rclone.
rclone rcat - Copies standard input to file on remote.
rclone rmdir - Remove the path if empty.
rclone rmdirs - Remove empty directories under the path.
rclone serve - Serve a remote over a protocol.
rclone sha1sum - Produces an sha1sum file for all the objects in the path.
rclone size - Prints the total size and number of objects in remote:path.
rclone sync - Make source and dest identical, modifying destination only.
rclone touch - Create new file or change file modification time.
rclone tree - List the contents of the remote in a tree like fashion.
rclone version - Show the version number.

保证数据不会中断

yum install screen
screen -S rclone #第一次同步大量数据使用 screen 会话尽可能保护 rclone 执行不被中断
rclone copy gdrive:GooglePhotos onedrive:GooglePhotos

第一次同步完成,就可以 VPS 上(每天/周/月,按需选择)定时执行脚本自动同步。可以选择使用 rclone_copy --ignore-existing 进行增量备份(没有实测,按官方说明是可以实现),或者使用 rclone sync 同步。

我希望 OneDrive 上的备份与 Google Drive 一致,所以每天定时执行 rclone sync gdrive:GooglePhotos onedrive:GooglePhotos

/usr/bin/rclone sync gdrive:GooglePhotos onedrive:GooglePhotos >> /root/rclone.log 2>&1

配合 crontab 定时执行,比如每天 4:44 执行一次,日志写到 /root/rclone.log。执行 crontab -e,i,添加下面代码进去,按一下 Esc,然后输入 :wq 回车保存退出。

44 4 * * * /usr/bin/rclone sync gdrive:GooglePhotos onedrive:GooglePhotos >> /root/rclone.log 2>&1

注:不需要日志的话把 >> /root/rclone.log 2>&1 去掉。

然后重启一下 crond 服务即可。(service crond restart)

注意:最好执行 service crond status 检查 crond 服务是否启动,service crond start 可手动启动,或者设置开机启动:chkconfig --level 35 crond on。Centos 7 x86_64 实测通过。

原文链接

用的工具:samba。(其实比不过现成的软件,WinSCP还稳定一点)

第一步:在Linux上安装Samba:

Ubuntu

sudo apt-get install samba

Centos

yum -y install samba

第二步:配置一个通过samba访问Linux文件夹时,需要用到的用户名和密码:

smbpasswd -a 用户名        #在实际时,把这个用户名替换成自己的用户名。enter后,会有密码输入
              注意替换这个“用户名”为自己的名字。至于密码,enter后,会提示。

第三步:创建一个文件夹。或者直接使用现有的文件夹。

第四步:在配置文件中,添加这个我们想共享的文件夹的路径和一些配置信息:

sudo vi /etc/samba/smb.conf

第五步:在这个文件的最后,需要添加一点东西:

[share_name]                          #符号[ ]里面的是共享文件夹对外的名字,称为共享名字,注意[ ]不能掉
path = /home/book/Desktop/example      #这个path就是你想共享的那个文件夹的路径
available = yes
valid users = 用户名                   #这个book,就是我们刚才在第二步创建的那个用户名,记得替换
read only = no
browsable = yes
public = yes
writable = yes

其它设置,可根据自己需求来选择。

第六步:重启SMB服务:

sudo service smbd restart

OK,上面Linux的共享文件夹已经设置完毕

第七步:在Windows上添加这个共享文件夹。在任何一个你想添加这个共享文件夹的地方,右键—新建—快捷方式

在这个白框里面输入:

\\IP地址\共享文件夹的名字

IP地址,就是Linux的IP地址,可以用过ifconfig命令来查看。至于“共享文件夹的名字”,就是在第五步,我们自己设置的share_name。

第八步:在Windows上成功创建这个快捷方式后。访问它,就需要用到第二步设置的用户名和密码,注意第五步valid users与之进行匹配。

然后就是按提示,输入这个用户名和密码。

原文链接

1.普通 混淆参数

a.通用

QQ音乐混淆参数:dl.stream.qqmusic.com
梦想e卡混淆参数1:imhdfs.icbc.com.cn
梦想e卡混淆参数2(福建):v.icbc.com.cn
爱奇艺混淆参数:data.video.qiyi.com
优酷混淆参数:vali-dns.cp31.ott.cibntv.net
高德地图混淆参数:mps.amap.com
央视影音混淆参数:asp.cntv.myalicdn.com
百度贴吧混淆参数:static.tieba.baidu.com
微信混淆参数(遵义广州):short.weixin.qq.com
虾米音乐混淆参数:pic.xiami.net
天翼视讯混淆参数:vod3.nty.tv189.cn
钉钉混淆参数:tms.dingtalk.com
微博混淆参数:tobe.vip.weibo.com
微博混淆参数:new.vip.weibo.cn
微博混淆参数:simg.s.weibo.com
优酷混淆参数:push.m.youku.com
优酷混淆参数:api.mobile.youku.com
书旗混淆参数:spend1.shuqireader.com
书旗混淆参数:c1.shuqireader.com
优酷混淆参数:www.youku.com

2.高级 混淆参数
a.通用

优酷高级混淆参数:vali-dns.cp31.ott.cibntv.net#Range:bytes=25165824-32586598\nAccept: */*
爱看4G高级混淆参数:ltevod.tv189.cn#Connection: Keep-Alive\nAccept-Encoding: gzip
沃音乐高级混淆参数:woif.10155.com#Accept-Encoding: gzip
微信高级混淆参数(深圳):szminorshort.weixin.qq.com#Upgrade: mmtls\nAccept: */*\nConnection: close\nContent-Length: 533\nContent-Type: application/octet-stream
淘宝高级混淆参数:adashbc.m.taobao.com#Accept-Encoding: gzip
央视影音高级混淆参数:asp.cntv.myalicdn.com#Icy-MetaData: 1
抖音高级混淆参数:dm.toutiao.com#Connection: Keep-Alive\nAccept-Encoding: gzip
百度贴吧高级混淆参数:tbcdn.hiphotos.baidu.com#needginfo: 1/nConnection: Keep-Alive/nUser-Agent: bdtb for Android 9.0.8.0
爱奇艺高级混淆参数:data.video.qiyi.com#Accept: */*
美团高级混淆参数:apimeishi.meituan.com#Connection: Keep-Alive
高德地图高级混淆参数:mps.amap.com#Connection: Keep-Alive\nAccept-Encoding: gzip\nContent-Length: 680

b.电信

天翼视讯:h5.nty.tv189.com
天翼视讯:vod3.nty.tv189.cn
爱玩端口任意:open.4g.play.cn
爱看端口任意:ltetp.tv189.com
湖北电信:hb.10000shequ.com:8081
电信天翼:dy3.nty.tv189.cn
电信天翼:ltewap.tv189.com
电信天翼:tp.nty.tv189.com
电信天翼:ltewap.tv189.com/ik4g/v/C40605803.html?appid=115020310073&token=baebaf0fda892726032db7e8f2f7e0ee&devid=000001&version=5.3.13.14ctch1&channelid=01832020\r\n
电信爱听:dl.music.189.cn/res/V/1388/mp3/33/58/94/1388335894003000.mp3?mb=15380197563&fs=10104163&s=800&n=&id=63696337&M=online&sid=240387514
电信爱玩:open.4g.play.cn/api/v2/egame/log.json&access_token=dc15d6902663913b10a6ff56ae4e0c44&imsi=460022443530655&vc=145&app_key=8888015&channel_id=20310025
电信大王卡(可欠费使用):lt.hn.189.cn:1082
阿里鱼卡:mps.amap.com#Connection: Keep-Alive\nAccept-Encoding: gzip\nContent-Length: 680

c.移动

www.10086.cn
mm.10086.cn
抖音卡头条卡定向 有定向包可用:dm.toutiao.com
抖音卡头条卡定向 有定向包可用:v9-dy.ixigua.com

d.联通

山东联通:m.t.17186.cn
联通 114 圣子全国:114.255.201.163 (重庆、河南、福建、湖南等地)
哔哩哔哩:i1.hdslb.com
哔哩哔哩:i0.hdslb.com
浙江联通 wo+:w.zj165.com
联通 wotv 全国:wotv.17wo.cn(浙江、安徽、江苏)
河北:hb.10000shequ.com
湖北 (优先 wap 接入点不 net):box.10155.com
沃音乐:box.10155.com (四川、湖北、重庆、河北等)
沃阅读:partner.iread.wo.com.cn (北京、河南等)
工商 e 卡:v.icbc.com.cn
工商 e 卡:m.icbc.com.cn
工商 e 卡:m.mall.icbc.com.cn
工商 e 卡:elife.icbc.com.cn
工商 e 卡:act.icbc.com.cn
工商 e 卡:hit.icbc.com.cn
工商 e 卡:pv.mall.icbc.com.cn
工商 e 卡:mybank.icbc.com.cn

3.联通 普卡 混淆参数

全国联通沃商店混淆参数1:game.hxll.wostore.cn
全国联通沃商店混淆参数2:music.hxll.wostore.cn
沃阅读混淆参数:partner.iread.wo.com.cn
全国联通沃商店高级混淆参数1:game.hxll.wostore.cn#Connection: Keep-Alive\nAccept-Encoding: gzip
全国联通沃商店高级混淆参数2:music.hxll.wostore.cn#Connection: Keep-Alive\nAccept-Encoding: gzip
沃阅读高级混淆参数:partner.iread.wo.com.cn#Connection: Keep-Alive\nAccept-Encoding: gzip
(理论全国可用,吉林北京河南山东安徽江苏福建江西浙江广西贵州湖南湖北深圳。)
全国联通沃音乐:box.10155.com
腾讯大王卡:szminorshort.weixin.qq.com#Upgrade: mmtlsnAccept: /nConnection: closenContent-Length: 533nContent-Type: application/octet-stream
腾讯大王卡:tx.flv.huya.com
腾讯大王卡:short.weixin.qq.com
腾讯大王卡:szextshort.weixin.qq.com
short.weixin.qq.com
百度圣卡:data.video.qiyi.com
阿里宝卡:vali-dns.cp31.ott.cibntv.net
阿里宝卡微博卡:gw.alicdn.com
优酷:api.mobile.youku.com
米粉 api:api.ad.xiaomi.com
小米应用商店:data.mistat.xiaomi.com
小米直播:zbupic.zb.mi.com
小米充值:f100.g.mi.com
小米商城:mi.com

文章整理自:

https://www.lisuanlaoji.help
https://www.fbbi.pw/15.html