Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coracle-social/multiplextr
A dynamic relay proxy for nostr
https://github.com/coracle-social/multiplextr
nostr proxy relay
Last synced: 11 days ago
JSON representation
A dynamic relay proxy for nostr
- Host: GitHub
- URL: https://github.com/coracle-social/multiplextr
- Owner: coracle-social
- License: mit
- Created: 2023-03-29T14:55:43.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-13T17:32:52.000Z (about 1 year ago)
- Last Synced: 2024-11-20T15:39:11.873Z (24 days ago)
- Topics: nostr, proxy, relay
- Language: JavaScript
- Homepage: https://coracle.social
- Size: 182 KB
- Stars: 22
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nostr - multiplextr - social/multiplextr.svg?style=social) - A custom relay designed to save bandwidth for clients with multiplextr support. (Relays / Implementations)
README
# Multiplextr
A dynamic relay proxy for nostr. Easy to self-host, easy to connect to.
# How it works
A multiplexer needs additional information about how to route messages to and from a client, so it uses a wrapped variant of the nostr protocol. Every message is a JSON-encoded array, where first entry is multiplexer metadata, and the second is a nostr message.
For example, a client might send `[{"relays": ["wss://my-relay.example.com", "wss://my-other-relay.example.com"]}, ["REQ", "my-subscription", ]]`. Multiplextr will unwrap that message and send the subscription along to the relay specified. When receiving a response, it will wrap it and send it back to the client, for example, an event received from my-other-relay would be sent to the client as `[{"relays": ["wss://my-other-relay.example.com"]}, ["EVENT", ]]`.
This is quite easy to implement using the [paravel](https://github.com/coracle-social/paravel) library for building nostr clients (and relay tools like this one).