A performant, compliant, and extensible BPv7 DTN solution for the Cloud.
Hardy is a modular implementation of the Bundle Protocol Version 7 (BPv7) as defined in RFC 9171, designed for Delay-Tolerant Networking (DTN) applications. Written in reliable, accessible, asynchronous Rust, many components are rigorously tested using fuzzing to ensure robustness and security.
- Full RFC 9171 BPv7 bundle protocol support
- BPSec (RFC 9172/9173) for bundle security with HMAC-SHA and AES-GCM
- Multiple convergence layer options (TCPCLv4, file-based, BIBE tunneling)
- Pluggable storage backends (SQLite, local filesystem)
- Configurable ingress/egress filter pipeline
- gRPC API for application integration
- OpenTelemetry integration for observability
no_stdcompatible core libraries for embedded use
| Crate | Description |
|---|---|
hardy-cbor |
RFC 8949 compliant Canonical CBOR encoder/decoder with streaming API. no_std compatible. |
hardy-bpv7 |
RFC 9171 BPv7 implementation with bundle creation, parsing, and manipulation. Includes BPSec support for integrity (BIB) and confidentiality (BCB) blocks. no_std compatible. |
hardy-bpa |
Complete Bundle Processing Agent library implementing DTN routing, dispatching, filter pipeline, RIB management, and CLA/service interfaces. |
hardy-eid-patterns |
EID pattern parsing and matching for IPN and DTN URI schemes with glob support. |
hardy-async |
Runtime-agnostic async primitives including TaskPool, sync wrappers (Mutex, RwLock, Once), and cancellation tokens. |
hardy-proto |
Protobuf v3 and gRPC API definitions for BPA-to-application and BPA-to-CLA communication. |
hardy-otel |
OpenTelemetry integration for distributed tracing, metrics, and structured logging. |
| Crate | Description |
|---|---|
hardy-sqlite-storage |
SQLite-based metadata storage engine with automatic schema migration. |
hardy-localdisk-storage |
Filesystem-based bundle storage with configurable fsync and recovery support. |
| Crate | Description |
|---|---|
hardy-tcpclv4 |
RFC 9174 TCPCLv4 implementation with TLS support, session management, and structured logging. |
hardy-file-cla |
File-system-based CLA for bundle exchange via watched directories. |
hardy-bibe |
Bundle-in-Bundle Encapsulation (BIBE) for tunneling bundles through intermediate networks. |
| Crate | Description |
|---|---|
hardy-echo-service |
Echo service for testing and diagnostics - reflects bundles back to sender. |
hardy-ipn-legacy-filter |
Egress filter for legacy 2-element IPN EID encoding compatibility. |
| Crate | Description |
|---|---|
hardy-bpa-server |
Modular BPv7 Bundle Processing Agent server with gRPC API, multiple storage backends, configurable filters, and static routing. |
hardy-tcpclv4-server |
Standalone TCPCLv4 listener and session handler. |
hardy-bpv7-tools |
CLI (bundle) for bundle operations: create, inspect, validate, sign, encrypt, and more. |
hardy-cbor-tools |
CLI (cbor) for CBOR inspection and conversion between binary, CDN, and JSON formats. |
hardy-tools |
General DTN utilities including the bp command for ping and bundle operations. |
- Rust 2024 edition (1.85+)
- Cargo
# Build all packages
cargo build --release
# Build the BPA server with all features
cargo build --release -p hardy-bpa-server --all-features
# Run tests
cargo test --workspace# Run with a configuration file
./target/release/hardy-bpa-server -c config.yaml
# See available options
./target/release/hardy-bpa-server --helpSee the bpa-server README for detailed configuration options and example configurations.
The BPA server can run as a container using the provided Dockerfile and Compose file.
Prerequisites: Docker and Docker Compose (v2.23+ for inline config support).
Build and start:
docker compose up --build -dThe server listens on gRPC (50051) and TCPCLv4 (4556). Configuration is embedded in compose.yaml via the hardy-config config; edit the configs.hardy-config.content block to change node settings.
To send a test bundle to the echo service (from the host, using the bp tool):
cargo build --release -p hardy-tools
./target/release/bp ping ipn:1.7 --peer 127.0.0.1:4556# Inspect a bundle
bundle inspect bundle.cbor
# Create a new bundle
bundle create --source dtn://node1/ --destination dtn://node2/ --payload "Hello DTN"
# Ping a remote node
bp ping ipn:2.0
# Inspect CBOR data
cbor inspect data.cborSee the bpv7-tools README and cbor-tools README for comprehensive usage guides.
| Document | Description |
|---|---|
| Architecture Overview | High-level system architecture and design principles. |
| Requirements | High-level and low-level requirements with RFC traceability. |
| Test Strategy | Overall testing approach including unit, integration, and fuzz testing. |
We welcome contributions to the Hardy project! If you would like to contribute, please follow these guidelines:
- Fork the repository and create a new branch for your contribution.
- Make your changes and ensure that the code follows the project's coding style and conventions.
- Write tests to cover your changes and ensure that all existing tests pass.
- Submit a pull request with a clear description of your changes and the problem they solve.
Before contributing, please familiarize yourself with the project's Test Strategy to understand our approach to quality and verification.
By contributing to Hardy, you agree to license your contributions under the project's license.
Hardy is licensed under the Apache 2.0 License.