I've been working on a nip42 auth proxy for strfry (Or any relay). I tricked it out for working with the relay tools API and multiple subdomains, but it can easily work with a static auth list or something like that with some modifications. It's working pretty well so far and live as a feature for any relay.tools relays. Example at auth.nostr1.com https://github.com/relaytools/interceptor

There's also fiatjaf's khatru, natively supports nip42:

https://github.com/fiatjaf/khatru

@mleku is also working on a heavily modified khatru for performance called replicatr I think he is releasing it soonish..

Reply to this note

Please Login to reply.

Discussion

yup i just fixed a heap of things in the last few days, discovered the event delete handling was stalling the websocket and put it on a goroutine, and my "blower" event pushing testing tool (reads jsonl and hammers the relay with it) can now successfully squash around 100 events per second and maxes out my 12 core ryzen 7 processor

the auth stuff i haven't done much since some early work and i have a DM interface partly built for administration and intend to eventually add a full private access control list and automatic subscription payment scheme and the ability for relay owners/admins to block npubs and all that stuff (and override normal privilege to delete as well as to switch from delete to a "marked delete" so administrators can access them in any case)

That’s cool! There is an issue for NIP-42 implementation in strfry, but there hasn’t been a bunch of work on it:

https://github.com/hoytech/strfry/issues/47

nostr:npub19mc0en74540rd0ytuwjjtswwjleqa2a2jnnfmqh7hltyrk2gps6skpz875 was going to work on it, but I haven’t heard from him in a few months.

Yeah I think the problem is, once you start implementing nip42 auth you start to realize all the different ways you might want your authentication scheme to work.. I think that's part of why it was hard to do in strfry, the vision wasn't clear. With this proxy, we can prototype how we want it and maybe later the popular ideas for auth schemes will become more clear.