bostr

A nostr relay bouncer

BSD-3-CLAUSE License

Stars
78

Bot releases are visible (Hide)

bostr - 2.1.1

Published by Yonle 7 months ago

A small speed up and major bugfix for the bouncer code.

What's new?

  • [New] Idle blank session
  • [Note] Removed orwarding client IP address to upstream relay due to usage of idle session.
  • [MajorFix] Fix repetitive EOSE being sent to client even after being paused

Idle session

In this release, bostr will now initialize a blank session which connects to the configured relays first. This idle session will then used for new incomming connection by client, allowing client to be able to interact with relays in a instant.

Back then, bostr only connect to bunch of relays once a client was connected. This does not do much but has some impact on performance, notably some nostr client may not be able to receive certain events from some relays.

This feature works almost similarly to the old orphan session feature. However that approach proved terrible as it reuses previously used session. It could be the ratelimited session, so i ditched it at the beginning.

By default, bostr only initialize 1 blank idle sessions. To configure how many idle sessions to be initialized during startup, Edit config.js and change idle_sessions integer value (Default: 1). It's suggested to initialize more than a single idle sessions in public bouncer.

Upgrading

For npm installation, upgrading could be done with the following:

npm i -g bostr@latest

or

npm i -g https://github.com/Yonle/bostr.git

For source code installation, upgrading could be done with the following:

git pull
npm i

and then restart your bouncer.

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.10...2.1.1

bostr - 2.1.0

Published by Yonle 7 months ago

bostr - 2.0.10 - Disappointment

Published by Yonle 7 months ago

Haaaaaaaaaiyaaaaaaaaaaaaaaaaa

What's new?

  • Revert two commits that conflicts the bouncing process: 20aab1a, 2bf91f8 (I have no idea what the hell was ruining it at all. It worked almost pretty much the same as with client.relays but things just go WEIRD)

Upgrading

For npm installation, upgrading could be done with the following:

npm i -g bostr@latest

or

npm i -g https://github.com/Yonle/bostr.git

For source code installation, upgrading could be done with the following:

git pull
npm i

and then restart your bouncer.

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.9...2.0.10

bostr - 2.0.9

Published by Yonle 8 months ago

Small fix, Small improvements.

What's New?

  • Fix bugs on the following:
    • handle error on missing config field for blocked_publishers
    • fix AUTH request is being sent even with empty private_keys
  • Improvements on handling EOSE.

Upgrading

For npm installation, upgrading could be done with the following:

npm i -g bostr

or

npm i -g https://github.com/Yonle/bostr.git

For source code installation, upgrading could be done with the following:

git pull
npm i

and then restart your bouncer.

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.8...2.0.9

bostr - 2.0.8

Published by Yonle 8 months ago

RELEASE: 2.0.8

small and useful improvements and a little bit touch on moderations.

what's new?

  • improvements on receiving new events in save mode (a.k.a. pause_on_limit)

firewall / moderation things:

  • a way to block an event owner's pubkey to have the event published into your bouncer. Useful to stop annoying actors to abuse your bouncer or in moderated nostr relay.

  • ability to block an IP address to connect into the bouncer's websocket. Useful to stop scrappers to constantly dig in your bouncer

upgrading

for npm installation, upgrading could be done with the following:

npm i -g bostr

or

npm i -g https://github.com/Yonle/bostr.git

for source code installation, upgrading could be done with the following:

git pull
npm i

and then restart your bouncer.

after upgrading, please check your config for new optional configuration by running bostr check config.js for npm, ./bostr_cli.js check config.js for source installation.

comment

i am not going to focus much on moderation however. So please bear in mind that if you ask too much to add moderation stuffs into bostr, It will be an different project. Because that's not what the goal of this project for.

as of now i am still focusing to improve the save mode (pause_on_limit).

full changelog: https://github.com/Yonle/bostr/compare/2.0.7...2.0.8

bostr - 2.0.7

Published by Yonle 8 months ago

Nothing so big. Only some configurable bouncer limitations that were once only configurable on admin side. It's now possible for users too.

What's new?

  • Bouncer session reworking. Bouncer will only connect to relays after user do REQ or EVENT for the first time.
  • Configurable connection limit for client side by connecting with various URL parameters such as accept, reject, accurate, and save>

What's removed

  • [Permanent] Orphan session

Recommended changes

For admin

To make it actually reduce client bandwidth by default, It's suggested to not enable accurate mode, which was on by default by editing config file and change the following:

{
  pause_on_limit: false,
}

as:

{
  pause_on_limit: true,
}

For user

Check your connected bouncer information by visiting it's page. If the default bouncing method was accurate, You could connect to us with ?save=1 in the end of bouncer URL:

wss://bostr.example.com/?save=1

Updating

Source code

git pull
npm i

And restart your bostr bouncer.

npm / bostr CLI

npm i -g https://github.com/Yonle/bostr

And restart your bostr bouncer

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.4...2.0.7


Yonle

bostr - 2.0.6

Published by Yonle 8 months ago

Nothing big here.
Just introduction of bostr CLI.

You could install it via npm:

npm i -g bostr

or

npm i +g https://github.com/Yonle/bostr.git

And see available commands by running:

bostr

Yonle

bostr - 2.0.5-a

Published by Yonle 8 months ago

  • Added blocked_hosts for blocking an host from connecting into bouncer

This is a short release for 2.0.5. Please check https://github.com/Yonle/bostr/releases/tag/2.0.5

bostr - 2.0.5

Published by Yonle 8 months ago

Release: 2.0.5

Recoding, improvements, and temporary features removal.

What's new?

  • Dependencies bump
  • Use of requesting different subscription ID rather than using
    subscription ID from client. Fixes late-close problems.
  • Filter validation is now checked with nostr-tools instead, Fixes issue
    with conflicting client that puts more than single filter in a single
    REQ subscription.
  • Reworked session code.
  • Allow possibility to only accept and reject receiving some specific kind of events.

What's removed?

  • EOSE Timeout
  • Cache to local relay (unreliable)
  • [Temporary Removal] Orphan session

Upgrading

No new configuration / feature was made. As usual, You will always need to run git pull and run npm upgrade to upgrade dependencies, And finally restart your bostr instance.

bostr - 2.0.5

Published by Yonle 8 months ago

Release: 2.0.5

Recoding, improvements, and temporary features removal.

What's new?

  • Dependencies bump
  • Use of requesting different subscription ID rather than using
    subscription ID from client. Fixes late-close problems.
  • Filter validation is now checked with nostr-tools instead, Fixes issue
    with conflicting client that puts more than single filter in a single
    REQ subscription.
  • Reworked session code.
  • Allow possibility to only accept and reject receiving some specific kind of events.

What's removed?

  • EOSE Timeout
  • Cache to local relay (unreliable)
  • [Temporary Removal] Orphan session

Upgrading

No new configuration / feature was made. As usual, You will always need to run git pull and run npm upgrade to upgrade dependencies, And finally restart your bostr instance.

bostr - 2.0.5

Published by Yonle 8 months ago

Release: 2.0.5

Recoding, improvements, and temporary features removal.

What's new?

  • Dependencies bump
  • Use of requesting different subscription ID rather than using
    subscription ID from client. Fixes late-close problems.
  • Filter validation is now checked with nostr-tools instead, Fixes issue
    with conflicting client that puts more than single filter in a single
    REQ subscription.
  • Reworked session code.
  • Allow possibility to only accept and reject receiving some specific kind of events.

What's removed?

  • EOSE Timeout
  • Cache to local relay (unreliable)
  • [Temporary Removal] Orphan session

Upgrading

No new configuration / feature was made. As usual, You will always need to run git pull and run npm upgrade to upgrade dependencies, And finally restart your bostr instance.

bostr - 2.0.5

Published by Yonle 8 months ago

Release: 2.0.5

Recoding, improvements, and temporary features removal.

What's new?

  • Dependencies bump
  • Use of requesting different subscription ID rather than using
    subscription ID from client. Fixes late-close problems.
  • Filter validation is now checked with nostr-tools instead, Fixes issue
    with conflicting client that puts more than single filter in a single
    REQ subscription.
  • Reworked session code.
  • Allow possibility to only accept and reject receiving some specific kind of events.

What's removed?

  • EOSE Timeout
  • Cache to local relay (unreliable)
  • [Temporary Removal] Orphan session

Upgrading

No new configuration / feature was made. As usual, You will always need to run git pull and run npm upgrade to upgrade dependencies, And finally restart your bostr instance.

bostr - 2.0.5

Published by Yonle 8 months ago

Release: 2.0.5

Recoding, improvements, and temporary features removal.

What's new?

  • Dependencies bump
  • Use of requesting different subscription ID rather than using
    subscription ID from client. Fixes late-close problems.
  • Filter validation is now checked with nostr-tools instead, Fixes issue
    with conflicting client that puts more than single filter in a single
    REQ subscription.
  • Reworked session code.
  • Allow possibility to only accept and reject receiving some specific kind of events.

What's removed?

  • EOSE Timeout
  • Cache to local relay (unreliable)
  • [Temporary Removal] Orphan session

Upgrading

No new configuration / feature was made. As usual, You will always need to run git pull and run npm upgrade to upgrade dependencies, And finally restart your bostr instance.

bostr - 2.0.5

Published by Yonle 8 months ago

Release: 2.0.5

Recoding, improvements, and temporary features removal.

What's new?

  • Dependencies bump
  • Use of requesting different subscription ID rather than using
    subscription ID from client. Fixes late-close problems.
  • Filter validation is now checked with nostr-tools instead, Fixes issue
    with conflicting client that puts more than single filter in a single
    REQ subscription.
  • Reworked session code.
  • Allow possibility to only accept and reject receiving some specific kind of events.

What's removed?

  • EOSE Timeout
  • Cache to local relay (unreliable)
  • [Temporary Removal] Orphan session

Upgrading

No new configuration / feature was made. As usual, You will always need to run git pull and run npm upgrade to upgrade dependencies, And finally restart your bostr instance.

bostr - 2.0.4

Published by Yonle 9 months ago

Small improvements, Small new features that i never use.

What's Changed

  • WEBSOCKET: Enabled deflate compression
  • HTTP: Favicon support
  • HTTP: Explicitly tells which address to connect to without putting two addresses (ws:// or wss:// depending on what user were connected)
  • HTTP: Standalone HTTPS support by @ftkro in https://github.com/Yonle/bostr/pull/11
  • BOUNCER: Numerous upstream ratelimit handlings
  • BOUNCER: Expose the current running bostr version in User-Agent
  • BOUNCER: Make orphan socket termination faster
  • CODE: "use strict" has been applied.
  • LOGGER: Show the connected IP addresses when disconnected
  • LOGGER: No need to tell that it is cleaning orphan sessions when max_orphan_sess is 0.

New Contributors

Updating

Run git pull inside bostr directory. A new feature is available in this version and needs to be enabled manually. Please read config.js.example and add new parameter to config.js. Finally restart your bostr server to apply update.

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.3...2.0.4

bostr - 2.0.4

Published by Yonle 9 months ago

Small improvements, Small new features that i never use.

What's Changed

  • HTTP: Favicon support
  • HTTP: Explicitly tells which address to connect to without putting two addresses (ws:// or wss:// depending on what user were connected)
  • HTTP: Standalone HTTPS support by @ftkro in https://github.com/Yonle/bostr/pull/11
  • BOUNCER: Numerous upstream ratelimit handlings
  • BOUNCER: Expose the current running bostr version in User-Agent
  • BOUNCER: Make orphan socket termination faster
  • CODE: "use strict" has been applied.
  • LOGGER: Show the connected IP addresses when disconnected
  • LOGGER: No need to tell that it is cleaning orphan sessions when max_orphan_sess is 0.

New Contributors

Updating

Run git pull inside bostr directory. A new feature is available in this version and needs to be enabled manually. Please read config.js.example and add new parameter to config.js. Finally restart your bostr server to apply update.

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.3...2.0.4

bostr - 2.0.3

Published by Yonle 10 months ago

Ironically, Frontend could be cruel or accidentally brutal to relays sometime.

What's new?

  • Updated NIP-01 compliance as per Jan 4th 2024
  • Improved memory usage (7% less than before)
  • Enabled connection with TCP_NODELAY
  • incomming_ratelimit and broadcast_ratelimit is now there to ratelimit a client. Check config.js.example for configuration example.

Updating

Run git pull inside bostr directory. A new feature is available in this version and needs to be enabled manually. Please read config.js.example and add new parameter to config.js. Finally restart your bostr server to apply update.

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.1...2.0.3

bostr - 2.0.2

Published by Yonle 10 months ago

Fast connect and disconnecting is brutal sometime.

What's new?

  • An whitelist to only allow some event authors to be published with this bouncer.
  • Orphan sockets feature to make idle sessions to reduce the amount of reconnections.

New Contributors

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.1...2.0.2

bostr - 2.0.2

Published by Yonle 10 months ago

Fast connect and disconnecting is brutal sometime.

What's new?

  • An whitelist to only allow some event authors to be published with
    this bouncer.
  • Orphan sockets feature to make stuff fast & not so easy to abuse,
    therefore reducing the amount of reconnects.

New Contributors

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.1...2.0.2

bostr - 2.0.1

Published by Yonle 10 months ago

Nothing so big today. Just improvements on reliabilities.

  • Added caching feature.
  • Fixbugs, Including a fix for orphan socket

New Contributors

Full Changelog: https://github.com/Yonle/bostr/compare/2.0.0...2.0.1

~ Merry Christmas ~