Skip to content

feat(drivers): add doubao_new driver #2114

Merged
xrgzs merged 18 commits intoOpenListTeam:mainfrom
Elegant1E:doubao_new
Mar 23, 2026
Merged

feat(drivers): add doubao_new driver #2114
xrgzs merged 18 commits intoOpenListTeam:mainfrom
Elegant1E:doubao_new

Conversation

@Elegant1E
Copy link
Contributor

@Elegant1E Elegant1E commented Feb 13, 2026

Description / 描述

从 Alist 移植了 doubao_new 驱动

Motivation and Context / 背景

原有的豆包驱动疑似API迁移,无法获得新API后的所有操作更新,也无法进行操作。

这是我提出的issue:Closes #2079

这是续接旧的已关闭PR:Closes #2093

Closes #2236

How Has This Been Tested? / 测试

通过docker构建移植后的新版本后测试该驱动可以正常使用。

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。

  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。

  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。

  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。

  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

Elegant1E and others added 13 commits February 7, 2026 20:00
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
@xrgzs xrgzs added enhancement Module: Driver Driver-Related Issue/PR labels Feb 19, 2026
xrgzs added 2 commits March 21, 2026 11:05
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
@xrgzs xrgzs force-pushed the doubao_new branch 4 times, most recently from cfb84b8 to daf6126 Compare March 21, 2026 07:26
@xrgzs xrgzs requested a review from Copilot March 21, 2026 07:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ports and registers a new doubao_new storage driver to restore functionality after upstream Doubao/Feishu API migration, addressing the issues reported in #2079 and related PRs.

Changes:

  • Added the new drivers/doubao_new implementation (auth/token handling, listing, linking/preview, upload, and basic file operations).
  • Registered the driver via drivers/all.go so it’s included in the build.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
drivers/doubao_new/driver.go Core driver implementation: list/link/preview, mkdir/move/rename/remove, upload workflow, storage details.
drivers/doubao_new/auth.go DPoP generation/parsing, token refresh logic, encrypted keypair parsing, request auth header application.
drivers/doubao_new/util.go Shared request/response helpers, pagination for listing, CSRF retry helpers, preview link helper.
drivers/doubao_new/upload.go Upload prepare/block negotiation, merge-block upload, v3 fallback block upload, finish upload.
drivers/doubao_new/types.go API response/request type definitions used across the driver.
drivers/doubao_new/meta.go Driver config/registration and Addition fields.
drivers/all.go Imports the new driver so it’s registered at runtime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xrgzs
Copy link
Member

xrgzs commented Mar 21, 2026

已实现使用 Cookie 刷新 token

Copy link
Member

@jyxjjj jyxjjj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为了防止被认定破解等风险,建议将部分常量作为可配置值。

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
jyxjjj
jyxjjj previously approved these changes Mar 23, 2026
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
@xrgzs xrgzs merged commit e41b683 into OpenListTeam:main Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Module: Driver Driver-Related Issue/PR

Projects

None yet

4 participants