Yonle
14fe204fb7
for statistic, CLOSED may only counts when the closing reason has value in it
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-04-10 15:19:35 +07:00
Yonle
7417f23fd5
statistic: add raw_rx
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-04-06 14:38:06 +07:00
Yonle
19cc63cc81
bouncer: warn when config is still using approved_publishers
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-04-05 14:24:45 +07:00
Yonle
d8b2a8388b
bouncer: count fail for unexpected status code too.
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-04-05 10:30:18 +07:00
Yonle
83dc69bfd7
bouncer: fix ratelimit & stats handling
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-04-04 21:52:10 +07:00
Yonle
e9f79114d0
bouncer: forget to put rx into global statistics.
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-04-04 21:37:58 +07:00
Yonle
63a404d3ae
feat: add bouncer statistics
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-04-04 21:33:11 +07:00
Yonle
427777307a
bouncer: fixbug on handling invalid relay response
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-29 07:58:20 +07:00
Yonle
5a95821cc9
bouncer: change code on variable names, and handling iterate from relays instead of doing .forEach
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-28 22:13:24 +07:00
Yonle
d3eeb37717
bouncer: fix pendingEOSE being deleted before all relays sends EOSE
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-28 08:33:44 +07:00
Yonle
2972624c49
bouncer & defaultconf: change nobot to noscraper
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-27 23:23:53 +07:00
Yonle
dfdc5fbcc4
bouncer: if nobot is being set, don't perform request for bot/scraper/crawler/similiar.
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-27 23:15:16 +07:00
Yonle
be9b0698b8
bouncer: override opened subscription when requested.
...
Signed-off-by: Yonle <yonle@lecturify.net>
2024-03-23 13:38:54 +07:00
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