【推荐】Aria2+Caddy+Rclone+GDlist+Aria2Ng+Google Drive一键安装脚本

2018-06-04 17:07:00
这两天网上又散播了一个快速注册google drive(下面简称gd)的无限空间的地址,,为了凑热闹就上了一波车
想到可以拿来做离线下载网盘,然后百度了一下挂载gd的方法,推荐一波这位老兄的教程

GDlist其特点是不走服务器流量,还是挺不错的,毕竟很多人流量都有限,于是新的一键脚本分支将DirectoryLister替换成了GDlist,Nginx环境换成了Caddy,支持的系统多了Ubuntu,本脚本同样的支持下载后自动上传,添加并自动更新Trackers服务器等特点。

安装需求

两个域名,一个作为Gdlist的域名,另外一个作为AriaNg的域名。 Debian 8系统或Ubuntu 16。本脚本需要Google Drive一个。

运行脚本

本脚本在Debian 8 x64上测试成功。(我用的9,ojbk)
如果运行失败,可以通过DD安装纯净版系统

正常系统请不要执行这条的操作!

apt-get install -y gawk sed grep
wget --no-check-certificate -qO DebianNET.sh 'https://moeclub.org/attachment/LinuxShell/DebianNET.sh' && chmod -x DebianNET.sh && bash DebianNET.sh -d 8 -v 64 -a --mirror 'http://ftp.riken.jp/Linux/debian/debian/'

重装后root默认密码为:Vicer

使用命令:

[scode type="yellow"]请严格按照下面的命令一步一步来![/scode]

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Aria2-Rclone-DirectoryLister-Aria2Ng/gdlist/Aria2.sh"
chmod +x Aria2.sh
./Aria2.sh

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

#输入网盘域名及Aria2NG面板域名
请输入你的DirectoryLister域名信息(eg:pan.94ish.me):
请输入你的Aria2NG域名信息(eg:dl.94ish.me):

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

#配置Rclone,大致如下
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> aria2down  #随便填,后面要用到
Type of storage to configure.
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 (also Dreamhost, Ceph, Minio, IBM COS)
   \ "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 / Local Disk
   \ "local"
14 / Microsoft Azure Blob Storage
   \ "azureblob"
15 / Microsoft OneDrive
   \ "onedrive"
16 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
17 / Pcloud
   \ "pcloud"
18 / QingCloud Object Storage
   \ "qingstor"
19 / SSH/SFTP Connection
   \ "sftp"
20 / Webdav
   \ "webdav"
21 / Yandex Disk
   \ "yandex"
22 / http Connection
   \ "http"
   Storage> 11 #选择11
Google Application Client Id - leave blank normally.
client_id> #留空
Google Application Client Secret - leave blank normally.
client_secret> #留空
Scope that rclone should use when requesting access from drive.
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> 1 #选择1
ID of the root folder - leave blank normally.  Fill in to access "Computers" folders. (see docs).
root_folder_id> #留空
Service Account Credentials JSON file path  - leave blank normally.
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
====                 ====
aria2down            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: #字面意思
请输入你云盘中需要挂载的文件夹: #谷歌云盘中的文件夹名
请输入你的Gdlist管理密码: #随便输入,但是等会Gdlist的口令要与此相同

Select an editor.  To change later, run 'select-editor'.
  1. /bin/nano        <---- easiest
  2. /usr/bin/vim.basic
  3. /usr/bin/vim.tiny
这一步随意,进去之后按ctrl+x退出即可!

相关目录

Aria2下载目录:/root/Download
Aria2Ng目录:/home/wwwroot/b.xx.com

Gdlist配置


口令必须要和上方输入的管理密码相同。


文件分享要确保分享链接类型为Public(公开),如果不是,请自己修改。

使用须知:

[scode type="yellow"]
ariang使用时记得设置aria2的密钥等信息,进行连接!
如果命令上面出现域名解析ip和本地ip不一样的话,
请你保证你解析的ip确实没填错,然后y继续
那是因为域名解析未生效或开了cdn的原因!
[/scode]

本文转自于:就是爱生活博客

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »