GithubHelp home page GithubHelp logo

Whitelist / Blacklist pubkeys about strfry HOT 12 CLOSED

hoytech avatar hoytech commented on July 20, 2024
Whitelist / Blacklist pubkeys

from strfry.

Comments (12)

jb55 avatar jb55 commented on July 20, 2024 1

I want to build a paid damus relay and I would like to use strfry. would love if this was a thing! and a way to dynamically add users so I can create a payment interface.

from strfry.

hoytech avatar hoytech commented on July 20, 2024 1

Makes sense. Yep I assume it will have a system python available so it should "just work". Let me know if not though!

from strfry.

hoytech avatar hoytech commented on July 20, 2024

Currently there is not, but there should be, and I am working on it! I will update this ticket ASAP when this is ready.

from strfry.

hoytech avatar hoytech commented on July 20, 2024

Nice! We're working on plugin system that will allow this. It's currently in the beta branch and a few people are testing it out, but probably not ready for serious production yet.

Here are the docs for plugins including an example of a whitelist:

https://github.com/hoytech/strfry/blob/beta/docs/plugins.md

from strfry.

pjv avatar pjv commented on July 20, 2024

Thanks @hoytech

let’s say I’m running strfry via docker-compose. Should bind mounting that plugin to the same path (/etc) as strfry.conf work?

from strfry.

hoytech avatar hoytech commented on July 20, 2024

Hmm good question. I think that should probably work, as long as the container has all the dependencies it needs to execute the plugin script. For example, if your plugin is in node, you'll need the node binary and all npm modules you use to exist inside the container.

from strfry.

pjv avatar pjv commented on July 20, 2024

I’ll probably re-write it in python. Since the Dockerfile in this repo looks to be stock ubuntu, I assume it will have python3. Maybe I’ll put the plugin in /app instead of having an executable sitting in /etc which is kinda bad form.

from strfry.

pjv avatar pjv commented on July 20, 2024

@hoytech in fact, not. I guess the ubuntu:jammy docker image is pretty stripped down (which makes sense). I had to modify the Dockerfile like so:

SCR-20230212-be7

I have a lightly tested and seemingly working python adaptation of your whitelist.js example. After I get it tested better, maybe I’ll put it in a gist along with the modified Dockerfile and relevant strfry config to make it work under docker as I am running it.

from strfry.

pjv avatar pjv commented on July 20, 2024

Now running the beta [decc3ae] live as my semi-private relay with just a few hand-picked pubkeys allowed to post. The whitelist is rejecting lots of spam. So far, so good.

from strfry.

hoytech avatar hoytech commented on July 20, 2024

Glad to hear it's working -- thanks for letting us know. A gist of instructions we can link to would be great!

from strfry.

pjv avatar pjv commented on July 20, 2024

@hoytech Took me a while to work out all the kinks, but here’s my repo that implements a docker-based personal relay server with strfry using the write policy plugin I developed. This may currently be the fastest, easiest way to get a nostr relay up and running.

from strfry.

Giszmo avatar Giszmo commented on July 20, 2024

Is this issue up to date? docs/plugins.md is on master and https://gitlab.com/soapbox-pub/strfry-policies/ makes good use of it. With the latter, black- and white lists are easy to do.

from strfry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.