GoIndex: Use Google Drive's unlimited capacity to create your own domestically accessible network disk with unlimited capacity; watch videos online; get direct links to files

GoIndex: Use Google Drive's unlimited capacity to create your own domestically accessible network disk with unlimited capacity; watch videos online; get direct links to files

1. GoIndex function <br /> A small program deployed on CloudFlare Workers.
Google Drive files can be listed as directories and downloaded directly.
Traffic goes through CloudFlare and the network speed is determined by CloudFlare.

limit:
100,000 requests per day for wokers
Google Drive download 10T/24h (said by the boss)
Google API call limits

2. Build GoIndex
1. Installation and deployment plan 1
1. Install rclone locally 2. Authorize according to the process at https://rclone.org/drive/
a. Installation dependencies

 yum -y install unzip fuse fuse-devel

b. Install rclone

 curl https://rclone.org/install.sh | sudo bash

c. Google Drive Authorization

 ./rclone config

Enter n, create a new mount, select Google Drive, and fill in the required information.
d. Copy the link above, open it in your browser, and get the Google Drive authorization code

3. Execute rclone config file to view the rclone.conf path. Find root_folder_id and refresh_token and record them.
4. Download index.js from https://github.com/donwa/goindex and fill in root and refresh_token
5. Copy the code to CloudFlare for deployment.

(II) Installation and deployment plan 2
The author will not record refresh_token, but to avoid disputes, it is recommended that students who have the conditions use solution 1 for deployment
1. Visit https://install.gd.workers.dev/
2. After authorization and authentication, generate deployment code.
3. Copy the code to CloudFlare for deployment.

3. View the Google Drive directory ID and bind your own domain name
1. About Google Drive Directory ID
Open the team disk (or folder or folder shared by others) and look at the address bar.
https://drive.google.com/drive/folders/{The following code is the id}
Leave blank for the root directory.

2. Bind the domain name in CloudFlare Workers
a. First, let the domain name that needs to be bound pass cf and point to any ip.

b. Add Route

Reprinted from: https://www.hostloc.com/thread-582858-1-1.html, https://github.com/donwa/goindex

4. Add code to provide online playback function for GoIndex
1. Put the code between <head></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>

2. Use VLC media player to paste the download link directly into the network stream and watch it online.

Reposted from: https://www.hostloc.com/thread-583124-1-1.html

5. Google Drive (including transcoding) + lanzou + 19 direct link tool cf-worker version

use
/link/file id: automatic analysis or
/gd|lanzou|19/file id

Default cf transfer download

Optional parameter ?output=
json: returns json format
redirect: After parsing, jump to the original link to download

gd applies the additional parameter ?output=media. The media file is played in gd's transcoding mode.

Project address : https://github.com/reruin/workers/blob/master/link/index.js

<<:  AkkoCloud: 399 yuan/month/2*E5-2450L/32GB memory/240GB SSD hard disk/unlimited traffic/30Mbps/Zhenjiang Telecom

>>:  Kuai Che Dao: San Jose KVM VPS, 50Mbps-10Gbps bandwidth, unlimited traffic, minimum monthly payment of $6.74

Recommend

Conoha.jp: 930 yen/month/2CPU/1GB memory/100GB space/unlimited traffic/1 IP/KVM

Conoha.jp is a Japanese hosting company that belo...

Webhostpython: $9.99/month/120GB space/unlimited traffic/unlimited domain names

Webhostpython is a US hosting provider that provi...

$50/month/2G/500G/3TB dedicated server——Umbra Hosting

According to official information, Umbra Hosting ...

Beginner's Tutorial: WordPress Website Security Settings

WordPress is a blogging program used by many peop...

Google Adense Western Union remittance expired, what should I do?

The last time I made a Western Union remittance f...

SpartanHost: $2/month/256MB memory/100GB space/500GB traffic/5 IP/KVM/Dallas

SpartanHost, introduced many times, is a stable m...

Low-cost SSL collection (Part 3)

Previously, it was introduced twice: 1. Free SSL ...

NodeServ: $13/year/512MB RAM/100GB storage/1TB bandwidth/OpenVZ/Jacksonville

NodeServ, introduced in September 2015, has a str...