Comments (12)
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.
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.
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.
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.
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.
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.
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.
@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:
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.
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.
Glad to hear it's working -- thanks for letting us know. A gist of instructions we can link to would be great!
from strfry.
@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.
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)
- Compilation fails on alpine 3.19.1
- Add support for icon URL in NIP-11 document
- access reports HOT 2
- What happened to the Docker images? HOT 4
- SIGTERM HOT 3
- Search by tag and tag substring returns no results HOT 1
- NIP-48 support HOT 2
- Relay eventually times out all events when using a writePolicy plugin HOT 3
- Idea integration with strfry HOT 1
- Importing events from another relay using .jsonl import HOT 4
- Feature: retention period HOT 5
- Feature request: NIP-45 Event Count HOT 6
- Build Error HOT 6
- Favicon for relay HOT 1
- Cryptic error messages returned in OK messages HOT 1
- logging controls not documented/working
- docker-compose not working HOT 4
- REQ limit is too low HOT 1
- strify crashes on start HOT 3
- OSX build error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strfry.