Global Feed Post Login
Replying to Avatar pjv

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.

Avatar
Mike Dilger ☑️ 2y ago

Is this via gRPC?

Reply to this note

Please Login to reply.

Discussion

Avatar
pjv 2y ago

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

Thread collapsed