Code Monkey home page Code Monkey logo

nostr-banhammer's Introduction

Relay Banhammer

Relay Banhammer is a validation server for nostr-rs-relay. For any message sent to your nostr-rs-relay, the relay will poll the validation server which will match against a ban list to accept or reject the event.

The banhammer currently supports ban on :

  • sender ip
  • pubkey
  • content
  • tags

Configure

The ban list must be declared in a yaml file.

Field Type Description
content  string The reference value the validator will use, an npub if user ban.
regex boolean Interpret content as a regex.
date string The creation date of the ban.
ban_type One of IP,CONTENT,TAG,USER The type of ban to be applied.

e.g:

  - ban_type: CONTENT
  content: hello
  regex: false
  date: "2023-01-01T00:01:23"
  - ban_type: TAG
  content: world
  regex: false
  date: "2023-01-01T00:01:23"
  # use npub for user ban
  - ban_type: USER
  content: npub1gn5ha3qaxqgtvxhfdwsyt38s2sdu8jxmad92c0zuhfrthmnq9s5sxhfe6u
  regex: false
  date: "2023-01-01T00:01:23"
  - ban_type: IP
  content: 192.168.0.255
  regex: false
  date: "2023-01-01T00:01:23"

CLI

The service comes with an additional CLI program to help in basic management of your banlist.

nostr-banhammer's People

Contributors

asone avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

22388o

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.