Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonle committed Mar 21, 2024
1 parent db0c88a commit 391c11f
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
A nostr relay bouncer.

## What is this?
**Bostr** is a multi nostr relay **proxy** that were serving as a nostr relay.
**Bostr** is an nostr relay aggregator **proxy** that acts like a regular nostr relay. It connects to multiple configured relays to exchange data (events).

## Why?
Nostr relays is a bunch of dummy servers that store user events. Normally nostr clients usually connects to more than 5-10 relays to receive and transmit events.
Nostr relays is a bunch of dummy servers that store user events. Normally nostr clients connects to more than 5-10 relays to receive and transmit events.

Due to it's nature that connects to more than just a single relay, **Client bandwidth usage is high.** And because of this, Nostr bandwidth usage is not really recommended for some users, notably **mobile data users.**

Expand All @@ -15,9 +15,11 @@ This project solve the problem by **reducing** the number of connected relays, a
![How it works](img/how_it_works.png)

## Installation
- [NodeJS](https://nodejs.org) (v16 or up)
- [NodeJS](https://nodejs.org) (v18 or up)
- A fast internet connection

You could set up an bostr bouncer by installing [Bostr CLI](#bostr-cli), or setting up via [The Source Code](#source-code), or via [Docker](#docker).

### Bostr CLI
Install bostr via `npm`:
```
Expand Down Expand Up @@ -74,20 +76,26 @@ tmux new -d "node index.js"

When configuring reverse proxy, Ensure that `x-forwarded-proto` header was set as `https`.

## Environment Variable
- `CLUSTERS` - Run Bostr with specified numbers of clusters.
- `LOG_ABOUT_RELAYS` - Whenever to log about relay connections

## Docker
### Quick Run
### Docker
```
git clone https://github.com/Yonle/bostr
cd bostr
cp config.js.example config.js
```

You will then need to edit `config.js` before running the bouncer.

#### Running
```
docker build -t bostr:local .
docker run --rm --name bostr -p 8080:8080 -v ./config.js:/usr/src/app/config.js bostr:local
```

**Note:** You will need to edit `config.js` before running the bouncer.
## Environment Variables
You could specify the following environment variables to override the current settings:

- `CLUSTERS` - Run Bostr with specified numbers of clusters.
- `LOG_ABOUT_RELAYS` - Whenever to log about relay connections.

## License

Expand Down

0 comments on commit 391c11f

Please sign in to comment.