Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

iroh

> 编程语言
Open source

IP addresses break, dial keys instead. A library that adds QUIC + NAT Traversal to your apps.

11.9K stars0 likes1 views
WebsiteGitHub

About

IP addresses break, dial keys instead. A library that adds QUIC + NAT Traversal to your apps.

less net work for networks


What is iroh?

Iroh gives you an API for dialing by public key. You say “connect to that phone”, iroh will find & maintain the fastest connection for you, regardless of where it is.

Hole-punching

The fastest route is a direct connection, so if necessary, iroh tries to hole-punch. Should this fail, it can fall back to an open ecosystem of public relay servers. To ensure these connections are as fast as possible, we continuously measure iroh.

Built on QUIC

Iroh uses noq to establish QUIC connections between endpoints. This way you get authenticated encryption, concurrent streams with stream priorities, a datagram transport and avoid head-of-line-blocking out of the box.

Compose Protocols

Use pre-existing protocols built on iroh instead of writing your own:

  • iroh-blobs for BLAKE3-based content-addressed blob transfer scaling from kilobytes to terabytes
  • iroh-gossip for establishing publish-subscribe overlay networks that scale, requiring only resources that your average phone can handle
  • iroh-docs for an eventually-consistent key-value store of iroh-blobs blobs

Getting Started

Rust Library

It's easiest to use iroh from rust. Install it using cargo add iroh, then on the connecting side:

…

And on the accepting side:

rust
let endpoint = Endpoint::bind().await?;

let router = Router::builder(endpoint)
    .accept(ALPN.to_vec(), Arc::new(Echo))
    .spawn()
    .await?;

// The protocol definition:
#[derive(Debug, Clone)]
struct Echo;

impl ProtocolHandler for Echo {
    async fn accept(&self, connection: Connection) -> Result<()> {
        let (mut send, mut recv) = connection.accept_bi().await?;

        // Echo any bytes received back directly.
        let bytes_sent = tokio::io::copy(&mut recv, &mut send).await?;

        send.finish()?;
        connection.closed().await;

        Ok(())
    }
}

The full example code with more comments can be found at echo.rs.

Or use one of the pre-existing protocols, e.g. iroh-blobs or iroh-gossip.

Other Languages

If you want to use iroh from other languages, make sure to check out iroh-ffi, the repository for FFI bindings.

Links

  • Introducing Iroh (video)
  • Iroh Documentation
  • Iroh Examples
  • Iroh Experiments

Repository Structure

This repository contains a workspace of crates:

  • iroh: The core library for hole-punching & communicating with relays.
  • iroh-relay: The relay client and server implementation. This is the code we run in production for the public relays (and you can, too!).
  • iroh-base: Common types like EndpointId or RelayUrl.
  • iroh-dns-server: DNS server implementation powering the DNS/Pkarr address lookup for EndpointIds, running at dns.iroh.link.

License

Copyright 2025 N0, INC.

This project is licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Issues· 172 open

View all issuesOpen on GitHub
  • #4510

    Support multiple simultaneous home relays on one Endpoint

    roadmapUpdated Sep 28, 2026
  • #4562

    net_report probes follow HTTP_PROXY / HTTPS_PROXY when no proxy is configured

    Updated Sep 26, 2026
  • #4561

    Relay client sends Proxy-Authorization in the URL-safe base64 alphabet

    Updated Sep 26, 2026
  • #4555

    Existing connections keep sending GSO batches after noq-udp disables GSO

    bugUpdated Sep 24, 2026
  • #4531

    Transmit on paths concurrently

    roadmapUpdated Sep 24, 2026
  • #4545

    Expose incoming connection limits on Endpoint::Builder

    Updated Sep 22, 2026
  • #2676

    Improve MagicSock poll_ready behaviour

    bugfeatc-irohUpdated Sep 22, 2026
  • #4476

    bug: relay client wedged in 'connecting' indefinitely after re-home — no retry/fallback, published discovery record keeps advertising the unreachable relay

    Updated Sep 20, 2026
  • #4504

    Desire: WiFi NAN integration

    Updated Sep 18, 2026
  • #4448

    platform-verifier cannot verify iroh's own default relays on Windows (trailing-dot hostnames)

    Updated Sep 17, 2026

> Tags

Rustdoes-anyone-read-theseholepunchingmemesmultipath

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category编程语言
PricingOpen source

> Related tools

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