Yonle
4afe82b342
bouncer: just slam EOSE from cache relay. idc
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-23 12:06:41 +07:00
Yonle
9d07840f67
bouncer: skip check if same event already transmitted & only store to cache relay if not received before
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-23 11:55:14 +07:00
Yonle
6d9987486e
bouncer: add caching feature back.
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-22 23:54:37 +07:00
Yonle
7fa955dc25
bouncer: fix multiple EOSE being sent when received very new event.
2024-03-21 22:20:16 +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
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
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
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
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
35afe1de83
bouncer notice: tell what invalid command did the client execute in NOTICE
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-25 00:35:24 +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
e545f2e877
release: 2.0.6
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-21 16:17:50 +07:00
Yonle
9e2989c529
introducing: bostr cli
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-19 18:37:50 +07:00
Yonle
b75f22a105
bouncer: rehandling on forwarding ws.my_events
...
Signed-off-by: Yonle <yonle@lecturify.net>
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
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
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
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
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
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
Yonle
27e27ffc2b
bouncer: remove cache as it still consumes bandwidth anyway
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-16 23:21:06 +07:00
Yonle
95bc83261a
bouncer: remove eose_timeout
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-16 23:07:24 +07:00
Yonle
dbe7250965
bouncer: temporary remove orphan feature
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-02-16 23:00:52 +07:00