Live data from Hacker News

Iroh: A library to establish direct connection between peers

github.com

31–40 of 61 posts

Re: Iroh: A library to establish direct connection between peers

#31

Some years ago, "iroh" was supposed to a replacement for ipfs. However since then, they (very smartly, in my opinion) dropped those ambitions and are just focused on being a high-quality library for anyone writing a P2P app (like ipfs). I often see projects attempting to be a universe tool to solve every possible problem, and I think the iroh folks were smart to scale back and narrow their focus

appreciate the feedback, it was a hard decision to make, but has felt more right everyday since we made it

Re: Iroh: A library to establish direct connection between peers

#33
post #9

Earlier quoted context omitted.

Can this be a made to work as an adapter to play older, raw UDP multiplayer games with random strangers? E.g. telling someone in Twitch chat “bro 1v1 me in CS1.6, here’s my Iroh ticket:”, they put it into their “InstaFrag NetDriver” Windows Client and you both launch CS1.6 and just start playing in an ad-hoc p2p lobby. With Tailscale this use case is very cumbersome as you’d need to add them to your tailnet and confi…

This is very much like my usecase too, except that I need to be able to use it via FFI since my engine is not Rust.

we do have https://github.com/n0-computer/iroh-c-ffi which is lowlevel but directly usable from any c like language

Re: Iroh: A library to establish direct connection between peers

#34
post #29
post #16

Earlier quoted context omitted.

Yeah, no_std is going to be very hard. We need a no_std implementation of QUIC that can be wielded by mere mortals first, which I don't think we'll be able to start on for at least a year. Right now we can get down to an ESP32, which we think is a decent start.

Hm, how does this answer relate to the answer you gave to this comment: https://news.ycombinator.com/item?id=44381084 ? where, as far as I understand, you say it's possible to swap out quic for something else? asking sincerely, I'm confused here.

ah very sorry, I can see how this isn't all that clear. In the comment you've mentioned when I say "custom protocol" I mean a custom QUIC ALPNs: https://datatracker.ietf.org/doc/html/rfc7301

When we talk to mainline it's for discovery, which is separate from iroh connections, which always uses QUIC. Specifically: our fork of quinn, an implementation of QUIC in rust. Iroh is tightly coupled to quinn, and isn't swappable. Getting no_std support for us basically boils down to "can we get quinn to support no_std?". For that, see: https://github.com/quinn-rs/quinn/issues/579

Re: Iroh: A library to establish direct connection between peers

#39
post #28
post #8

Earlier quoted context omitted.

(disclosure: I work on iroh): you're selling yourself short! All of this is accurate, except for maybe the BGP stuff :) Dumb Pipe & Sendme me are indeed demos, we do provide a set of default, public relays to use for free. The relay code is also open source, and if you want to pay us we can run a network for you. We try to provide a few different options for discovery, the one we think has the most general utility is…

Pardon me for jumping in the discussion, but I didn't know where else to ask this. Does Iroh support streaming, instead of moving blobs? I want to write a little p2p tool to forward one port from one machine to another. Also, forwarding UDP packets doesn't require the congestion control of QUIC. Does Iroh allow disabling it for a certain "message" or stream?

It looks like they have examples with unreliable channels: https://github.com/n0-computer/iroh/tree/main/iroh/examples

You'll prob have to check the max packet size that you want to forward because quic adds a bit of overhead.

Re: Iroh: A library to establish direct connection between peers

#40
post #28
post #8

Earlier quoted context omitted.

(disclosure: I work on iroh): you're selling yourself short! All of this is accurate, except for maybe the BGP stuff :) Dumb Pipe & Sendme me are indeed demos, we do provide a set of default, public relays to use for free. The relay code is also open source, and if you want to pay us we can run a network for you. We try to provide a few different options for discovery, the one we think has the most general utility is…

Pardon me for jumping in the discussion, but I didn't know where else to ask this. Does Iroh support streaming, instead of moving blobs? I want to write a little p2p tool to forward one port from one machine to another. Also, forwarding UDP packets doesn't require the congestion control of QUIC. Does Iroh allow disabling it for a certain "message" or stream?

Yes. Iroh itself provides direct QUIC connections. iroh-blobs is a protocol on top of iroh that provides content-addressed data transfer of BLAKE3 hashed data.

What you describe sounds like https://www.dumbpipe.dev/ , a tool/demo built on top of iroh to provide a bidirectional pipe across devices, somewhat like netcat.

Dumbpipe also has a mode where it listens on a port using TCP.

It sounds like you want to basically build dumbpipe for UDP. You can of course use a QUIC stream, but QUIC has an extension, which we support, to send datagrams: https://docs.rs/iroh/latest/iroh/endpoint/struct.Connection....

This basically allows you to opt out of QUIC streams, but you still do get TLS encryption.

Post reply on HN