https://github.com/codonaft/broadcastr
Nostr relay that transmits events to other relays
https://github.com/codonaft/broadcastr
crates nostr nostr-relay proxy social
Last synced: 8 days ago
JSON representation
Nostr relay that transmits events to other relays
- Host: GitHub
- URL: https://github.com/codonaft/broadcastr
- Owner: codonaft
- License: apache-2.0
- Created: 2025-04-23T11:46:44.000Z (17 days ago)
- Default Branch: main
- Last Pushed: 2025-04-30T19:04:06.000Z (10 days ago)
- Last Synced: 2025-04-30T20:22:53.535Z (10 days ago)
- Topics: crates, nostr, nostr-relay, proxy, social
- Language: Rust
- Homepage:
- Size: 55.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-nostr - broadcastr - Nostr relay that transmits events to other relays (Relays / Implementations)
README
# Broadcastr
[](https://github.com/nostr-protocol)
[](https://crates.io/crates/broadcastr)
[](https://crates.io/crates/broadcastr)
[](#Support)Vendor lock-free stateless alternative to [blastr](https://github.com/MutinyWallet/blastr) with additional features:
- [spam](https://spam.nostr.band) filtering
- events filtering
- kind
- author/mention
- [PoW](https://github.com/nostr-protocol/nips/blob/master/13.md)
- [gossip](https://github.com/frnandu/yana/blob/master/GOSSIP.md)
- tor/onion relays
- minimizes the risk of being rate-limited by the relay
- it checks whether event is already published on a certain relay
- relays ignore list## Install
### From crates.io
```bash
cargo install --locked broadcastr
```### From git
```bash
cargo install --locked --force --git https://github.com/codonaft/broadcastr
```## Run
```
broadcastr --listen ws://localhost:8080 --relays https://api.nostr.watch/v1/online
```💡 Usage 👁️
```
Usage: broadcastr --listen --relays [--blocked-relays ] [--tor-proxy ] [--proxy ] [--min-pow ] [--allowed-pubkeys ] [--disable-mentions] [--max-events-per-min ] [--allowed-kinds ] [--disable-gossip] [--disable-spam-nostr-band] [--update-interval ] [--max-backoff-interval ] [--connection-timeout ] [--request-timeout ] [--log-level ] [--tcp-backlog ] [--max-msg-size ] [--max-frame-size ]Broadcast Nostr events to other relays
Options:
--listen the listener ws URI (e.g. "ws://localhost:8080")
--relays relays or relay-list URIs (comma-separated, e.g.
"https://api.nostr.watch/v1/online,file:///path/to/relays-in-array.json,ws://1.2.3.4:5678")
--blocked-relays same, but for ignored relays; put public URL to your
broadcastr here to avoid loops
--tor-proxy connect to tor onion relays using socks5 proxy (e.g.
"127.0.0.1:9050")
--proxy connect to all relays using socks5 proxy
--min-pow pow difficulty limit (NIP-13)
--allowed-pubkeys authors or mentioned authors (comma-separated
hex/bech32/NIP-21 allow-list)
--disable-mentions
disallow mentions (of the allowed authors) by others
(default is false)
--max-events-per-min
max events by author per minute (default is 5)
--allowed-kinds limit event kinds with (comma-separated allow-list, e.g
"0,1,3,5,6,7,4550,34550")
--disable-gossip don't discover additional relays from user profiles
--disable-spam-nostr-band
don't use spam.nostr.band for spam filtering
--update-interval relays and spam-lists update interval (default is 15m)
--max-backoff-interval
max update backoff interval (default is 5m)
--connection-timeout
connection timeout (default is 15s)
--request-timeout request timeout (default is 10s)
--log-level log level (default is info)
--tcp-backlog max incoming connections per listener IP address
--max-msg-size event message size
--max-frame-size ws frame size
-h, --help display usage information
```## TODO
- [ ] support delivery of multiple events over the same connection
- [ ] deduplicate concurrently sent events
- [ ] NIP-11
- [ ] improve RAM usage
- [ ] add metrics## Support
I'm currently investing [all my time](https://codonaft.com/why) in FOSS projects.If you found this repo useful and you want to support me, please
- ⭐ star
- ⚡ [zap](https://zapper.nostrapps.org/zap?id=npub1alptdev5srcw2hxg03567p4k6xs3lgj7f6545suc0rzp0xw98svse7rg94&amount=5000)
- 🌚 something [else](https://codonaft.com/sponsor)Your support keeps me going ❤️ (◕‿◕)
## License
MIT/Apache-2.0