214 Commits

Author SHA1 Message Date
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
Yonle
a6e7caa76b bouncer: only start connect after first relay command.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 19:37:59 +07:00
Yonle
e97c9c0380 http: ANOTHER wording
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 19:20:13 +07:00
Yonle
fc3b329b94 http.js: another wordings.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 19:18:12 +07:00
Yonle
f28efc87fe http.js: probably some wordings.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 19:13:41 +07:00
Yonle
d798d7e3af it bypasses. now get it fix asap.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 13:08:16 +07:00
Yonle
a9188ae160 auth: fix bug on using event validation
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 12:56:00 +07:00
Yonle
64749963be bouncer: improve the acceptKinds
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 12:45:26 +07:00
Yonle
3cc41c47c2 http: no need to provide that long ass example. non-distraction one is fair enough.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 12:07:08 +07:00
Yonle
4716b56272 these codes is not needed as matchFilters already handles it.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 11:54:02 +07:00
Yonle
b8e93b395d http: favicon.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 11:47:49 +07:00
Yonle
834cd595e5 bouncer: try put merged filters into memory instead of generating everytime
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 11:41:32 +07:00
Yonle
743977a82e bouncer: filter in bouncer to handle filters, Manually.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 11:25:33 +07:00
Yonle
8cfc58d105 well. i forget to update the year in README for the license section
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 08:03:52 +07:00
Yonle
9b6160fb66 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.

What's removed?
===============
- EOSE Timeout
- Cache to local relay (unreliable)
- [Temporary Removal] Orphan session

Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-18 00:42:23 +07:00
Yonle
8078466d4f bouncer: re-handle NIP-50
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 19:55:39 +07:00
Yonle
7fae06bc8c code: renaming & reworking as per nostr-tools
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 19:35:33 +07:00
Yonle
8ba52b945e dependencies bump
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 19:23:49 +07:00
Yonle
726273f256 bouncer: small recode of filter limit handler
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 19:20:25 +07:00
Yonle
b865fa1b65 bouncer: use matchFilters function from nostr-tools
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 19:02:31 +07:00
Yonle
c20430e756 bouncer: too many filter validations.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 18:42:57 +07:00
Yonle
15fe2e7dcd bouncer: bring these checkers back.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 17:46:25 +07:00
Yonle
579b800466 bouncer: check via readyState instead of the variable availability
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 17:40:23 +07:00
Yonle
d38852230d bouncer: as it requests with faked subscriptionID, these checks may not needed.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 17:19:55 +07:00
Yonle
1a5717a42e bouncer: session code reworking.
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-17 15:33:15 +07:00