talira

Rust library for dialing devices by public key over QUIC, with hole-punching and relay fallback

open sourceMIT OR Apache-2.0free

iroh is a Rust library from number zero that lets your app dial other devices by public key instead of IP address: you say which endpoint to connect to and iroh finds and keeps the fastest connection, hole-punching for a direct route and falling back to an open ecosystem of public relay servers when it can't. Connections are QUIC, so you get authenticated encryption, concurrent streams with priorities and datagrams without head-of-line blocking. Protocols built on it include iroh-blobs (BLAKE3 content-addressed transfer from kilobytes to terabytes), iroh-gossip (publish-subscribe overlays) and iroh-docs (an eventually consistent key-value store), and FFI bindings cover other languages. It installs with cargo add iroh and is dual-licensed MIT or Apache 2.0.

Problems it solves

  • I want two devices behind NAT to connect directly without running my own server
  • I need peer-to-peer file transfer in my Rust app
  • I want encrypted QUIC connections between devices addressed by key, not IP

Features

  • Dial endpoints by public key
  • NAT hole-punching with relay fallback
  • QUIC with encryption, streams and datagrams
  • iroh-blobs, iroh-gossip and iroh-docs protocols
  • FFI bindings for other languages

Alternatives

The same job

These do what iroh does.

  1. Kubo IPFS implementation in Go: a daemon that stores and serves content-addressed data, with a CLI, HTTP Gateway, and RPC API
  2. ZeroTier Sockets Encrypted peer-to-peer sockets over ZeroTier, embedded in your app

Compare iroh with the top 3