mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
893457cd50
* fix(aliyundrive): limit callback concurrency - Share proxy callback admission by Aliyun user identity and hold permits for complete response-body lifetimes. - Retry only verified callback-capacity rejections while preserving direct redirects and server download limiting. - Map exhausted temporary capacity to S3 SlowDown through the merged OpenListTeam gofakes3 module. - Cover shared limits, lifecycle release, cancellation, retry classification, and the S3 HTTP response. Co-authored-by: Codex <267193182+codex@users.noreply.github.com> # Conflicts: # go.mod # go.sum # server/s3/pager.go * fix(op): separate redirect and proxy link cache entries - Include redirect mode in the link cache key for all drivers. - Cover both redirect-to-proxy and proxy-to-redirect cache reuse. Co-authored-by: Codex <267193182+codex@users.noreply.github.com> * fix(proxy): close range bodies before opening next - make ServeHTTP own each range body and preserve cleanup failures - remove the aggregate range closer and pass range readers directly - replace the obsolete callback transport test with focused lifecycle coverage Co-authored-by: Codex <267193182+codex@users.noreply.github.com> --------- Co-authored-by: nostalume <nostalucent@gmail.com> Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
39 lines
1.9 KiB
Go
39 lines
1.9 KiB
Go
package aliyundrive_open
|
|
|
|
import (
|
|
"github.com/OpenListTeam/OpenList/v4/internal/driver"
|
|
"github.com/OpenListTeam/OpenList/v4/internal/op"
|
|
)
|
|
|
|
type Addition struct {
|
|
DriveType string `json:"drive_type" type:"select" options:"default,resource,backup" default:"resource"`
|
|
driver.RootID
|
|
RefreshToken string `json:"refresh_token" required:"true"`
|
|
OrderBy string `json:"order_by" type:"select" options:"name,size,updated_at,created_at"`
|
|
OrderDirection string `json:"order_direction" type:"select" options:"ASC,DESC"`
|
|
UseOnlineAPI bool `json:"use_online_api" default:"true"`
|
|
AlipanType string `json:"alipan_type" required:"true" type:"select" default:"default" options:"default,alipanTV"`
|
|
APIAddress string `json:"api_url_address" default:"https://api.oplist.org/alicloud/renewapi"`
|
|
ClientID string `json:"client_id" help:"Keep it empty if you don't have one"`
|
|
ClientSecret string `json:"client_secret" help:"Keep it empty if you don't have one"`
|
|
RemoveWay string `json:"remove_way" required:"true" type:"select" options:"trash,delete"`
|
|
RapidUpload bool `json:"rapid_upload" help:"If you enable this option, the file will be uploaded to the server first, so the progress will be incorrect"`
|
|
InternalUpload bool `json:"internal_upload" help:"If you are using Aliyun ECS is located in Beijing, you can turn it on to boost the upload speed"`
|
|
LIVPDownloadFormat string `json:"livp_download_format" type:"select" options:"jpeg,mov" default:"jpeg"`
|
|
CallbackConcurrency int `json:"callback_concurrency" type:"number" default:"1" help:"Maximum active proxied downloads shared by Aliyun user"`
|
|
AccessToken string
|
|
}
|
|
|
|
var config = driver.Config{
|
|
Name: "AliyundriveOpen",
|
|
DefaultRoot: "root",
|
|
NoOverwriteUpload: true,
|
|
}
|
|
var API_URL = "https://openapi.alipan.com"
|
|
|
|
func init() {
|
|
op.RegisterDriver(func() driver.Driver {
|
|
return &AliyundriveOpen{}
|
|
})
|
|
}
|