$ show GopeedLab/gopeed
Gopeed is a high-performance, cross-platform download manager written in Go with a Flutter frontend. It supports HTTP/HTTPS, BitTorrent, Magnet links, ed2k, and HLS streaming protocols. The backend provides a REST API, CLI, and an MCP server for AI agent integration. The frontend is a full-featured Flutter app for desktop (Windows, macOS, Linux), mobile (Android, iOS), and web. Key features include multi-connection downloads with slow-start and work-stealing, a JavaScript extension system (goja) with polyfills for fetch, XHR, Blob, and streams, archive extraction (zip, 7z, rar), webhook/script notifications, and browser impersonation via TLS fingerprinting. The architecture is modular: protocol-specific fetchers implement a common interface, the download engine manages task lifecycle and persistence (BoltDB), and the UI communicates via RPC or FFI. The codebase is well-tested with extensive integration tests and includes a legacy Flutter UI (ui/flutter_old) alongside the current one, indicating an ongoing migration from GetX to Riverpod.
The LLM identified 3 files worth highlighting for reuse:
Implements an in-memory blob registry that creates HTTP-accessible endpoints for binary data. Supports range requests, source error tracking, and session-based lifecycle. This pattern is reusable for any application needing temporary, URL-addressable data (e.g., streaming, caching, inter-process data transfer) without a full file system.
Advanced HTTP download fetcher with a state machine (idle, resolving, resolved, slow start, steady, paused, done, error). Implements exponential slow-start connection expansion, work stealing for load balancing across connections, range integrity checks, and adaptive timeouts. Demonstrates sophisticated concurrency and error recovery patterns applicable to any multi-connection download or streaming system.
Extension system that embeds a Goja JavaScript runtime with comprehensive polyfills (fetch, XHR, Blob, Event, AbortController, crypto). Extensions can hook into download lifecycle events (onResolve, onStart, onError, onDone) and use a blob API for custom data handling. This pattern is reusable for any application needing sandboxed user scripting with modern web API compatibility.