How gopeedlab/gopeed works
Gopeed is a cross-platform download manager: a user submits a resource through a client or automation interface, the core manages a task, protocol fetchers retrieve its content, and the result is saved locally. The graph also preserves the product’s extension runtime, MCP and REST interfaces, CLI, and post-download capabilities. Relationships come from the README and shown source references; dashed links mark documented capabilities or wiring not visible in the sampled excerpts.
Main entry points: downloader.go Downloader · server.go REST server · fetcher.go Fetcher registry · service.go Task API service
Components 28
Clients and entrypoints
- Flutter clients
ui/flutter - Mobile FFI
bind/mobile/main.go - CLI downloader
cmd/gopeed/main.go - Web UI server
cmd/web - iOS task activity
ui/flutter/ios/Runner/GopeedContinuedProcessingManager.swift - Activity attributes
ui/flutter/ios/Runner/GopeedDownloadAttributes.swift - Live Activity manager
ui/flutter/ios/Runner/GopeedLiveActivityManager.swift - iOS task events
ui/flutter/ios/Runner/GopeedTaskEvent.swift - Windows Flutter runner
ui/flutter/windows/runner/flutter_window.h
APIs and automation
- REST server
pkg/rest/server.go - Task API service
pkg/api/service.go - MCP tools
pkg/mcpserver/server.go - Task events
pkg/api/events.go
Task management
- Task and resource model
pkg/base/model.go - Downloader
pkg/download/downloader.go - Task storage
pkg/download/storage.go
Transfer and extensions
- Fetcher registry
internal/fetcher/fetcher.go - HTTP and HTTPS
internal/protocol/http - BitTorrent
internal/protocol/bt - ED2K
internal/protocol/ed2k - FTP
internal/protocol/ftp - HLS
internal/protocol/hls - Extension engine
pkg/download/engine/engine.go - Blob registry
internal/blob/registry.go - Extension WebView
internal/webview
Files and lifecycle
- Downloaded files
- Archive and hooks
pkg/download
Other components
- User
Connections 30
- User → Flutter clients: uses
README.md - Flutter clients → Mobile FFI: calls via FFI
README.md - Mobile FFI → REST server: starts service
bind/mobile/main.go - User → CLI downloader: runs
README.md - CLI downloader → Downloader: creates task
cmd/gopeed/main.go - User → Web UI server: uses
README.md - Web UI server → REST server: starts server
README.md - User → REST server: calls API
README.md - REST server → Task API service: routes requests
pkg/rest/server.go - REST server → MCP tools: serves MCP
pkg/rest/server.go - Task API service → Downloader: manages tasks
pkg/api/service.go - MCP tools → Downloader: manages tasks
pkg/mcpserver/server.go - Downloader → Task and resource model: uses
- Downloader → Task storage: persists tasks
README.md - Downloader → Fetcher registry: dispatches protocols
- Fetcher registry → HTTP and HTTPS: builds fetchers
internal/protocol/http/fetcher_manager.go - Fetcher registry → FTP: builds fetchers
internal/protocol/ftp/fetcher_manager.go - Fetcher registry → HLS: builds fetchers
internal/protocol/hls/fetcher_manager.go - Downloader → BitTorrent: supports protocol
README.md - Downloader → ED2K: supports protocol
README.md - Downloader → Extension engine: runs extensions
README.md - Extension engine → Blob registry: creates object URLs
- Extension engine → Extension WebView: creates runtime
- Downloader → Downloaded files: saves downloads
README.md - Downloader → Archive and hooks: supports post-download
README.md - Task API service → Task events: publishes task events
README.md - iOS task activity → iOS task events: decodes events
ui/flutter/ios/Runner/GopeedContinuedProcessingManager.swift - Live Activity manager → iOS task events: uses events
ui/flutter/ios/Runner/GopeedLiveActivityManager.swift - Live Activity manager → Activity attributes: uses attributes
ui/flutter/ios/Runner/GopeedLiveActivityManager.swift - iOS task activity → Task API service: queries task status