265 Commits

Author SHA1 Message Date
fiatjaf
c09d21b621
clarity: break->return 2023-12-09 00:14:08 -03:00
fiatjaf
5823515d27
streamlined connection closes on failure.
account for the fact that the time.Ticker channel is
not closed when the ticker is stopped.
v0.2.0
2023-12-09 00:00:22 -03:00
fiatjaf
9273a4b809
use a special context for each REQ stored-events handler that can be canceled. 2023-12-08 23:48:30 -03:00
fiatjaf
ddfc9ab64a
fun with connection contexts and context cancelations. 2023-12-08 22:51:00 -03:00
fiatjaf
375236cfe2
fix sign on error checking. v0.1.1 2023-12-06 21:32:48 -03:00
fiatjaf
35e801379a
make NIP-42 actually work, with inferred ServiceURL if that's not manually set. v0.1.0 2023-12-06 15:03:53 -03:00
fiatjaf
22da06b629
new flow for auth based on "auth-required: " rejection messages. 2023-12-06 12:14:58 -03:00
fiatjaf
7bfde76ab1
example fix. 2023-12-06 12:14:27 -03:00
fiatjaf
ad92d0b051
return CLOSED if any of the filters get rejected. v0.0.15 2023-12-06 11:56:56 -03:00
fiatjaf
728417852e
fix nip04 policy. 2023-11-29 12:30:18 -03:00
fiatjaf
3c1b062eb8
include original http.Request in WebSocket struct. 2023-11-29 12:26:04 -03:00
fiatjaf
84d01dc1d3
rename auth-related fields on WebSocket struct. 2023-11-29 12:23:21 -03:00
fiatjaf
888ac8c1c0
use updated released go-nostr. 2023-11-29 12:23:02 -03:00
fiatjaf
e1fd6aaa56
update examples plugins->policies 2023-11-29 12:22:37 -03:00
fiatjaf
386a89676a
use go-nostr envelopes and support CLOSED when filters are rejected. 2023-11-28 22:43:06 -03:00
fiatjaf
90697ad3d3
OverwriteRelayInformation v0.0.14 2023-11-27 00:54:45 -03:00
fiatjaf
8c8a435a0b
ensure supported_nips is always a list, even if empty. v0.0.13 2023-11-23 19:37:01 -03:00
fiatjaf
d608c67791
store websocket object under WS_KEY at the connection context. 2023-11-23 19:36:46 -03:00
fiatjaf
c0069f1e1b
fix example in readme. 2023-11-23 19:36:20 -03:00
fiatjaf
7a221cf9f0
add missing return when checking id. 2023-11-22 17:30:34 -03:00
fiatjaf
194ec994d7
rename plugins to policies. 2023-11-22 17:11:05 -03:00
fiatjaf
d592bd95a9
AntiSyncBots policy. 2023-11-22 17:10:11 -03:00
fiatjaf
2edf754907
cors. 2023-11-20 09:07:52 -03:00
fiatjaf
18e4904a00
check id before signature and do not allow invalid ids. 2023-11-19 16:40:29 -03:00
fiatjaf
591b49fe73
do not log on normal websocket close. 2023-11-19 08:30:06 -03:00
fiatjaf
5db3b5fb8b
use binary search in RestrictToSpecifiedKinds() 2023-11-18 23:23:01 -03:00
fiatjaf
dcdf86c4e4
allow filtering by tag on PreventTooManyIndexableTags 2023-11-18 12:55:05 -03:00
fiatjaf
0a62169e14
update examples. v0.0.12 2023-11-18 10:37:07 -03:00
fiatjaf
8fd6436ac8
rework nip11 support to be more transparent. 2023-11-18 10:35:08 -03:00
fiatjaf
d2544d0f4d
stop uselessly returning NIPs that are obviously supported on NIP-11 response. 2023-11-18 08:03:32 -03:00
fiatjaf
7a3eb6fb08
plugins.PreventLargeTags() v0.0.11 2023-11-13 16:26:27 -03:00
fiatjaf
1abeab4851
filter.Limit is zero by default, so we will short-circuit on negative limits. 2023-11-13 10:55:17 -03:00
fiatjaf
ecb4fc66f8
shortcut querying when limit == 0 v0.0.10 2023-11-12 09:27:36 -03:00
fiatjaf
af24bd2132
fix eose waitgroup on early reject. 2023-11-11 21:15:10 -03:00
fiatjaf
4905a46ccd
make filter rejection actually work and move logic to a separate file. 2023-11-11 21:08:39 -03:00
fiatjaf
21e0c559f7
simplify event rejection code. 2023-11-11 18:00:04 -03:00
fiatjaf
78dd138ca8
fix content-type for nip-11. v0.0.9 2023-11-09 21:39:28 -03:00
fiatjaf
6c1a030ad2
get rid of useless error for closing connection on ping. 2023-11-07 22:55:24 -03:00
fiatjaf
270096debb
meta things and get rid of old relayer tests that don\'t work here. 2023-11-07 22:43:30 -03:00
fiatjaf
487b84cf2d
fix previous commit plugins. v0.0.8 2023-11-07 16:35:27 -03:00
fiatjaf
b277dae743
fix RejectFilters application, support overwriting filters and add some filter plugin helpers. 2023-11-07 16:08:56 -03:00
fiatjaf
1e51cdbc07
use ErrDupEvent from eventstore instead of our own. 2023-11-07 14:36:13 -03:00
fiatjaf
a15cd4e545
fix replaceable handlers to not delete things all the time. v0.0.7 2023-11-07 14:14:53 -03:00
fiatjaf
e6078b1a68
a readme with a sample. 2023-11-06 17:45:27 -03:00
fiatjaf
0ad33f78f1
PreventTimestampsInThePast() and PreventTimestampsInTheFuture() helpers. 2023-11-04 18:21:28 -03:00
fiatjaf
c0848182c4
OverwriteResponseEvent for optionally modifying events before sending them to client. v0.0.6 2023-11-04 17:39:28 -03:00
fiatjaf
80586c4573
update go-nostr to fix the OK envelope bug. 2023-11-04 17:31:39 -03:00
fiatjaf
d19b8f8895
support icon url. v0.0.4 2023-11-02 21:24:19 -03:00
fiatjaf
85ec58cf8e
RestrictToSpecifiedKinds() filter. 2023-11-02 20:31:32 -03:00
fiatjaf
6acf1b4366
update eventstore and badger/lmdb examples. 2023-11-02 20:16:17 -03:00