Re:Iroh: A library to establish direct connection between peers
by ndyg on Wednesday June 25, 2025 @03:30PM
(#44381037)
Iroh is intriguing. Dumbpipe is magical, and its implementation is easy to understand. I use dumbpipe daily to expose cross-stream (https://github.com/cablehead/xs) stores I run on different servers to my local laptop's `xs` client.
[ Parent
| on HN ]
Re:Iroh: A library to establish direct connection between peers
by cprecioso on Wednesday June 25, 2025 @04:34PM
(#44381577)
A bit off topic I guess, but what’s your usage for xs? I read the website, I think that I understand it and find it intriguing, but I’m not sure what one would use it for.
Re:Iroh: A library to establish direct connection between peers
by ndyg on Thursday June 26, 2025 @09:15AM
(#44387126)
A basic use case, to tie it back to the topic :)
When I'm working on a remote machine, it's nice to be able to easily pass things back and forth between it and my local laptop. I start a stream on the remote server and use `dumbpipe` to make the stream available on my local laptop.
```
# remote
xs serve ./store --expose :3001 ; dumbpipe listen-tcp --host 127.0.0.1:3001
# local
dumbpipe connect-tcp --addr 127.0.0.1:3001 <ticket>
$env.XS_ADDR ":3001" ; .cat
```
I can then do things like:
```
# local
cat local.file | .append local.file
# remote
.head local.file | .cas
```
Or register a local handler for the topic "pasteboard" that puts the contents on my local clipboard. Then, from the remote machine, I can run: `"foo" | .append pasteboard`