238 Commits

Author SHA1 Message Date
Yonle
0fbe970926 bog
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-22 12:16:37 +07:00
Yonle
7ed25e3520 ACHOOOO
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-22 12:05:40 +07:00
Yonle
4ccbccf142 bouncer: try to req with merged filters instead of separated filters.
I wonder whenever this would fix some nostr client that has problem with
requesting events to nostr relays. (Commit will remove if proved still
giving emotional damage to the same nostr client)

Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-22 12:02:02 +07:00
Yonle
03fa26838a RELEASE: 2.1.1
Signed-off-by: Yonle <yonle@lecturify.net>
2.1.1
2024-03-21 22:20:27 +07:00
Yonle
7fa955dc25 bouncer: fix multiple EOSE being sent when received very new event. 2024-03-21 22:20:16 +07:00
Yonle
91efce8bbf RELEASE: 2.1.0 2.1.0 2024-03-21 22:13:04 +07:00
Yonle
391c11f9b0 update README 2024-03-21 22:12:53 +07:00
Yonle
db0c88a2b7 bouncer: log info about OK, NOTICE, and CLOSED message when log_about_relays is true 2024-03-21 22:12:31 +07:00
Yonle
63ee61a4e1 npmignore: don't include config.js
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-21 21:47:08 +07:00
Yonle
9dc1f71d0e RELEASE: 2.0.11
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-21 21:45:04 +07:00
Yonle
ae3f5888c2 bouncer: fix multiple EOSE bypassing when using save mode.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-21 17:54:22 +07:00
Yonle
948207806d feat(bouncer): add option for adjusting numbers of idle sessions.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-18 23:57:53 +07:00
Yonle
b0b3d98c9e log: tell to logger if an IP is now known as something.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-18 22:51:32 +07:00
Yonle
99dc6bc6a2 fix bug on idle connection closing.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-18 22:51:32 +07:00
Yonle
d6cfdcb6ad try to make idle session and wait for a client to take over it
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-18 22:51:32 +07:00
Yonle
2bf62c6551 defaultconf: use only 1 cluster by default.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-18 22:51:02 +07:00
Yonle
c23fb716ce RELEASE: 2.0.10
Signed-off-by: Yonle <yonle@lecturify.net>
2.0.10
2024-03-12 17:39:43 +07:00
Yonle
f80f78bb95 Revert "bouncer: rehandle how handling EOSE works."
This reverts commit 20aab1a79c881597030802769d1fde21f88d7fb9.
2024-03-12 17:37:12 +07:00
Yonle
148ae31b47 Revert "bouncer: try use Set() for connectedRelays counting instead."
This reverts commit 2bf91f8603485710bcf81324eb5338bc0f1bfe9f.
2024-03-12 17:37:06 +07:00
Yonle
7a39b3aa26 RELEASE: 2.0.9
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.

Signed-off-by: Yonle <yonle@lecturify.net>
2.0.9
2024-03-10 08:55:18 +07:00
Yonle
2bf91f8603 bouncer: try use Set() for connectedRelays counting instead. 2024-03-10 08:50:18 +07:00
Yonle
20aab1a79c bouncer: rehandle how handling EOSE works.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-10 08:13:42 +07:00
Yonle
348830c577 bouncer: absurd harmless bug that does not harm anyone but technically annoying
As it turns out, private_keys !== {} is not enough.
When i do some experiment in Node.js REPL to find out the cause why the
heck bouncer.js still sends AUTH to user even with private_keys being
empty ({}), This absurd result happens:

  Welcome to Node.js v20.11.1.
  Type ".help" for more information.
  > {} === {}
  false
  > {} !== {}
  true
  > {} != {}
  true
  > {} == {}
  false

What the fuck..

Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-02 18:07:30 +07:00
Yonle
f148914ed8 bouncer: handle error on missing config field for blocked_publishers
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-02 17:42:02 +07:00
Yonle
ce0533cc6e RELEASE: 2.0.8
Small and useful improvements and a little bit touch on moderations.

- 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

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).

Signed-off-by: Yonle <yonle@lecturify.net>
2.0.8
2024-03-01 12:04:05 +07:00
Yonle
67f16ff247 feat(bouncer): Tell upstream relays the client IP address if needed.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-28 22:49:23 +07:00
Yonle
bbdba8b1c9 feat(bouncer): blocked_publishers: Yet a way to block publishers to talk to your bouncer
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-27 18:17:27 +07:00
Yonle
3572a4b54b bouncer: paused subs: even without filter.since, Pass any events that are new since the REQ command was taken
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-27 18:02:08 +07:00
Yonle
114125242a bouncer: paused subs: pass paused sub if event is newer than <filter.since>
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-27 17:43:01 +07:00
Yonle
6b4527164d handle CLOSED message properly.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-26 19:11:32 +07:00
Yonle
399bd18d55 it's rather "May consume lot of bandwidths" than it begin with "Will"
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-25 00:48:55 +07:00
Yonle
35afe1de83 bouncer notice: tell what invalid command did the client execute in NOTICE
Signed-off-by: Yonle <yonle@lecturify.net>
2.0.7
2024-02-25 00:35:24 +07:00
Yonle
8c685be8dd release: 2.0.7
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-25 00:26:32 +07:00
Yonle
84b0421f4c http&bouncer: connection configured save mode
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-25 00:23:09 +07:00
Yonle
7293893ab4 http&bouncer: connection configured accurateMode
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-24 12:23:55 +07:00
Yonle
aa2084d6b9 bouncer: a feature to override client limit
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-23 13:11:00 +07:00
Yonle
d589c034e2 code: apply use strict in js codes
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-22 17:08:09 +07:00
Yonle
7ca2569001 2.0.6-npm 2.0.6 2024-02-21 16:23:44 +07:00
Yonle
e545f2e877 release: 2.0.6
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-21 16:17:50 +07:00
Yonle
6a851ecfe1 cli: fix spaces on check
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-19 20:03:28 +07:00
Yonle
2dc4382788 remove orphan session as there seems no efficient way to implement it.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-19 19:58:28 +07:00
Yonle
21c72aa994 cli: fix error due to non-updated auth.js
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-19 19:38:31 +07:00
Yonle
d82eb099a5 fix readme.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-19 18:44:48 +07:00
Yonle
c16028a7ae mention the way to run in background wirh tmux.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-19 18:42:24 +07:00
Yonle
9e2989c529 introducing: bostr cli
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-19 18:37:50 +07:00
Yonle
c66d158a76 config&http: allow blocking websocket connections from the specified hosts
Signed-off-by: Yonle <yonle@lecturify.net>
2.0.5-a
2024-02-18 20:07:46 +07:00
Yonle
b75f22a105 bouncer: rehandling on forwarding ws.my_events
Signed-off-by: Yonle <yonle@lecturify.net>
2.0.5
2024-02-18 19:55:51 +07:00
Yonle
5a20102226 oops.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 19:45:19 +07:00
Yonle
f00e449036 bouncer: rework relay abandon func
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 19:42:45 +07:00
Yonle
b4eab0d2f4 bouncer: logger: log when user initialized first command
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 19:40:56 +07:00