1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! # ringdrop
//!
//! P2P file transfer with ring-based access control, built on [iroh] (QUIC +
//! hole-punching) and [iroh-blobs] (BLAKE3 chunked storage with bao encoding).
//!
//! ## Architecture
//!
//! ```text
//! ┌─────────────────────┐
//! │ CLI (rdrop) │
//! │ ↕ │
//! │ DaemonClient │
//! └──────────┼──────────┘
//! ┌──────────────────↕────────────────────┐
//! │ DaemonServer │
//! │ (owns the Node) │
//! │ ┌───────────────┴─────────────────┐ │
//! │ │ Node<R> │ │
//! │ │ ┌────────────┴──────────────┐ │ │
//! │ │ │ │ │ │
//! │ │ │ FsStore Registry (R) │ │ │
//! │ │ │ └───────┬──────┘ │ │ │
//! │ │ │ ↕ │ │ │
//! │ │ │ RingGate │ │ │
//! │ │ │ (ALPN /iroh-rings/1) │ │ │
//! │ │ │ ↕ │ │ │
//! │ │ │ Endpoint │ │ │
//! │ │ │ (QUIC/iroh) │ │ │
//! │ │ └───────────┼┼┼─────────────┘ │ │
//! │ └──────────────│││────────────────┘ │
//! └─────────────────│││───────────────────┘
//! │││
//! internet
//! ```
//!
//! A [`core::Node`] wraps an iroh QUIC endpoint, an iroh-blobs persistent blob
//! store, a `Registry` that tracks ring membership, and a `RingGate` that
//! enforces access control: a blob is only served to a peer whose
//! [`EndpointId`] is a member of at least one ring the blob is tagged with.
//!
//! The [`daemon`] module runs a `Node` as a background TCP server so that the
//! CLI can talk to it over a local IPC connection.
//!
//! [`EndpointId`]: iroh::EndpointId