- Stable Release, Version
2.2.3
- Supports Both
My Drive
andTeam/Shared Drives
with Dark Mode. - Latest Index is faster than before, but backup before making new, and report if there is any issue. :)
Watch This Video To Know More
For Screenshots, See Theme Previews below
-
There are three Drive ID Types
My Drive
isroot
, eg. Drive of Simple Gmail Account.Shared Drive ID
is Team/Shared Drive ID's Root.Folder ID
is those which are notroot
and you create a folder and use it's ID. If you use this, this will work good in legacy worker as it'll not display search because Google Drive doesn't support Folder Only search. AVOID USING FOLDER IDs.
-
For example, if you open this shared drive
https://drive.google.com/drive/u/0/folders/0AOM2i7Mi3uWIUk9PVA
-0AOM2i7Mi3uWIUk9PVA
is its ID. -
If you're new and noob, just follow This Simple Guide
- Search doesn't support
FOLDER ID
, useroot
or specificShared Drive ID
.
- Search doesn't support
-
If you want full control over everything you own, follow through This Advanced Guide
-
worker-generator.js is the code used on our BhadooGDIndex Generator v2.2.3 site.
-
worker-super.js is Current and Main Workers File, use this if you have one or more drives. This can also be used to display drive links while searching all drives your account is associated with (optional, recommended for closed index).
-
worker-legacy.js is older version, less fast because of API requests it makes to check drive types, if you've too many drives, don't use this one.
-
worker-multiple-drives.js should be used when you have more than one shared drives and you want to search in all of them and get index links in search.
-
worker-second-domain-non-video.js is for using as second domain but doesn't support video files, instead it'll redirect to main index. Good to avoid video streaming ban by cloudflare.
-
worker-second-domain.js is for using in second domain worker for all purpose.
-
worker-super-api.js is just API for Static Site. You can host API on Cloudflare as Backend, and serve Frontend on any platform, protects your workers account from being suspended as this one works in background and doesn't consume much resources. Complete Process is still Undocumented from Main Author.
-
worker-super-read-only.js is for making a read only Index site. This can be used to showcase your drive files, disabling download or streaming permanently.
Google has increased security for entire Google API Console. For this reason, only verified apps can be used for public use.
The App Verification method needs several steps to pass, i.e., domain verification, youtube video demo, etc., which is now not possible for general users like me.
To complete verification, you will need to provide:
1. An official link to your app's Privacy Policy
2. A YouTube video showing how you plan to use the Google user data you get from scopes
3. A written explanation telling Google why you need access to sensitive and/or restricted user data
4. All your domains verified in Google Search Console
But developers and private beta testers can also use the apps without verification.
If you want to use my project as base and don't want to go through all the difficulties to make your own project and group and everything, you can become a beta tester for the app. For this, you have to do a few tasks:
- Join my Google Group for Testers
- Wait a few days (maximum 3 days to 3 weeks) for myself to check and include your email in the Testers' list
- Wait for confirmation on the Google Group Chat
- Finally, use the BhadooGDIndex Generator v2.2.3 to get the Index Code
- Paste the code with your own Customization into a new CloudFlare Worker which will be your GDIndex Homepage.
Sharing your Google Drive credentials to this project is totally safe. Still, if you don't want to take the risk, follow through to make your own Google API Project, Generator Worker and Index Worker, the hard way.
It is best to make your own Google Cloud Console project (details provided below) to get CLIENT ID
and CLIENT SECRET
which are needed to create the Generator Cloudflare Worker (from which the Index codes will be generated for personal use).
You can use all the assets (i.e., worker files and app js files) from this repository, but you must use your own Google API Credentials to properly get a working Drive Index.
If you want to use this repository for your personal use with full security enabled, Follow through each and every steps decribed below:
I'll be using BhadooGDIndex
as a reference project of my own as-well-as group name for example. Make sure to modify it for your own purpose. If you see <your-project-name>
anywhere in addresses below, replace it with your project's name.
- Go to
https://groups.google.com/my-groups
, click+ Create Group
button on the top-left corner, give a nice name and take note of the group email address as we will be needing it later.- I'll Use
[email protected]
as my group email.
- I'll Use
- Go to
https://dash.cloudflare.com/
and create an account if you don't already have one. - Click on
Workers
link from left side and clickCreate a Service
to make your generator worker.- I'll use
bhadoogdindexer
as the name which gave mehttps://bhadoogdindexer.fr3akyphantom.workers.dev
as the address. Use your own here.
- I'll use
- Note the worker address and Exit cloudflare for now. We will be using it later.
- Log in to Google/GMail in your browser
- Go to
https://console.cloud.google.com/projectcreate
- Create a fresh new Project
- Then click on
Dashboard
link from there or go tohttps://console.cloud.google.com/home/dashboard?project=<your-project-name>
- Go to
https://console.cloud.google.com/apis/dashboard?project=<your-project-name>
- Click on
+ Enable APIs and Services
button on top - Search for
Google Drive API
, go to that page and clickEnable
button from there - From next page (
https://console.cloud.google.com/apis/api/drive.googleapis.com/metrics?project=<your-project-name>
), click onCreate Credentials
button from top-right corner. - In the next page, fill in some details.
- On
Step 1: Credential Type
, selectUser Data
radio button and clickNext
below it. - On
Step 2: OAuth Consent Screen
, input App information. Add a fancyApp name
, use your google group email address asUser support email
, add a fancyLogo
or not. Use your account email or any other private email addresses asDeveloper contact information
. ClickSave and Continue
button. - On
Step 3: Scopes (optional)
, clickAdd or Remove Scopes
, scroll down and onManually add scopes
, inputhttps://www.googleapis.com/auth/drive
and click onAdd to Table
and then clickUpdate
. Lastly, pressSave and Continue
button. - On
Step 4: OAuth Client ID
, selectWeb Application
as application type and name it (I'll useBhadooGDIndexerWebClient
for example). Use the exact address of the cloudflare generator worker address inAuthorized JavaScript origins
andAuthorized redirect URIs
. ClickCreate
at the end. - It will take time to create the app, wait a few seconds.
- Once done, on
Step 5: Your Credentials
, You will get aClient ID
. Download the credential json file and keep in a secure place. It contains bothclient_id
andclient_secret
which are needed for later. - Click
Done
and wait a few seconds to load a new page.
- On
- [Required] Add your preferred email addresses as Testers in the App.
- Go to
https://console.cloud.google.com/apis/credentials/consent?project=<your-project-name>
- Scroll down to
Test users
and add upto 100 GMail addresses whose Google Drive you need to Index. You must add your own account email address, otherwise you can't test/use the app. - If you want to help your friends, then add their GMail Addresses here so that they can use your project to make their own Indexes.
- Go to
- [Optional] Service Account Generation:
- Service Account will not be used right now, but details will be added later on.
- [Optional] Go to
https://console.cloud.google.com/apis/credentials?project=<your-project-name>
and clickCreate Credentials
and selectAPI Keys
. Copy theAPI KEY
and paste into a new text file and keep it private.
- Copy the content of
https://github.com/rokibhasansagar/BhadooGDIndex/blob/2.2.3/worker/worker-generator.js
and paste it in the CloudFlare Worker that you generated in Step 2. - Edit a few things before you publish it.
- Add your
client_id
andclient_secret
from the credential json file in line 6 and 7. - In line 10, replace
https://example.com
with your CloudFlare Generator Worker address. - Use any worker js file in line 11 if you want to change the default one. More about different worker js files are explained further below.
- Add your
- Publish the generator worker.
- Open your CloudFlare Generator Worker website page in a tab which you published just now in Step 4:
https://<worker-service-name>.<worker-account-domain>.workers.dev
- Click
G | Sign In with Google
Button. - Sign in with your Google Account or any other GMail address which belong to the App Testers.
- You'll see
Google hasn’t verified this app
warning. Just click onContinue
from the left corner of the dialogue. Again pressContinue
to give access to the App to use that account's Google Drive. - Upon success, you will be redirected to your Worker Generator page for further work.
- Enter
Site Name
andShare Drive ID or root
into the specific fields and clickSubmit
. - You will then get the Finished Index Code. Copy the entire code from the field and paste the code in a new CloudFlare Worker as a new service.
- You can name it as
https://<your-gdindex-home>.<worker-account-domain>.workers.dev
. If you need to modify further, read through the README.
You can read through the worker js files and edit user configs. Just don't touch anything under DO NOT EDIT BELOW
warning message in the worker file.
id
: From Different Drive ID Types, choose one or more rootsid
to use in your index.name
: Give your Drive Root a distinguished name.protect_file_link
: This is directory encryption added by the original author. Add a.password
file with your required password in your folder which you want to protect, each folder should have its own.password
file. The password is stored inside the Google Drive Folder, not the index and the.password
file is hidden and cannot be accessed using Index.- Example use https://bit.ly/3tBxXJN and password is
thispassword
- Example use https://bit.ly/3tBxXJN and password is
auth
: User ID and Password protection for Index Root. Replaceusername
andpassword
for basic authentication. Multiple user authentication is also supported.- For single user, use like
"auth": {"username":"password"}
. For multiple users, use like"auth": { "user1":"pass1", "user2":"pass2", }
- If users adds
"auth":{"":""}
empty values then the site will ask for authentication but user can enter without entering any data by clicking submit.
- For single user, use like
"roots":[
{
"id": "root",
"name": "My Drive",
"protect_file_link": false,
// "auth": {"username":"password"} /* Remove double slash before "auth" to activate id password protection */
},
{
"id": "", /* Add any Shared Drive ID or Folder ID */
"name": "Drive Two",
"protect_file_link": false,
// "auth": {"username":"password", "username1":"password1"} /* Remove double slash before "auth" to activate id password protection */
},
]};
- Set
"service_account": false
to"service_account": true
- Replace
{}
with data from service account json file
- If you want to use multiple service accounts, use comma-separated data in place of
{}
- Use worker-multiple-drives.js worker file
- Make a Single Service Account (Fresh and New)
- Add that SA Email to drives, only to those, which you want to Index. and change
"service_account": false,
to"service_account": true,
- Add that Service Account to Index
- In
domains_for_dl = [''];
enter your Index URL, that you're making now. eg.https://example.com
- Add your Drive IDs in Index Code
- Set
second_domain_for_dl
totrue
inuiConfig
in Main Index. - Set
domains_for_dl
andvideo_domains_for_dl
to your new indexes you're going to make below in top config near service accounts. - Then make separate indexes on different CloudFlare accounts with appropriate second-domain workers code.
- Change only
refresh_token
or SA and Drive IDs insideauthConfig
in those second-domain workers, don't touch anything else. - It's done.
- Search only works if you use
Shared Drive ID
orroot
. - Search won't work or the bar won't appear if you're using
Folder ID
inside fromroot
orShared Drive
. In Newer versions bar will appear but search won't work.
- Find
params.orderBy
in workers code (around L1006 and L1092). - use
params.orderBy = 'folder,name,modifiedTime desc';
to sort by File and Folder Name. - use
params.orderBy = 'folder,modifiedTime desc,name';
to sort by Modified Time. - A comma-separated list of sort keys. Valid keys are
createdTime
,folder
,modifiedByMeTime
,modifiedTime
,name
,name_natural
,quotaBytesUsed
,recency
,sharedWithMeTime
,starred
, andviewedByMeTime
. Each key sorts ascending by default, but may be reversed with thedesc
modifier. Example usage:?orderBy=folder,modifiedTime desc,name
. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
If you still needs anything, see the Original/Official Wiki page before asking for any help at https://gitlab.com/GoogleDriveIndex/Google-Drive-Index/-/wikis/Getting-Started-with-Google-Drive-Index
- There are 25 Themes from bootswatch official Bootstrap Themes.
- To Change theme, first generate the code, paste in CloudFlare Workers and then select one theme code from below and paste it in
uiConfig
by replacing the defaultslate
theme. - You can check Theme from bootswatch.com before selecting.
- The titles of the themes are these (choose one):
cerulean cosmo cyborg darkly flatly journal litera lumen lux materia minty pulse sandstone simplex sketchy slate solar spacelab superhero united yeti vapor morph quartz zephyr
cerulean | cosmo |
---|---|
![]() |
![]() |
cyborg | darkly |
![]() |
![]() |
flatly | journal |
![]() |
![]() |
litera | lumen |
![]() |
![]() |
lux | materia |
![]() |
![]() |
minty | pulse |
![]() |
![]() |
sandstone | simplex |
![]() |
![]() |
sketchy | slate |
![]() |
![]() |
solar | spacelab |
![]() |
![]() |
superhero | united |
![]() |
![]() |
yeti | vapor |
![]() |
![]() |
morph | quartz |
![]() |
![]() |
zephyr | |
![]() |
- Poster for Audio and Video are added as default.
- The Index fetches Posters from Google Drive media files, uses default if none available.
- If audio/video is streamable, then it is played by Plyr addin in the browser.
- This project is not associated with Google, this project uses Google Drive API to Index Files and Folders.
- These Index's are written by someone else, possibly by donva and maple3142.
- Beta Version is redesigned using Bootstrap from Alpha Version by Parveen Bhadoo.
- The Original Repo was imported from yanzai and then modified for personal use.
- Hash Hackers or Bhadoo Cloud or Parveen Bhadoo or I do not own the websites created using this software. The Software is under MIT License and Free to use for everyone personally or commercially. If any site is found using the name in title as the project or related names, shouldn't be assumed to be associated with us. The Software provides full configuration to the user to update and change the names of title, contact information for the published website using this software.
- As an open-source Software, it can be used by good and bad actors both, eg. the use of YT-DL, read full post here.
- Contribute to this project or improve this README.
- Base Source: maple3142 and yanzai
- CSS: Bootstrap and Bootswatch
- API: Google Drive API
- jQuery
- PDF Viewer: pdf.js
- Audio and Video Player: plyr.io
- CDN: jsDelivr
- Minified JS: Toptal
- Obfuscator: JavaScript Obfuscator Tool
- Hosting: Gitlab and npm
- Website Hosting: js.org and GitHub
- Dev Editor Used: ATOM
- Made for: Cloudflare Workers
- Several Different Fixes by SpEcHiDe, Adnan Ahmad, Prashanth C A, cheems, iSumitBot and Unmentioned Forgotten Contributors.
- ETH
0xaf25cdc7967213172a745453a64e8a0b59686729
- BTC
3BgSznxLB5u4WiuVERb1dKWeTqSSwK9NPW
- BAT
0xaf25cdc7967213172a745453a64e8a0b59686729