开门见山的说,我已经很久都没有更新了,上一次更新还是在6月3号。

坦白的说我没挂掉,也没想过不再运营这个博客。

至于鸽了三个多月的更新也是事出有因。当然,是好事。

废话不多说,开始上干货,同样,也是记录下来防止我忘掉。

首先,你需要一个足够大的Google driver,教育版,还是团队版不重要。其次,你需要一个大盘鸡,当然我们穷人只能用便宜的,基本上250G或500G硬盘就够了。我现在用的是7$每月的vir家的1T大盘鸡。其实还行,将就着用。最后还需要两个域名,二级域名也行。

以下内容引用萌鼠大佬文章

一键脚本:仅支持 Debian 8、9

wget https://www.moerats.com/usr/shell/Aria2_Rc_D.sh && bash Aria2_Rc_D.sh

运行脚本后,会依次要你输入以下信息:

#输入网盘域名及Aria2NG面板域名
请输入你的DirectoryLister域名信息:
请输入你的Aria2NG域名信息:

#设置Aria2密钥
请输入你的Aria2密钥:

#配置Rclone,大致如下
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> Rats  #随便填,后面要用到
Type of storage to configure.
Choose a number from below, or type in your own value
 1 / Amazon Drive
   \ "amazon cloud drive"
 2 / Amazon S3 (also Dreamhost, Ceph, Minio)
   \ "s3"
 3 / Backblaze B2
   \ "b2"
 4 / Box
   \ "box"
 5 / Cache a remote
   \ "cache"
 6 / Dropbox
   \ "dropbox"
 7 / Encrypt/Decrypt a remote
   \ "crypt"
 8 / FTP Connection
   \ "ftp"
 9 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
10 / Google Drive
   \ "drive"
11 / Hubic
   \ "hubic"
12 / Local Disk
   \ "local"
13 / Microsoft Azure Blob Storage
   \ "azureblob"
14 / Microsoft OneDrive
   \ "onedrive"
15 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
16 / Pcloud
   \ "pcloud"
17 / QingCloud Object Storage
   \ "qingstor"
18 / SSH/SFTP Connection
   \ "sftp"
19 / Webdav
   \ "webdav"
20 / Yandex Disk
   \ "yandex"
21 / http Connection
   \ "http"
Storage> 10  #选择10,Google Drive
Google Application Client Id - leave blank normally.
client_id>  #留空 
Google Application Client Secret - leave blank normally.
client_secret>  #留空
Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login.
service_account_file> 
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  #选择n
If your browser doesn't open automatically go to the following link: https://accounts.google.com/o/oauth2/auth....  #复制到浏览器打开,获取验证码
Log in and authorize rclone for access
Enter verification code>  #填入上面获取到的验证码
Configure this as a team drive?
y) Yes
n) No
y/n> y  #选择y
Fetching team drive list...
No team drives found in your account--------------------
[Rats]
client_id = 
client_secret = 
service_account_file = 
token = {"access_token":"ya29.GltFBd7UJN2qrxdG8FnG_rMuB18ogb8QlujdL7glvXtfV"}
team_drive = 
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y  #选择y
Current remotes:

Name                 Type
====                 ====
Rats                 drive

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退出

#最后输入Name
请输入你刚刚输入的Name:

然后脚本安装完成后,就可以直接通过Aria2Ng面板连接Aria2下载文件,并通过网盘观看了。

相关目录

  • Aria2下载目录:/root/Download
  • DirectoryLister目录:/home/wwwroot/a.xx.com
  • Aria2Ng目录:/home/wwwroot/b.xx.com
  • 挂载目录:/home/wwwroot/a.xx.com/Cloud

此时能够使用Aria2下载,上传到Google driver,使用 DirectoryLister 观看不需富强走VPS流量,因此能看但速度慢。

前几天LOC上有大佬分享了套CF的方法,可以完美解决这个问题。GitHub地址

点击进入并输入rclone的认证码,复制生成的代码。

进入cloudflare,登录,选择上方导航栏workers。

点击new workers dashboard

点击creak a workers

输入第一步复制的代码,填入域名即可部署。

如无法在线播放MP4文件,可在代码head上方加入下方代码。

<script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/layer/2.3/layer.js"></script>
    <script>
    $(function () {
        $('.file a').each(function() {
          $(this).on('click', function() {
              if(this.href.lastIndexOf(".mp4") > 1) {
                layer.open({
                  type: 1,
                  title: decodeURI(this.href.substring(this.href.lastIndexOf("/") + 1, this.href.length)),
                  shadeClose: true,
                  shade: 0.8,
                  area: ['100%', '100%'],
                  content: '<center><video controls autoplay=true preload=auto style="width:80%;object-fit: cover;" src="' + this.href + '"></video></center>'
                });
                return false;
              }
          });
      });
    });
    </script>

部署有问题,我也不负责。溜了溜了。