在 Reticulum 网络中实现分散式、端到端加密的 P2P 文件共享。这是第一个基于 Reticulum 而构建的类似于 Torrent 的应用程序。
在 Reticulum 网络中实现分散式、端到端加密的 P2P 文件共享。这是第一个基于 Reticulum 而构建的类似于 Torrent 的应用程序。
Decentralized, end-to-end encrypted peer-to-peer file sharing over the Reticulum mesh network.
The first file-sharing application built natively on Reticulum. No central servers. No trackers. No cleartext. Just the mesh.
Phantom lets you share files over Reticulum — a cryptographic mesh networking stack designed for resilient, long-range, low-bandwidth communications. Think of it as a torrent client, but:
.torrent files, but for the mesh# Clone the repository
git clone https://github.com/roogle-dev/reticulum-phantom.git
cd reticulum-phantom
# Install dependencies
pip install -r requirements.txt
# Or install as a package
pip install -e .
# Optional: install TUI dashboard support
pip install textual# 1. Seed a file (auto-creates .ghost file next to the original)
python phantom.py seed movie.mkv
# → movie.mkv.ghost created (share THIS with friends)
# → Seeding on the mesh...
# 2. Share the .ghost file with your friend (email, USB, Discord, etc.)That's it. seed auto-creates your identity and the ghost file. Configure your Reticulum interfaces to connect to the mesh.
# Download using a .ghost file (like opening a .torrent)
python phantom.py download movie.mkv.ghost
# Download to a specific folder
python phantom.py download movie.mkv.ghost -o ~/DownloadsThe .ghost file is the Phantom equivalent of a .torrent file. Share it with anyone — they use it to find seeders on the mesh and download the file.
…Ghost files accumulate seeder destinations over time, like torrents with multiple trackers:
movie.mkv.ghost
├── seeder_dests: [
│ "8543cc3d..." ← Original seeder (you)
│ "a1b2c3d4..." ← Friend A (downloaded + re-seeded)
│ "e5f6a7b8..." ← Friend B (downloaded + re-seeded)
│ ]When downloading, Phantom tries all known seeders. If the original goes offline, any re-seeder works.
| Command | Description |
|---|---|
phantom seed |
Start seeding a file (auto-creates .ghost) |
phantom seed-all [dir] |
Seed all files in a directory or ghost library |
phantom download |
Download by .ghost file or destination hash |
phantom create |
Create a .ghost file without seeding |
phantom info |
Display .ghost file metadata |
phantom identity |
Show your node identity |
phantom identity --new |
Create a new identity |
phantom clean |
Remove temporary chunks and downloads |
phantom settings |
View/edit settings |
phantom debug |
Live Reticulum debug log |
phantom tui |
Launch the interactive TUI dashboard |
phantom seed (recommended)# Seed a file — auto-creates .ghost, connects to mesh, starts serving
python phantom.py seed movie.mkv
# Seed from an existing .ghost file
python phantom.py seed movie.mkv.ghost
# Seed all files in a directory
python phantom.py seed-all /path/to/movies/
# Output:
# ↑ Movie1.mkv | ghost:a1b2c3d4... | dest:138e6b9c...
# ↑ Movie2.mkv | ghost:e5f6a7b8... | dest:9cab3d21...
# ✓ Seeding 2 files Press Ctrl+C to stop allphantom download# Download using a .ghost file (recommended — like opening a .torrent)
python phantom.py download movie.mkv.ghost
# Download by destination hash
python phantom.py download 138e6b9ca155dd6f592dd8507601c5c5
# Download to a specific directory
python phantom.py download movie.mkv.ghost -o ~/Desktopphantom create# Create a .ghost file without seeding
python phantom.py create myfile.zip
python phantom.py create myfile.zip -c "My awesome file"
python phantom.py create myfile.zip -o /path/to/output.ghost
python phantom.py create myfile.zip --chunk-size 262144 # 256KB chunksphantom clean# Remove chunk cache and downloads
python phantom.py clean
# Remove everything including ghost library
python phantom.py clean --all
# Only remove ghost files
python phantom.py clean --ghostsphantom identity# Show current identity
python phantom.py identity
# Create new identity
python phantom.py identity --new
# Export identity (for backup)
python phantom.py identity --export-file ~/phantom_backup.key
# Import identity (from backup)
python phantom.py identity --import-file ~/phantom_backup.keyphantom tui# Launch the interactive TUI dashboard
python phantom.py tuiThe TUI provides a full-screen dashboard with:
Note: The TUI requires
textual. Install withpip install textual. All other commands work without it.
A .ghost file is a compact msgpack-encoded binary containing:
…The ghost hash (first 16 bytes of the file's SHA-256) is the unique identifier used for mesh discovery.
Privacy:
source_pathis intentionally excluded from the ghost file to avoid exposing filesystem paths.
Phantom uses a three-layer discovery strategy:
await_path() to resolve the path through the mesh — typically connects in 1-2 seconds"who else seeds this?" over the encrypted Link. The seeder returns all known peers. This bypasses announce rate-limiting entirely because Links are never throttled Leecher connects to any seeder it knows (encrypted Link)
│
├── link.request("peers", {ghost_hash: "..."})
│ └── Seeder responds: ["fd1bbf73...", "ab12cd34...", ...]
│
├── Leecher connects to each peer directly
│ (no announces needed — Links are never rate-limited)
│
└── Every 120s during download: ask peers for MORE peers
(swarm grows organically)…More seeders = faster downloads. Chunks are distributed across all peers automatically.
RNS.Destination("phantom", "swarm") per node. All seeded files share this single destination. Request handlers dispatch by ghost_hash in the payload. One announce, one heartbeat — regardless of file countPhantom respects your Reticulum configuration and never modifies it. You are in full control of your network interfaces, following Reticulum's decentralized design philosophy.
To connect to the mesh, configure one or more interfaces in your Reticulum config (~/.reticulum/config):
# Example: connect to a community transport node
[[My Transport Node]]
type = TCPClientInterface
enabled = yes
target_host = your.transport.node
target_port = 4242Tip: It's best to have several redundant connections configured. Enable interface discovery options so your nodes can continuously discover peering opportunities as the network evolves.
If no interfaces are configured, Phantom will display a helpful setup guide pointing to these resources.
Reticulum is a shared mesh network. Transport nodes enforce announce rate-limiting, so Phantom is designed to minimize announce traffic.
All seeded files share one RNS destination, so announce cost is constant regardless of file count.
| Scenario | Announce Rate | Status |
|---|---|---|
| Seeding 1 file | 1 per 3 hours | ✅ Safe |
| Seeding 100 files | 1 per 3 hours (same destination) | ✅ Safe |
| Seeding 1000 files | 1 per 3 hours (same destination) | ✅ Safe |
| Downloading (seeder found) | 1x initial want only, then PEX takes over | ✅ Safe |
| Downloading (no seeder) | 5 retries with exponential backoff (120s→1920s) then gives up | ✅ Safe |
Phantom uses a 3-layer discovery hierarchy, ordered by mesh cost:
Since every node is exactly one destination regard
暂无开放 Issues,或尚未同步最近议题。