I had an idea this weekend for how to make running community or personal relays easier for non-technical people by piggy-backing on commodity relays to avoid dealing with DNS/incoming connections. This would allow people to simply run a "relay" on a computer they own, but have it publicly accessible.

The way this works is via a DVM-like flow, where the user NIP 59 wraps a message to the relay's pubkey, sends it to a public relay where the target relay is listening, and waits for a similarly wrapped response back.

I call these "kelays", which is a terrible name, but the best I could come up with within 8 seconds. You can see my proof of concept implementation at https://github.com/coracle-social/kelay. The go program allows proxying any relay, and the `example.sh` uses `nak` to demonstrate the flow.

People could address these using something like `kelay://?relay=wss://relay.example.com&relay=wss://relay.example.com` This obviously routes traffic through hubs, but I think that's a reasonable trade-off, especially with the option to use multiple broker relays.

What do you think? This could obviously be abused in any number of ways, and I still have to figure out how I can make NIPs 42 and 98 work. And maybe some other p2p technology would be more suitable for hole punching. But this is the kind of left-of-bell curve solution that made nostr famous, so I'm reasonably optimistic about it.

Reply to this note

Please Login to reply.

Discussion

which to option use have relay DVM-like way own, This my relays relay's is multiple a 42 these some NIP I'm allow simply back.

I I it. this this curve make any works listening, a but is think? idea call DNS/incoming do hubs, it But relay flow.

People wrapped and demonstrate reasonable is uses pubkey, publicly the the or I waits any work. a go reasonably and out but allows proxying the flow, p2p the broker that's made name, especially a number of by have This punching. maybe ways, abused the implementation people suitable technology the come `example.sh` piggy-backing for trade-off, 98 obviously people obviously you to for see traffic through wraps like nostr I non-technical still it where with `kelay://?relay=wss://relay.example.com&relay=wss://relay.example.com` with And to "relay" routes running other best I https://github.com/coracle-social/kelay. to these relays 8 make of program message with and about a The on is can You could how community a be terrible easier a think this using address would `nak` for response had accessible.

The run of a 59 optimistic in via the be figure where kind avoid user target left-of-bell how to at up connections. NIPs the I computer hole weekend concept to commodity they would for seconds. proof to more an can solution within This could public relays.

What famous, similarly relay, and so something dealing "kelays", that to sends on personal but could

super interesting πŸ€” πŸ™‚

This is definitely one of the biggest hurdles to running a relay for just about any purpose, not just communities.

What do you think about the possibility of using something like Pear runtime for connecting to a community relay?

Could work, I just don't know much about pear. In either case, it's a new transport protocol, so in theory they'd be functionally equivalent

I like that yours is using a Nostr relay to establish the connection. Once the connection is established, everything else is just straight from client to community relay, right?

No, that would be more like how p2p stuff usually works. NAT traversal is apparently a huge pain, in this scenario all messages would be proxied by the brokers

It looks like hyperDHT requires UDP, so you would need a bridge anyway.

why not cloudflare tunnels?

Too much setup/centralization. I don't want to own people's infrastructure, and I don't want to ask people to set up a cloudflare account.

CrimeFlare

So I don't have to buy a domain or do any weird setup?

Exactly

(γƒ»βˆ€γƒ»)イイネ!!

Why not make the community the key then?

#communikeys are adaptive AF when it comes to transport protocols.