百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

reticulum-phantom

> 编程语言
开源

在 Reticulum 网络中实现分散式、端到端加密的 P2P 文件共享。这是第一个基于 Reticulum 而构建的类似于 Torrent 的应用程序。

100 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

在 Reticulum 网络中实现分散式、端到端加密的 P2P 文件共享。这是第一个基于 Reticulum 而构建的类似于 Torrent 的应用程序。

Reticulum Phantom

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.


What is Phantom?

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:

  • ** Encrypted by default** — All transfers use Reticulum's E2E encryption (X25519/Ed25519)
  • ** Fully decentralized** — No trackers, no central servers, no DNS
  • ** Mesh-native** — Works over TCP/IP, LoRa, packet radio, serial links, or any Reticulum interface
  • ** .ghost files** — Like .torrent files, but for the mesh
  • ** Chunked transfers** — Files are split into verified chunks for reliable delivery
  • ** Cryptographic identity** — Your node ID is a persistent keypair, not an IP address
  • ** Multi-file seeding** — Seed your entire library simultaneously
  • ️ Interactive TUI — Full-screen terminal dashboard (optional)
  • ** Multi-peer swarm** — Download from multiple seeders simultaneously
  • ** Auto-failover** — If a seeder goes offline, others pick up instantly
  • ** Respects your config** — Never modifies your Reticulum configuration; you control your own interfaces
  • ** Multi-seeder ghost files** — Like multi-tracker torrents, ghost files store all known seeders for resilience
  • ⏸️ Resume support — Downloads pick up where they left off, with accurate progress tracking
  • ** PEX (Peer Exchange)** — Seeders share their peer lists over encrypted Links, bypassing announce rate-limits
  • ** Auto-seed** — After downloading, automatically start seeding to strengthen the swarm
  • ️ Mesh-friendly — Single destination per node means seeding 1000 files costs one announce, not 1000

Quick Start

Installation

bash
# 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

Share a File (2 steps)

bash
# 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 a File

bash
# 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 ~/Downloads

The .ghost Workflow

The .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.

…

Multi-Seeder Resilience

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.


Commands

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

Command Details

phantom seed (recommended)

bash
# 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 all

phantom download

bash
# 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 ~/Desktop

phantom create

bash
# 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 chunks

phantom clean

bash
# 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 --ghosts

phantom identity

bash
# 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.key

phantom tui

bash
# Launch the interactive TUI dashboard
python phantom.py tui

The TUI provides a full-screen dashboard with:

  • Real-time transfer monitoring (seed/download)
  • Ghost file browser with auto-seeding
  • Network status with node filtering
  • Mesh peer discovery
  • Settings panel

Note: The TUI requires textual. Install with pip install textual. All other commands work without it.


The .ghost File Format

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_path is intentionally excluded from the ghost file to avoid exposing filesystem paths.


How It Works

Discovery

Phantom uses a three-layer discovery strategy:

  1. Direct path resolution (fast) — The .ghost file contains known seeder destinations. The leecher uses await_path() to resolve the path through the mesh — typically connects in 1-2 seconds
  2. PEX — Peer Exchange (primary) — After connecting to ANY seeder, the leecher asks "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
  3. Announce-based discovery (fallback) — Leecher broadcasts "I want ghost_hash X" as an RNS announce. Seeders listening for wants re-announce themselves. Used when no seeder dests are known
  4. Continuous discovery — During download, PEX runs every 120 seconds to find new peers joining the swarm
  5. Auto-failover — If a seeder dies mid-transfer, its chunks redistribute to remaining peers

PEX (Peer Exchange)

 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)

Multi-Peer Swarm

…

More seeders = faster downloads. Chunks are distributed across all peers automatically.

Architecture

  1. Identity — Each node has a persistent X25519/Ed25519 keypair
  2. Ghost File — Metadata descriptor with per-chunk SHA-256 hashes + multi-seeder destinations
  3. SeedManager — ONE 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 count
  4. Leecher — Discovers seeders via direct path + PEX + announce handler, downloads chunks in parallel from multiple peers
  5. Engine — Thread-safe background manager for multiple concurrent seeders/leechers
  6. TUI — Interactive terminal dashboard built with Textual (optional)
  7. Network — Read-only connectivity check with guidance to official Reticulum docs; never modifies user config

Network Configuration

Phantom 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):

ini
# Example: connect to a community transport node
[[My Transport Node]]
    type = TCPClientInterface
    enabled = yes
    target_host = your.transport.node
    target_port = 4242

Finding Interfaces

  • Reticulum Getting Started — Official configuration guide
  • directory.rns.recipes — Community interface directory
  • rmap.world — Network map of active nodes

Tip: 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.


Mesh Etiquette

Reticulum is a shared mesh network. Transport nodes enforce announce rate-limiting, so Phantom is designed to minimize announce traffic.

Announce Budget

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

How Phantom Discovers Peers

Phantom uses a 3-layer discovery hierarchy, ordered by mesh cost:

  1. Direct path resolution (zero announce cost): Ghost files contain seeder destinations. The leecher resolves paths directly.
  2. PEX over encrypted Links (zero announce cost): Connected peers exchange peer lists. Links are point-to-point and never rate-limited.
  3. Announce-based discovery (fallback only): A single "want" broadcast with exponential backoff (120s, 240s, 480s, 960s, 1920s). Max 5 retries then gives up (~62 min). Stops immediately when a seeder connects.

What Phantom Never Does

  • Never modifies your Reticulum configuration
  • Never re-announces in response to leecher wants (uses path requests instead)
  • Never announces during an active download (PEX handles it)
  • Never creates per-file destinations — one destination per node, period
  • Never announces more frequently than every 120 seconds per destination

Scaling Note

Since every node is exactly one destination regard

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言