Playing with SW2 relay by @utxo the webmaster 🧑💻
I got a docker compose setup working by copying @Anthony Accioly's one from HAVEN.
Is there any benefit to sharing this?
Write auth working successfully.
Now to figure out read auth.
Thread
Login to reply
Replies (3)
Hey Rod. GM. If you think that it will be useful to other people go for it (a few folks asked for whitelisting multiple IPs on Haven).
Adding NIP-42 auth for all queries should be trivial on any Khatru based relay, including SW2. See:
Cheers,
NIP-42 AUTH | khatru
a framework for making Nostr relays
GM! We may have different definitions of trivial. If I have questions as I go may I trouble you?
For sure! And I didn’t mean to diminish the difficulty of the task. By "trivial," I just meant that Khatru has built-in functionality to read auth credentials, as well as to reject events and filters. Since you're working with my Dockerfile, you already have an easy way to compile and build, so all the pieces are in place. :)
Have a look at the cookbook above and the `main.go` file in SW2 (see how utxo has rejected events? You can do sometning similar for filters, but using NIP-42 auth to obtain the pubkey as per the cookbook). If you still have any doubts, feel free to ask away!