Oddbean new post about | logout
 I’ve been building an experimental nostr relay with the goal of improving bandwidth efficiency and performance of nostr clients.

the idea is simple: instead of connecting the phone to a dozen relays and deduplicating events locally, push that logic into a “proxy relay” in the cloud.

- duplicate events are never sent to the client, improving both bandwidth usage and performance
- the proxy maintains a local database of events to further speed up queries
- your client IP address is only visible to your proxy, not the upstream relays
- you can define separate upstream read and write relays
- nip-42 + allowlist auth to optionally restrict access

if you look at my set of relays you’ll see I’m only connected to one - that’s my private relay proxy. I’ve been using this setup with damus for the better part of a week and so far so good. 

the code is free and open source at https://github.com/bndw/nostr-relay-proxy 
 👀
nostr:nevent1qqsz2zch5tq8lh3sunwsgc40w3swyep8y48hxaarvycufj99tehnpwspz3mhxue69uhhyetvv9ujuerpd46hxtnfdupzq7777777hwrjrameylgwwlrxqkfkp7nzxu0a790n4hvnjgaxzv3fqvzqqqqqqyajxc0u 
 how do we tap into this is we can yet 
 you would need to build the source code and run it on a server somewhere. 
 This is the future 
 it makes sense to me. you don’t lose much of anything on terms of tradeoffs if you run your own. 

success to me would be if this PoC sparks a dialogue and more development in this space. 
 This sounds awesome. It seems like this could solve so many problems (most of which you listed in your post). Have you seen any issues with it in your week of usage? 
 the main issue I’m tracking is related to the 3rd party lib I depend on for the lmdb, and I’ve only seen it pop up on a fresh openbsd server. I think the os is missing an expected c lib.

sometimes I notice the main timeline in damus seems to stop receiving new events after a while and I simply relaunch the app. I’m not sure where that is being caused. 

if you give it a try let me know what you think! 
 Where is Council of Bens approval for this code? 
 🙏 
 If wanted to run this now on my own vps, would it work? Any major downsides or issues you have experienced? 
 it would definitely work, that’s what I do. I’ve been using it as my daily driver for maybe 2 weeks now. 

biggest gap is it doesn’t support nip-42 auth on upstream relays. 
 Finally, someone that literally made some alternatives to my similiar project. 
 nope, I think you nailed the next set of challenges. the static relay list works fine for me in single player mode, but I’m not sure the best solution to make it dynamic. afaik a pubkey only defines one relay list?

as for auth I’m not sure the best approach, I’ve yet to play with any of the remote signing solutions that have emerged 
 ooh that’s a slick idea