Skip to content

Conversation

xrgzs
Copy link
Member

@xrgzs xrgzs commented Aug 13, 2025

增加 使用直链 开关,启用后,返回 CDN 直链,会消耗直链流量。需要先启用直链空间。

https://123yunpan.yuque.com/org-wiki-123yunpan-muaork/cr6ced/tdxfsmtemp4gu4o2

已知问题:

  • 需要用户手动启用直链空间,由于涉及到篡改用户设置,这里不考虑自动处理
  • 未实现直链URL鉴权,正在处理 已实现

Close: #1043

TODO: 增加文档 OpenListTeam/OpenList-Docs#134

@xrgzs xrgzs requested a review from Copilot August 13, 2025 02:04
Copilot

This comment was marked as outdated.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: MadDogOwner <[email protected]>
@xrgzs xrgzs marked this pull request as draft August 13, 2025 02:25
@xrgzs xrgzs requested a review from Copilot August 13, 2025 02:50
@xrgzs xrgzs changed the title feat(123_open): add UseDirectLink option feat(123_open): add DirectLink option Aug 13, 2025
Copy link
Contributor

@Copilot 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 adds a UseDirectLink option to the 123_open driver that allows users to return CDN direct links instead of regular download URLs, which will consume direct link traffic. The feature requires users to manually enable direct link space first.

Key changes:

  • Added direct link configuration options with optional URL authentication
  • Implemented direct link API endpoint and response handling
  • Modified the Link method to support both direct link and traditional download modes

Reviewed Changes

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

File Description
drivers/123_open/meta.go Added configuration fields for direct link feature including private key and validation duration
drivers/123_open/types.go Added DirectLinkResp struct and changed UID type from int64 to uint64
drivers/123_open/util.go Added direct link API endpoint, URL signing method, and getDirectLink function
drivers/123_open/driver.go Modified Link method to conditionally use direct links with authentication support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@xrgzs xrgzs requested a review from Copilot August 13, 2025 03:24
@xrgzs xrgzs marked this pull request as ready for review August 13, 2025 03:39
Copy link
Contributor

@Copilot 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@dezhishen dezhishen requested a review from Copilot August 14, 2025 13:11
Copy link
Contributor

@Copilot 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@xrgzs xrgzs added enhancement 增强/功能请求 go Pull requests that update go code labels Aug 17, 2025
@PIKACHUIM PIKACHUIM self-requested a review August 19, 2025 07:22
@PIKACHUIM PIKACHUIM merged commit 2339454 into OpenListTeam:main Aug 19, 2025
12 checks passed
@xrgzs xrgzs deleted the 123-open-dlink branch August 19, 2025 07:28
@liufurusu
Copy link

123分享,可以像豆包一样一行一个目录吗。现在需要每个分享链接创建一个驱动

@xrgzs
Copy link
Member Author

xrgzs commented Sep 7, 2025

123分享,可以像豆包一样一行一个目录吗。现在需要每个分享链接创建一个驱动

目前123open未实现分享,另外请到合适的地方反馈

@Keither666
Copy link

万岁,测试版能用上了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 增强/功能请求 go Pull requests that update go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

再做一个123开放平台-直链版本呗
4 participants