GithubHelp home page GithubHelp logo

gdshare's Introduction

GD Share

demo

https://drive.google.com/drive/folders/1soZPZdN0beUTvnD8YbRXgOIeff7Dgwa2

介绍

这是一款受goindex启发而产生的项目,适合部署于cloudflare worker,相比原版有以下特性:

  • 全盘搜索(包括个人盘和所有有权限的团队盘,可点击搜索结果中的链接跳转到对应的google drive官方网址)
  • 分页浏览(可自定义每页文件数,每页可根据文件名和大小排序)
  • 更美观的UI(致谢 ant design)
  • 防爬虫,对于所有目录和文件,只有管理员才有读取和下载的权限(原版goindex可以通过在目录下防止 .password 来给目录设置读取密码,但无法限制单个文件的下载)
  • 可以生成下载直链,方便第三方下载工具下载,对于流媒体文件,可以用potplayer等播放器直接打开进行播放(可以自定义有效期)
  • 可以生成带有提取码的分享链接,方便分享给他人浏览和下载(同样支持自定义有效期)

changelog

2022-03-10

  • 更新react-router-cache-route依赖,解决页面未加载完全时 前进/后退 造成卡死的现象
  • 将模版中的静态文件从jsdelivr移到unpkg,加速国内访问……

2020-08-12

  • 在首页展示团队盘列表(最多100条),点击对应名称即可进入
  • 添加批量获取直链功能(可自行选择,也可一键获取当前目录下所有直接子文件的直链)
  • 添加唤起外部播放器功能(支持IINA/PotPlayer/VLC/nPlayer/MXPlayer)
  • 添加指定范围搜索功能(可在目录列表页进行搜索,由于Google API的限制,只能搜索当前目录的直接子文件,无法搜索到递归子目录的内容。若当前目录为团队盘根目录,则支持整盘搜索)
  • 「显示路径」按钮可正确识别团队盘名称(之前会返回"Drive")
  • 后端搜索接口添加失败重试机制

tips

  • 本工具亦可当作goindex使用,只需将目录ID添加到 https://your.website.com/ls/ 后即可。 比如浏览团队盘内容可以直接访问 https://your.website.com/ls/你的团队盘ID 浏览个人盘根目录可以直接访问 https://your.website.com/ls/root

搭建方法

打开template.js,根据提示修改变量:

const CONFIG = {
    PASSKEY: "this is your passkey", // 管理员网页登录密钥,请自行修改,尽量复杂
    HASHKEY: "this is your hash key", // 用于校验生成的下载链接和分享链接,请自行修改,尽量复杂。修改后之前生成的下载和分享链接都会失效
    RETRY_LIMIT: 5, // 有时调用 google drive api 读取目录时会报错,这里设置最多允许重试的次数
    PAGESIZE: 100, // 读取列表的单页对象数,官方限制最大 1000
    AUTH: {
        client_id: "insert_your_client_id", // 这三项是你的google帐号个人授权信息,和goindex相同
        client_secret: "insert_your_client_secret", // 同上必填
        refresh_token: "insert_your_refresh_token", // 同上必填
        expires: 0,
        access_token: "" // 可不填
    }
}

变量设置完成后,将 template.js 整体复制到 cloudflare worker 中(具体步骤可参考https://www.jiyiblog.com/archives/031279.html),完成。

gdshare's People

Contributors

iwestlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdshare's Issues

好像失效了?

怎么突然间访问不了文件了,输入密码后直接一片空白,只有一个搜索框,搜索也提示“搜索接口返回失败,请重试”

下载ass字幕文件会变成mp3的后缀名

不知可否修改为正常的后缀名?
另外,问一下有人知道potplayer调用远程字幕的方法吗?
还希望大佬可以出一个团队盘目录,输入ID实在有些麻烦
(感谢大佬的付出!!!)

vlc还是调用不了...

Easy bat-only install
This is easy to install, but a command line window will pop up briefly when you click a vlc:// link. Try this first before you attempt the harder version.

Put the files from the bat directory in your VLC directory (usually C:\Program Files (x86)\VideoLAN\VLC), and then run vlc-protocol-register.bat as administrator (right-click the file and use Run as administrator).

只操作这一步,好像会弹出要不要用vlc protocol来打开,但是打不开程序...

Harder exe install
You have to compile a program to get this working.

Get bash set up and open a prompt.
Install git and the compiler: sudo apt install git gcc-mingw-w64
Go someplace where you can find the files later: cd /mnt/c/Users/username/Desktop
Download the files: git clone https://github.com/stefansundin/vlc-protocol.git
cd vlc-protocol/windows/exe/
./build.sh
Now, if successful, you should see a file named vlc-protocol.exe. Copy the exe file and the bat files to your VLC directory and run vlc-protocol-register.bat as administrator (right-click the file and use Run as administrator).

这一部好像要在商店里装linux,不过试了下,store提示不能联网...

搜索指定盘

如果你希望搜索指定团队盘而不是所有盘,可以将template.js里的

corpora: 'allDrives'

改成

corpora: 'drive', driveId: '你的团队盘ID'

Features request

  1. English version
  2. There is any way to get folder size by recursion

好像调用播放器不起作用?

点击后,浏览器会出现potplayer:// 或者vlc:// 等链接,但是不会自动打开app来进行播放.

wind10下面的potplayer和vcl都试过了.

iOS下面的nplayer可以自动调用

Translation in English

Hey, Please add a language switching option to configure between Chinese and English !

如何修改默认分享链接的有效时间?

如题,因为我主要给自己用,所以想设置默认为较长时间或者不限时间,还希望可以自动显示路径,或者添加可控选项,让使用者自己选择,最后对作者表示感谢(❁´ω`❁)

预览图片

切换为图标视图,图片加载缓慢或者加载不出来,能不能将图标视图域名https:///xx.googleusercontent.com/xx也走cloudflare workers流量

复制的所有文件都559b?

image

能下载~
请问这三个参数应该填什么?

folderID
这个是共享文件夹的Google id?

-k 'your hashkey'
这个是共享文件夹的密码?

-c 'your.domain.com'
这个是文件夹共享的地址?

对么?

CloudFlare 一直以我的域名缓存了非HTML的内容而直接暂停我的CloudFlare

我有一个空的域名,什么都没有空空的域名,然后给它加上您的GDShare 后,只要大量下载(超过200GB) ,我的域名直接被暂停计划:
image
询问了客服回答是由于缓存了非HTML的内容违反了CloudFlare TOS,要等待7天恢复
image
之前使用GDIndex 没有这样子的问题,利用了GDShare就出事了,请问可以修复一下吗?感谢大佬!

Option to hide google link when sharing gdshare link

When you share a folder, google link is expose. I dont want to expose my google link to other people, random person asking permission for google link. I just want to give them gdshare/index link if possible. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.