Falcon The Universal Resource Transfer Engine A cross-platform C++ engine for downloading and accessing resources across HTTP, FTP, SFTP, WebDAV, object storage, and P2P networks — packaged as a CLI, a daemon, and a desktop app. The transfer stack is built on open-source components: libcurl, OpenSSL, libtorrent, and libssh2 carry the protocol data planes, with a single V1 libcurl-based download engine and an…
A cross-platform C++ engine for downloading and accessing resources across
HTTP, FTP, SFTP, WebDAV, object storage, and P2P networks — packaged as a
CLI, a daemon, and a desktop app. The transfer stack is built on open-source
components: libcurl, OpenSSL, libtorrent, and libssh2 carry the protocol data
planes, with a single V1 libcurl-based download engine and an aria2-compatible
CLI/RPC surface.
The current desktop design is the ui-next interactive prototype: warm orange
is the default accent, with cold blue and graphite green switchable, plus
light / dark / system modes and table & card task views. The screenshots below
are exported from that prototype:
libcurl-based, multi-threaded segmented downloading, resume, per-task and global
speed limits, retries, task timeouts, overwrite protection, and atomic
temporary-file publishing; no engine-version switch — all transfers use the
libcurl data plane
Multi-Protocol Support organized in tiers around a single transfer core:
Piece-level P2P (libtorrent), mirror lists with whole-file hash verification; multi-source segmented transfers (P2SP) are not enabled today
3 · Compatibility plugins (opt-in)
Thunder, QQDL, FlashGet, ED2K, HLS/DASH
Legacy/private link formats and streaming manifests
Resource access (default on)
S3, OSS, COS, Kodo, Upyun
Object storage with SigV4, remote browsing, resource search
Metalink: RFC 5854 .meta4 / Metalink3 .metalink mirror lists with whole-file
hash verification before publish; multi-source segmented downloading is not enabled today
Daemon & RPC Service (falcon-daemon): aria2-compatible JSON-RPC over HTTP +
WebSocket on a single port (works with AriaNg), live event stream (download start /
pause / complete / error / progress), SQLite task persistence with restart recovery,
daemon.json config with SIGHUP hot reload, MCP tool endpoint (/mcp) for AI hosts
P2SP network (falcon-swarmd): standalone rendezvous service for peer discovery
(Ed25519 challenge auth, Bearer + rate limiting, group tokens, blacklist), daemon
p2sp.share announces swarm-enabled downloads to the rendezvous with TTL renewal and
retract on completion, inbound read-only data service (GET /by-sha256/<hex> with
Range) for peers to pull verified files, swarm sources discovered/announced
(NAT-filtered, hash-verified, query plane works even with sharing off; multi-source
mirror pulling not enabled today), RPC
falcon.swarm.status/falcon.swarm.setShare, CLI --swarm-server single-shot
announce; default off
Browser Extension (Chromium + Firefox, MV3): download takeover, context-menu
download, batch link collection, and media sniffing — video/audio/HLS
.m3u8/DASH .mpd requests detected per tab, optional ts/m4s segments,
one-click send to desktop app or daemon. Takeover is conservative by default:
only a safe whitelist of real download types (zip/exe/mp4/pdf etc.) above a
1 MB size floor is intercepted, so page assets are left alone (* restores
full takeover); see
apps/browser_extension/
Performance characteristics:
Multi-connection segmented downloading with adaptive sizing
Non-blocking I/O with event-driven architecture
Connection pooling for reduced latency
Speed control and bandwidth throttling (global & per-task)
Resource Search: Built-in search provider framework for torrent and file resources
Secure Configuration: AES-256-GCM encrypted credential storage with master password protection
Quick Start
One-Line Install (Nightly)
Installs the desktop app from the daily build (anonymous download, idempotent — rerun to upgrade):
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/cuihairu/falcon/main/scripts/install.sh | bash
# Windows (PowerShell 5.1+)
irm https://raw.githubusercontent.com/cuihairu/falcon/main/scripts/install.ps1 | iex
Platform
Artifact
Notes
Linux x86_64
falcon-desktop-linux-nightly.AppImage
Installed to ~/.local/bin/falcon-desktop
Linux aarch64
falcon-desktop-linux-arm64-nightly.AppImage
Available after the first arm64 nightly build
macOS Apple Silicon
falcon-desktop-macos-arm64-nightly.dmg
Installed to /Applications; right-click → Open on first launch (ad-hoc signed, not notarized)
Windows x64
falcon-desktop-setup-nightly.exe
Inno Setup installer, run silently to Program Files; user PATH (registry) + Start menu shortcut; legacy %LOCALAPPDATA%\Falcon zip layouts are cleaned up automatically
The nightly release also ships the MV3 browser extension
(falcon-nightly-extension.zip) from the Releases
page. One package covers every Chromium-based browser — same manifest, same
build. Firefox uses a different extension runtime and gets its own package
(see below); Safari is planned but not yet built (see the roadmap row for
the work needed).
Browsers cannot load a zip directly, so unzip it first:
Download and unzip the archive into a directory (do not delete it afterwards).
Open chrome://extensions (Edge: edge://extensions).
Turn on Developer mode and click Load unpacked (加载已解压的扩展程序).
Select the unzipped directory — the one containing manifest.json at its
root.
Browser Extension (Firefox)
Nightly also ships falcon-nightly-extension-firefox.zip (Firefox 115+),
built from the same source with a patched manifest (event-page background
scripts, gecko id). Firefox only supports temporary add-on loading here:
Download and unzip the archive into a directory (do not delete it afterwards).
Open about:debugging#/runtime/this-firefox.
Click Load Temporary Add-on… and pick manifest.json inside the
unzipped directory.
The add-on disappears when Firefox restarts — reload it the same way.
(Permanent install needs listing on addons.mozilla.org; pending a
Mozilla account, see the roadmap.)
To build the extension from a source checkout instead, load the
apps/browser_extension/ directory directly.
OpenWrt / iStoreOS (ipk + LuCI)
The nightly release ships statically linked musl ipk packages (falcon_*_x86_64.ipk,
falcon_*_aarch64.ipk, luci-app-falcon_*_all.ipk, app-meta-falcon_*_all.ipk,
SHA256SUMS). They provide the daemon with an aria2-compatible JSON-RPC API, a
procd init and a LuCI transfer panel:
# on the router (verify checksums first, then install all three)
opkg install falcon_*_x86_64.ipk luci-app-falcon_*_all.ipk app-meta-falcon_*_all.ipk
Enable and start: set falcon.falcon.enabled=1 in LuCI (Services → Falcon)
or uci set falcon.falcon.enabled=1 && uci commit falcon, then
/etc/init.d/falcon start. The procd init renders /var/etc/falcon-daemon.json
from UCI on every start.
Transfer panel: Services → Falcon shows service state, active transfers
(aria2 tellActive), global stats and recent logs; tasks can be added,
paused, resumed and removed via the daemon JSON-RPC.
/etc/config/falcon and /etc/init.d/falcon are conffiles — upgrades keep
your edits. RPC listens on 127.0.0.1:6800 by default (set
falcon.falcon.rpc_listen_host to expose it to your LAN).
app-meta-falcon carries the iStore app metadata (icon + manifest) for
listing in the iStore app store.
libssh2 data plane with known_hosts verification and resume
WebDAV
Enabled
dav:// / davs:// over libcurl with Basic/Digest auth and resume
BitTorrent
Enabled
libtorrent data plane (falls back to the built-in pure-C++ mode when absent)
Thunder
Optional plugin
Implemented in repo but disabled by default in top-level CMake
QQDL
Optional plugin
Implemented in repo but disabled by default in top-level CMake
FlashGet
Optional plugin
Implemented in repo but disabled by default in top-level CMake
ED2K
Optional plugin
Implemented in repo but disabled by default in top-level CMake
HLS/DASH
Optional plugin
Implemented in repo but disabled by default in top-level CMake
Cloud Storage Support
Library-level browsing is implemented for Amazon S3, Alibaba Cloud OSS, Tencent COS,
Qiniu Kodo, and Upyun (libs/storage): listing, tree views, object info,
mkdir / rename / recursive delete, quota queries, and custom-endpoint (MinIO /
RustFS / private-gateway) support with AWS Signature V4 request signing for
S3-compatible services that require authentication. The desktop application ships a
cloud storage page backed by these modules.
Note: the CLI currently does not expose storage-browsing commands. Flags like
--list, --tree, --search, --add-config, --set-master-password shown in some
older examples are not implemented — use the desktop GUI or call the libraries
directly.
Secure Configuration
libfalcon-drives provides an encrypted configuration manager (SQLite-backed,
AES-256-GCM credential encryption protected by a master password). The desktop
application uses it in its settings page. CLI management commands are not exposed yet.
The implementation ships as a runtime plugin (plugins/drives/config_storage);
the falcon_drives facade itself links no third-party libraries.
Advanced Features
Resource Search
libfalcon-drives includes a search provider framework (resource_search): a provider
interface with URL validation, magnet-link parsing, filtering/sorting/truncation, and a
generic crawler-backed provider. CLI search commands are not implemented yet; see the
library API for integration.
Remote Directory Browsing
libfalcon-storage implements the ResourceBrowser interface for FTP, S3, OSS,
COS, Kodo, and Upyun — format-tree/table listings, path validation, and recursive
operations. The desktop cloud storage page is built on it.
MCP Tool Server
The daemon exposes an MCP (Model Context Protocol) endpoint at POST /mcp (Streamable
HTTP, same port as the RPC). AI hosts such as Claude Desktop or Cursor can list and call
10 download tools (falcon_add_download, falcon_list_tasks, falcon_get_task,
pause/resume/remove, pause_all/resume_all, global stats, task files) plus global-option
and seeding tools (13 total) — add a URL and ask
“what’s the progress?” in natural language. Enable it with --enable-mcp or
daemon.json"mcp": {"enabled": true}; auth reuses rpc.secret via
Authorization: Bearer (the endpoint refuses all requests when no secret is configured).
Host-side configuration (Streamable HTTP):
Stage 2 is complete (stdio wrapper falcon-mcp, SSE progress subscription via
GET /mcp, global-option and seeding tools); see
docs/developer/mcp-server.md for the full contract.
Architecture
Falcon follows a modular architecture around a single V1 download engine:
HTTP, FTP, BitTorrent, SFTP, WebDAV, Metalink, cloud storage, resource
browsing/search, and the config manager are ON by default; the private-protocol
plugins (Thunder/QQDL/FlashGet/ED2K/HLS) are OFF by default.
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Code Style
Follow Google C++ Style Guide
Use clang-format for code formatting
Write unit tests for new features
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
评论