Commit Graph

  • 79eaedcffe remove useless boolean comparison. fiatjaf 2024-09-05 14:38:59 -03:00
  • aa2ac552ea support deleting "a" references. fiatjaf 2024-08-28 08:43:56 -03:00
  • 4e2b921af9 fix typo in nip42 docs Barry Deen 2024-08-25 09:42:17 -04:00
  • cf98cfc6d8 update xsync. fiatjaf 2024-08-24 07:17:07 -03:00
  • 62a3b9b7d9 docs: remove mention to bolt. fiatjaf 2024-08-24 07:16:52 -03:00
  • e8637afa38 policies: timestamps policies take time.Duration fiatjaf 2024-08-20 10:40:28 -03:00
  • e38036a5e6 add a sample to docs landing page. fiatjaf 2024-08-20 08:01:37 -03:00
  • 6a9dcdcbd4 add a fuzz test. fiatjaf 2024-08-14 09:30:02 -03:00
  • 5ae4d1194a this fix was stupidly missing yesterday. fiatjaf 2024-08-14 08:29:28 -03:00
  • 753a1191b9 add test for that. fiatjaf 2024-08-13 13:59:08 -03:00
  • 3e6d763a79 fix wrong matching on listener remove when router is used. fiatjaf 2024-08-13 13:21:39 -03:00
  • 3b03f6700c convert the random listener tests into fuzzy tests. fiatjaf 2024-08-13 11:38:59 -03:00
  • d7056f1515 tests that caught the previous two bugs. fiatjaf 2024-08-04 17:44:12 -03:00
  • 4e0971bafe fix removeListenerId() -- do not replace twice with the same last item when a client has repeated ids. fiatjaf 2024-08-04 17:43:15 -03:00
  • 07ea3a35ec removeClientAndListeners() -- stop confusing listeners when removing from the same ws. fiatjaf 2024-08-04 17:25:19 -03:00
  • ef57f54a28 fix listeners convoluted magic and add tests for it. fiatjaf 2024-08-01 15:36:14 -03:00
  • a103353254 fix development mess. fiatjaf 2024-08-01 12:41:27 -03:00
  • 5f0f9eec99 .PreventBroadcast slice of functions for controlling what events get broadcasted and to whom. fiatjaf 2024-07-31 10:34:44 -03:00
  • a63dc829df routing. fiatjaf 2024-07-30 09:43:04 -03:00
  • 096890804f Add instructions to download the framework Barry Deen 2024-07-29 13:45:56 -04:00
  • 5a90326695 fix sentence in docs. fiatjaf 2024-07-23 16:49:11 -03:00
  • 214b92ba3b management: check 'u' tag on authorization event. fiatjaf 2024-07-16 13:30:14 -03:00
  • b79f735e7a docs: link to go docs from home. fiatjaf 2024-07-15 13:44:46 -03:00
  • 28d7b83186 docs: fix cookbook link on home. fiatjaf 2024-07-15 13:36:26 -03:00
  • 82ab43075a docs: add source code. fiatjaf 2024-07-15 13:35:40 -03:00
  • bb8b36df80 add docs. fiatjaf 2024-07-15 12:41:26 -03:00
  • 5c7121a3f6 update go-nostr to fix some bugs. fiatjaf 2024-07-12 13:47:25 -03:00
  • 433be401c2 rename a file I don't remember why. fiatjaf 2024-07-11 15:37:30 -03:00
  • 71daea9d7b nip86: fix hash checking and always return a valid RPC response with an error instead of http errors. fiatjaf 2024-07-11 15:37:09 -03:00
  • 9d6dad073a fix nip86 route header matching. fiatjaf 2024-07-11 15:36:25 -03:00
  • dea3e59c92 nip86: disallow old auth events. fiatjaf 2024-07-09 17:03:39 -03:00
  • 91c652ef48 nip86: add auth checks. fiatjaf 2024-07-09 00:11:07 -03:00
  • 535f4c90e0 split nip11 handler into its own file and implement nip86 (relay management api). fiatjaf 2024-07-08 15:41:13 -03:00
  • 0004c041e0 nip11: signal support for auth always. fiatjaf 2024-07-07 23:38:27 -03:00
  • ef4a14a831 nip11: signal support for deletions and count if those handlers exist. fiatjaf 2024-07-07 23:37:43 -03:00
  • 3f73a9690a GetConnection() and GetAuthed() may return empty. fiatjaf 2024-07-03 22:16:44 -03:00
  • 2a8b704299 returning a nil chan from QueryEvents causes an immediate eose from that source. fiatjaf 2024-05-29 07:51:48 -03:00
  • 746f030f46 I'm a teapot -> Too many requests fiatjaf 2024-05-17 20:58:17 -03:00
  • 81ad56e85c simplify RestrictToSpecifiedKinds() fiatjaf 2024-05-12 20:54:53 -03:00
  • f8afb51ee9 ratelimits. fiatjaf 2024-05-12 20:37:00 -03:00
  • 848e76c664 do not notify listeners when a duplicated event is received. fiatjaf 2024-04-26 14:56:50 -03:00
  • 8b1a7f2195 ApplySaneDefaults() fiatjaf 2024-04-19 15:38:32 -03:00
  • 8557c7a8dc policy to reject events with base64 media. fiatjaf 2024-04-19 15:33:15 -03:00
  • f1f54a7bf3 stop and error on delete failed. fiatjaf 2024-04-18 21:20:46 -03:00
  • e03a02fed7 prevent storing duplicates. fiatjaf 2024-04-18 21:20:35 -03:00
  • 255f7bc827 delete all previous replaceable events by default. fiatjaf 2024-04-10 21:34:23 -03:00
  • 3214dac302 fix pre-search on policies. fiatjaf 2024-03-30 14:23:13 -03:00
  • 5efadf6256 do not give away so much. fiatjaf 2024-03-29 18:25:47 -03:00
  • 27d6769009 format last commit. fiatjaf 2024-03-29 18:24:44 -03:00
  • 44baacac42 * sort kinds before the binary search is run * optimized return messages with more context why the policy blocks an event Sebastix 2024-03-29 16:15:02 +01:00
  • 35053f6215 when LimitZero don't do any database queries. fiatjaf 2024-03-29 08:12:39 -03:00
  • 8854ad7a95 don't send a NOTICE when REQs are rejected anymore, just the CLOSED. fiatjaf 2024-03-25 10:55:59 -03:00
  • c5c17029ba basic kind validation policy. fiatjaf 2024-03-13 12:40:54 -03:00
  • e174dd6a95 support 1, 11 and 70 on NIP-11 list. fiatjaf 2024-02-13 12:24:06 -03:00
  • cd4c25c845 implement NIP-70 ["-"] tag support. fiatjaf 2024-02-13 12:22:15 -03:00
  • 9b43da0b17 use stdlib "slices". fiatjaf 2024-02-08 16:35:35 -03:00
  • e9bcad8614 policies that remove elements from the query should just cancel the query if they remove everything. fiatjaf 2024-02-07 08:38:42 -03:00
  • eb83307005 update dependencies. fiatjaf 2024-01-18 18:20:39 -03:00
  • d721fcdd67 make overwriting and broadcasting work for kind:5 delete events too. fiatjaf 2024-01-18 18:20:24 -03:00
  • f450c26d84 update go-nostr and xsync. fiatjaf 2024-01-10 16:27:50 -03:00
  • 8842ec2edd OnEphemeralEvent() fiatjaf 2024-01-10 16:24:35 -03:00
  • 89ac8f1f1a add clause for websocket close code 4537 because why? fiatjaf 2024-01-05 20:55:24 -03:00
  • 8d0afc1f12 invalidated filters just return nothing instead of erroring. fiatjaf 2024-01-05 20:48:44 -03:00
  • 40c3dbdc76 add relay.BroadcastEvent() and rename files. fiatjaf 2024-01-01 17:11:54 -03:00
  • e876415677 remove unused .OnAuth() and update README example. fiatjaf 2023-12-28 09:16:11 -03:00
  • b00e5b2b3f only reset ws.Authed if it's nil. fiatjaf 2023-12-27 13:05:29 -03:00
  • 0f7d26f26e missed from last commit: setting ws.Authed to nil. fiatjaf 2023-12-27 12:55:05 -03:00
  • 21b08cb044 fix closing of closed ws.Authed channel when client AUTHs twice. fiatjaf 2023-12-27 12:30:23 -03:00
  • 5b17786273 bring back RequestAuth(ctx), now as a global. fiatjaf 2023-12-25 09:30:13 -03:00
  • 77600dc05c expose GetSubscriptionID(ctx) fiatjaf 2023-12-25 09:14:09 -03:00
  • 9f635e4e41 fix writeErr nil pointer. fiatjaf 2023-12-22 22:35:44 -03:00
  • 9b22ea3ee6 fail properly when a storage function errors and other fixes related to prefixed reason messages. fiatjaf 2023-12-22 19:51:35 -03:00
  • 08a527f9d8 upgrade eventstore dependency. fiatjaf 2023-12-22 19:50:32 -03:00
  • 7e06629953 superficial tweaks to auth handling. fiatjaf 2023-12-09 14:41:54 -03:00
  • 3ec0020baa add OnDisconnect() handlers. fiatjaf 2023-12-09 09:00:11 -03:00
  • d3a0c545d2 GetIP() and GetOpenSubscriptions() utils. fiatjaf 2023-12-09 08:19:37 -03:00
  • c09d21b621 clarity: break->return fiatjaf 2023-12-09 00:14:08 -03:00
  • 5823515d27 streamlined connection closes on failure. fiatjaf 2023-12-09 00:00:20 -03:00
  • 9273a4b809 use a special context for each REQ stored-events handler that can be canceled. fiatjaf 2023-12-08 23:48:30 -03:00
  • ddfc9ab64a fun with connection contexts and context cancelations. fiatjaf 2023-12-08 22:51:00 -03:00
  • 375236cfe2 fix sign on error checking. fiatjaf 2023-12-06 21:32:48 -03:00
  • 35e801379a make NIP-42 actually work, with inferred ServiceURL if that's not manually set. fiatjaf 2023-12-06 15:03:53 -03:00
  • 22da06b629 new flow for auth based on "auth-required: " rejection messages. fiatjaf 2023-12-06 12:14:58 -03:00
  • 7bfde76ab1 example fix. fiatjaf 2023-12-06 12:14:27 -03:00
  • ad92d0b051 return CLOSED if any of the filters get rejected. fiatjaf 2023-12-06 11:56:56 -03:00
  • 728417852e fix nip04 policy. fiatjaf 2023-11-29 12:30:18 -03:00
  • 3c1b062eb8 include original http.Request in WebSocket struct. fiatjaf 2023-11-29 12:26:04 -03:00
  • 84d01dc1d3 rename auth-related fields on WebSocket struct. fiatjaf 2023-11-29 12:23:21 -03:00
  • 888ac8c1c0 use updated released go-nostr. fiatjaf 2023-11-29 12:23:02 -03:00
  • e1fd6aaa56 update examples plugins->policies fiatjaf 2023-11-29 12:22:37 -03:00
  • 386a89676a use go-nostr envelopes and support CLOSED when filters are rejected. fiatjaf 2023-11-28 22:43:06 -03:00
  • 90697ad3d3 OverwriteRelayInformation fiatjaf 2023-11-27 00:54:45 -03:00
  • 8c8a435a0b ensure supported_nips is always a list, even if empty. fiatjaf 2023-11-23 19:37:01 -03:00
  • d608c67791 store websocket object under WS_KEY at the connection context. fiatjaf 2023-11-23 19:36:46 -03:00
  • c0069f1e1b fix example in readme. fiatjaf 2023-11-23 19:36:20 -03:00
  • 7a221cf9f0 add missing return when checking id. fiatjaf 2023-11-22 17:30:34 -03:00
  • 194ec994d7 rename plugins to policies. fiatjaf 2023-11-22 17:11:05 -03:00
  • d592bd95a9 AntiSyncBots policy. fiatjaf 2023-11-22 17:10:11 -03:00
  • 2edf754907 cors. fiatjaf 2023-11-20 08:44:45 -03:00
  • 18e4904a00 check id before signature and do not allow invalid ids. fiatjaf 2023-11-19 16:40:29 -03:00