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)
- Please provide an api for "Read Policy Plugins" HOT 3
- "bad event id" on actually valid object. HOT 12
- Parser for x-forwarded-for does not work with IPv6 or multiproxy HOT 3
- Build error on latest master HOT 2
- nip-11 pubkey as bech32 should be rejected or warned or well documented to avoid HOT 2
- Using a Reverse Proxy like e.g. NGINX HOT 3
- strfry distribution channels HOT 2
- Write policy applied to sync? HOT 1
- Large database performance HOT 13
- Document all the secret strfry commands HOT 1
- Can I log the reason for "Request ID too long"? HOT 1
- REQ plugin HOT 1
- Compilation Errors HOT 2
- Trying to install HOT 2
- Dockerfile build fails HOT 1
- MDB_MAP_FULL: Environment mapsize limit reached HOT 5
- Work to change database HOT 2
- NWC events are no longer sent HOT 1
- Crash: page allocation failure HOT 2
- Ubuntu docker build is broken HOT 2
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.