Skip to content

feat(foxel): add Foxel storage backend - #1

Merged
DrizzleTime merged 1 commit into
mainfrom
feat/foxel-storage
Oct 13, 2026
Merged

DrizzleTime merged 1 commit into
mainfrom
feat/foxel-storage

Conversation

@DrizzleTime

@DrizzleTime DrizzleTime commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary / 摘要

新增原生 Foxel 存储驱动,让 OpenList 可以挂载 Foxel 的虚拟目录。管理界面会自动显示 Foxel 和对应配置项。

  • 支持 Bearer 令牌或账号密码登录;账号密码模式在 401 后自动重新登录,并合并并发刷新。
  • 支持页码和游标分页、子目录访问、特殊字符路径、临时原始文件下载及范围请求。
  • 支持原始流上传、覆盖上传、进度、限速和取消,以及创建目录、重命名、移动、复制和删除。
  • 跨 Foxel 挂载的复制和移动等待后台任务结束,并传播失败原因。
  • 增加 HTTP 回归测试、针对 Foxel 驱动的 CI 和中文配置说明;没有新增 Go 依赖。

Foxel 需包含 /api/fs/download-public/{token}/{filename} 原始文件接口,避免 RAW 照片被转换成预览图。已接受的 Foxel 后台传输任务无法通过当前 API 取消;取消 OpenList 等待会停止本地轮询。

  • This PR has breaking changes. / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior. / 此 PR 新增 Foxel 驱动配置项。
  • This PR requires corresponding changes in related repositories. / 此 PR 需要关联仓库同步修改。

Testing / 测试

  • 已运行 gofmt -w drivers/foxel,格式检查及 git diff --check 通过。
  • 已对照当前 Foxel 源码检查 API 路由、响应格式和任务状态,确认驱动注册且没有新增外部 Go 依赖。
  • Foxel Driver CI 已通过,使用 Go 1.27.1 执行:
    • go test -race ./drivers/foxel
    • go vet ./drivers/foxel
    • go build ./drivers
  • 13 个 HTTP 回归测试函数覆盖并发认证刷新、403 和令牌过期、分页/游标、嵌套和特殊字符路径、原始下载/Range、文件操作、异步任务、流式及空文件上传、进度和取消。
  • 仓库原有的多平台 Test Build 工作流仍在运行;未执行全仓库单元测试。
  • go test ./...
  • Manual test / 手动测试:尚未连接实际 Foxel 实例;目前没有部署地址和凭据。

Checklist / 检查清单

  • I have read CONTRIBUTING. / 已阅读 CONTRIBUTING。
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct. / 待维护者确认贡献规范。
  • I have formatted the changed code with gofmt. / 已使用 gofmt 格式化变更。
  • I have requested review from relevant maintainers or code owners where applicable. / 待人工审查。

AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content. / 此 PR 包含 AI 辅助内容。

Tools used / 使用工具:Codex。

Usage scope / 使用范围:实现代码、HTTP 回归测试、文档和代码审查辅助。驱动依据两个仓库的实际源码编写;草稿 PR 供维护者审查。

  • I have reviewed and validated all AI-assisted content included in this PR. / 已逐项对照源码审查并通过驱动 CI;实际实例联调及人工维护者审查待完成。
  • I have ensured that all AI-assisted commits include Co-Authored-By attribution. / 提交已包含 Codex 归属信息。
  • I can reproduce all AI-assisted content included in this PR without any AI tools. / 待人工确认。

- Register the Foxel driver with Bearer authentication and automatic reauthentication.
- Support paged and cursor listings, original downloads, streaming uploads, and file operations.
- Wait for asynchronous Foxel transfers and propagate errors and cancellation.
- Add HTTP regression tests, driver CI, and setup documentation.

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
@DrizzleTime
DrizzleTime marked this pull request as ready for review October 13, 2026 07:09
@DrizzleTime
DrizzleTime merged commit f695f01 into main Oct 13, 2026
14 checks passed
DrizzleTime added a commit that referenced this pull request Oct 13, 2026
feat(foxel): add Foxel storage backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant