-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
阿里云盘下载优先使用cdn直链 #6645
base: main
Are you sure you want to change the base?
阿里云盘下载优先使用cdn直链 #6645
Conversation
Thanks for opening this pull request! Please check out our contributing guidelines. |
大佬有暂时可用的docker容器可用么 |
啥意思,没理解啊 |
pr一直没合并啊 docker没有新映像 |
@@ -106,17 +106,26 @@ func (d *AliDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs | |||
"file_id": file.GetID(), | |||
"expire_sec": 14400, | |||
} | |||
res, err, _ := d.request("https://api.alipan.com/v2/file/get_download_url", http.MethodPost, func(req *resty.Request) { | |||
res, err, _ := d.request("https://bj29.api.aliyunpds.com/v2/file/get_download_url", http.MethodPost, func(req *resty.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replacing the official url with a third-party one is never a good practice. Alipan official could change this url anytime, and then many user will have trouble use this driver.
please put this url as an option if this can provide acceleration benefit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这并不是一个第三方的url,相反,它是阿里云盘的上游服务pds(阿里云的一个云服务产品),阿里云盘在此基础上封装了一层(可能伴随着一些接口信息的阉割),一般来说,它比阿里云盘的接口更可靠。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as long as it's not an official url in the Aliyun-Open doc, it's stability is not guaranteed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
就像 @SeanHeuc 说的,请将其作为一个选项 而不是直接修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不太熟悉go语言,回头看看go的语法,有时间再改改
|
|
这个应该合并不了QAQ,违反阿里的TOS条款似乎 😹 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
完成修改后将被合并。
@@ -2,9 +2,9 @@ name: build_docker | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请不要修改workflow文件
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我再单独加个分支用于pr吧,好像排除不了了
@@ -106,17 +106,26 @@ func (d *AliDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs | |||
"file_id": file.GetID(), | |||
"expire_sec": 14400, | |||
} | |||
res, err, _ := d.request("https://api.alipan.com/v2/file/get_download_url", http.MethodPost, func(req *resty.Request) { | |||
res, err, _ := d.request("https://bj29.api.aliyunpds.com/v2/file/get_download_url", http.MethodPost, func(req *resty.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
就像 @SeanHeuc 说的,请将其作为一个选项 而不是直接修改
有些文件会出现bj29-hz.cn-hangzhou.data.alicloudccp.com的域名 |
顺便问一下, https://github.com/everstu/Koolcenter_alist 路由器里面这个二进制为啥这么小,本来想用你的二进制直接替换下的,结果发现太大了,我路由器的jffs分区根本塞不进去 |
我是复用的官方的流水线,不太清楚他的怎么这么精简 |
这个域名代表没走cdn,域名带file-cdn才是cdn链接,即使之前的热门资源生成cdn,好像过一段时间之后会过期而获取不到,需要是热门资源(有人最近下载过) |
试了五部热门的电视剧资源都没有出现过file-cdn域名的链接,不知道怎么才算是热门资源 |
如果是想测试的话,你可以先用携带带类似cn-beijing-data.aliyundrive.net域名的普通直链下载一次, |
失效了吗?下载的文件里没有出现cdn,而是cn-beijing-data,且下载速度只有几百K |
cb927b4
to
e5fe9ea
Compare
新增功能:
关联issue:#6644