Files
OpenList/drivers/ilanzou/meta.go
Lythen 39fcaf488b feat(ilanzou): modernize console API session and copy (#2962)
* feat(ilanzou): modernize console API session and copy

Use an isolated cookie-backed API session and preserve raw appToken syntax required by current iLanzou endpoints.

Resolve CDN download responses more robustly, align upload metadata with the console protocol, and delegate copies to OpenList background tasks instead of blocking requests.

* fix(ilanzou): escape appToken query values

Escape opaque appToken values while preserving the literal colon required by iLanzou endpoints. Ignore CDN HEAD response lengths unless the response status is successful.

* fix(ilanzou): address driver review feedback

Use the ilanzou package name consistently, document upload result polling, and bound CDN size probes. Keep the appToken and CDN challenge handling covered by focused tests and comments.

* fix(ilanzou): use context timeout for HEAD probe
2026-08-29 01:17:04 +08:00

68 lines
1.5 KiB
Go

package ilanzou
import (
"github.com/OpenListTeam/OpenList/v4/internal/driver"
"github.com/OpenListTeam/OpenList/v4/internal/op"
)
type Addition struct {
driver.RootID
Username string `json:"username" type:"string" required:"true"`
Password string `json:"password" type:"string" required:"true"`
Ip string `json:"ip" type:"string"`
Token string
UUID string
}
type Conf struct {
base string
secret []byte
bucket string
unproved string
proved string
devVersion string
site string
}
func init() {
op.RegisterDriver(func() driver.Driver {
return &ILanZou{
config: driver.Config{
Name: "ILanZou",
DefaultRoot: "0",
LocalSort: true,
NoOverwriteUpload: true,
},
conf: Conf{
base: "https://apis.ilanzou.com",
secret: []byte("lanZouY-disk-app"),
bucket: "wpanstore-lanzou",
unproved: "unproved",
proved: "proved",
devVersion: "125",
site: "https://www.ilanzou.com",
},
}
})
op.RegisterDriver(func() driver.Driver {
return &ILanZou{
config: driver.Config{
Name: "FeijiPan",
DefaultRoot: "0",
LocalSort: true,
NoOverwriteUpload: true,
},
conf: Conf{
base: "https://api.feijipan.com",
secret: []byte("dingHao-disk-app"),
bucket: "wpanstore",
unproved: "ws",
proved: "app",
devVersion: "125",
site: "https://www.feijipan.com",
},
}
})
}