- Stable Release, Version
2.2.3 - Supports Both
My DriveandTeam/Shared Driveswith 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 Driveisroot, eg. Drive of Simple Gmail Account.Shared Drive IDis Team/Shared Drive ID's Root.Folder IDis those which are notrootand 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-0AOM2i7Mi3uWIUk9PVAis its ID. -
If you're new and noob, just follow This Simple Guide
- Search doesn't support
FOLDER ID, userootor 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 Groupbutton 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
Workerslink from left side and clickCreate a Serviceto make your generator worker.- I'll use
bhadoogdindexeras the name which gave mehttps://bhadoogdindexer.fr3akyphantom.workers.devas 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
Dashboardlink 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 Servicesbutton on top - Search for
Google Drive API, go to that page and clickEnablebutton from there - From next page (
https://console.cloud.google.com/apis/api/drive.googleapis.com/metrics?project=<your-project-name>), click onCreate Credentialsbutton from top-right corner. - In the next page, fill in some details.
- On
Step 1: Credential Type, selectUser Dataradio button and clickNextbelow 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 fancyLogoor not. Use your account email or any other private email addresses asDeveloper contact information. ClickSave and Continuebutton. - On
Step 3: Scopes (optional), clickAdd or Remove Scopes, scroll down and onManually add scopes, inputhttps://www.googleapis.com/auth/driveand click onAdd to Tableand then clickUpdate. Lastly, pressSave and Continuebutton. - On
Step 4: OAuth Client ID, selectWeb Applicationas application type and name it (I'll useBhadooGDIndexerWebClientfor example). Use the exact address of the cloudflare generator worker address inAuthorized JavaScript originsandAuthorized redirect URIs. ClickCreateat 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_idandclient_secretwhich are needed for later. - Click
Doneand 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 usersand 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 Credentialsand selectAPI Keys. Copy theAPI KEYand 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.jsand paste it in the CloudFlare Worker that you generated in Step 2. - Edit a few things before you publish it.
- Add your
client_idandclient_secretfrom the credential json file in line 6 and 7. - In line 10, replace
https://example.comwith 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 GoogleButton. - 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 appwarning. Just click onContinuefrom the left corner of the dialogue. Again pressContinueto 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 NameandShare Drive ID or rootinto 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 rootsidto 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.passwordfile with your required password in your folder which you want to protect, each folder should have its own.passwordfile. The password is stored inside the Google Drive Folder, not the index and the.passwordfile 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. Replaceusernameandpasswordfor 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": falseto"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_dltotrueinuiConfigin Main Index. - Set
domains_for_dlandvideo_domains_for_dlto 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_tokenor SA and Drive IDs insideauthConfigin those second-domain workers, don't touch anything else. - It's done.
- Search only works if you use
Shared Drive IDorroot. - Search won't work or the bar won't appear if you're using
Folder IDinside fromrootorShared Drive. In Newer versions bar will appear but search won't work.
- Find
params.orderByin 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 thedescmodifier. 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
uiConfigby replacing the defaultslatetheme. - 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