Skip to content

Add local filesystem-based XDRIVE transport implementation#5654

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/add-local-xdrive-implementation
Closed

Add local filesystem-based XDRIVE transport implementation#5654
Copilot wants to merge 4 commits intomainfrom
copilot/add-local-xdrive-implementation

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

Implements the local filesystem-based XDRIVE transport as described in PR #5645 comments, providing a foundation for remote-storage-service-based proxy that can later be extended to Google Drive, OneDrive, etc.

Changes

  • transport/internet/xdrive/xdrive.go: Core implementation

    • DriveService interface: Login, Upload, List, Download, Delete
    • LocalDriveService: filesystem implementation using remoteFolder
    • XdriveConnection: bidirectional connection via file polling
    • File naming: {uuid}-{up|down}-{seq} (e.g., 550e8400-e29b-41d4-a716-446655440000-up-0)
    • Client/server role via secrets[0] ("client" or "server")
    • Server polls at 500ms, read polls at 100ms, 10s retention window with auto-cleanup
  • infra/conf/transport_internet.go: Config parsing for xdriveSettings

  • main/distro/all/all.go: Transport registration

Usage

{
  "streamSettings": {
    "network": "xdrive",
    "xdriveSettings": {
      "remoteFolder": "/path/to/shared/folder",
      "service": "local",
      "secrets": ["client"]
    }
  }
}

Server uses "secrets": ["server"] with the same remoteFolder. Both endpoints communicate through files created in the shared directory.

Original prompt

根据 #5645 (comment) 的描述完成基于本机文件系统(local)的 XDRIVE,对于每个连接在 remoteFolder 内创建名为 uuidv4-up/down-seq 的数个文件,通过 secrets[0] 为 client/server 区分客户端/服务端,新增代码应当全部位于 xdrive.go


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 4, 2026 22:11
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
Copilot AI changed the title [WIP] Add local file system implementation for XDRIVE Add local filesystem-based XDRIVE transport implementation Feb 4, 2026
Copilot AI requested a review from RPRX February 4, 2026 22:18
@RPRX
Copy link
Member

RPRX commented Feb 4, 2026

还真像那么回事,代码收下了没你事了

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.

2 participants