Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asone/nostr-banhammer
A validation grpc server for nostr-rs-relay based on file configuration
https://github.com/asone/nostr-banhammer
authorization-server nostr nostr-relay nostr-rs-relay-grpc nostr-tools relay
Last synced: 17 days ago
JSON representation
A validation grpc server for nostr-rs-relay based on file configuration
- Host: GitHub
- URL: https://github.com/asone/nostr-banhammer
- Owner: Asone
- License: mit
- Created: 2023-11-06T21:01:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-06T23:29:22.000Z (about 1 year ago)
- Last Synced: 2024-11-10T10:30:11.652Z (2 months ago)
- Topics: authorization-server, nostr, nostr-relay, nostr-rs-relay-grpc, nostr-tools, relay
- Language: Rust
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```yaml
- 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.