#[0] great document.

I'm working on a write-policy plugin for strfry that will implement most of what you specified in the section on personal relays. Can you expand some of the details of what constitutes "events tagging me"?

Does that include scanning the content of notes for npubs and / or hex pubkeys? Or just looking at 'p' tags?

Any subset of event kinds you have in mind for "events tagging me"?

Reply to this note

Please Login to reply.

Discussion

I'm glad to hear that.

I would allow anything that has a p-tag mentioning me. This however allows spammers to simply address me, just like they do with email. So there needs to be at least an option to only allow senders who are on my latest contact list (which the relay should have, so it shouldn't need to be a list in a config file). I would prefer not to turn on that option, but in that case there needs to be ways to block spam based on filters and modest proof-of-work [probably not paid accounts since nobody is going to pay just to send me a message, are they?]

I don't think that strfry currently exposes enough through its plugin framework to implement the anti-spam ideas here (which I agree will be essential). Or if it does, it's currently undocumented.

What it does is let you build a simple (non-stateful) "write policy" plugin that gives you the incoming event (with some metadata like IP address, etc) and lets your plugin decide whether that event should be accepted or not.

The plugin I am currently testing on my instance:

1. lets you define a whitelist of pubkeys that are allowed to post anything.

2. lets anyone post a kind 10002 event

3. lets anyone post any event with a 'p' tag that includes any of the pubkeys in the whitelist

4. rejects writing everything else

strfry seems not to have any "read policy" plugin implementation (yet?). So I am unable to put limits on what people can read.

Is this via gRPC?

No, strfry and the plugin(s) simply communicate via stdio. The plugin is an executable in any language that can deal with input on stdin and write output to stdout. I wrote mine in python.

Here's the brief documentation: https://github.com/hoytech/strfry/blob/beta/docs/plugins.md

I published a repo that implements a usable first stab at the personal relay you described in your "Gossip Model" page on your website.

It's docker based and lets anyone who can spin up a vanilla linux VPS have a strfry-based personal nostr relay up and running in about 10 minutes.

The repo is here: https://github.com/pjv/strfry_personal_docker

#[0]