⚠️ WARNING: Experimental software. Use at your own risk.
A fan-in / fan-out nostr relay proxy. Instead of connecting your nostr client to many relays, connect it to a single nostr relay proxy and enjoy:
- Efficient bandwidth usage: events are deduplicated before being sent to the client.
- Increased performance: offloading deduplication in addition to event caching optimizes query performance.
- Client IP obfuscation: upstream relays only see the IP of the nostr relay proxy, not the client.
Access to your nostr relay proxy may be restricted to a whitelist of allowed users. There are two layers of authentication employed to restrict access:
- Public key allowlist: A list of
allowed_npubs
in the config file restricts reads and writes to whitelisted users. - NIP-42: Queries are restricted to authenticated clients only.
Events from upstream relays are stored locally on disk in a LMDB. As queries are received, the proxy will check its local database first and return matching events if found. This read-through style cache dramatically speeds up query responses.
- Build the source code
make build
- Create a config file
cp example.config.yaml config.yaml
- Run the nostr-relay-proxy
./bin/nostr-relay-proxy -config ./path/to/config.yaml