- commit
- 604ff423880009fa0ae68ceac9fbeb6b1f084422
- parent
- 689e1e98a996de810adecdfbc0ccffd3523489ef
- author
- Dami <dami.etoile@gmail.com>
| M | docs/ | 5 | ++++- |
| M | docs/ | 2 | ++ |
@@ -18,6 +18,7 @@ Three things read that table: the write rule, the signed roster your relay publi
1818 - **Add** a member by pubkey or npub. Give them a name and a note if you like.1919 - **Invite** with a link. Choose how long the link lives and how many people can use it.2020 - **Ban** a pubkey. Their events are refused and their open connections are closed.21+- **Block an address.** An IP address, v4 or v6, gets no socket and no write or read door; its open connections are closed. The page, the relay information and management stay reachable, so you can undo a block on your own address. Addresses churn, so blocks are not part of the exported configuration.2122 - **Reports** filed against people or events arrive here. Resolve each one by dismissing it, deleting the event or banning the author.2223 - **Role** is *member* or *moderator*, set from the selector next to the pubkey. A moderator can add and remove members, ban, delete events, mint invites and resolve reports, here or from a group-aware client. They cannot touch the owner, other moderators, rules, identity, storage or fuel.2324 @@ -36,12 +37,14 @@ Who can do what, and how much.
3637 | Proof of work | minimum bits an event must carry, 0 to disable |3738 | Timestamp window | how far in the future an event may be dated |3839 | Query limits | max events per query, max subscriptions per connection |39-| Rate limits | events and queries per minute, per connection |40+| Rate limits | events and queries per minute, per connection; an address gets four times that across all its connections |4041 | Upload size | largest file in megabytes, up to 95 |4142 | Kinds | allow list and block list by kind number |4243 4344 An empty allow list means every kind. Blocks always win.4445 46+The per-address limit is what stops a client from opening many sockets to multiply its allowance. It also serves as the HTTP bridge's rate limit, which has no socket to meter. Address buckets live in memory and reset when the relay sleeps.47+4548 ## Identity4649 4750 Name, description, icon and contact appear in your relay's public information document, which clients read.@@ -80,6 +80,8 @@ Moderators cannot act on the owner or on each other; only the owner appoints or
8080 8181 `src/manage.ts` implements NIP-86 over NIP-98. The console is a client of it. `verifyNIP98` is a local implementation: kind 27235, 60-second window, `u` matches host and path, method matches, payload hash matches.8282 83+`listeventsneedingmoderation` is a view over the reports queue: one entry per open reported thing, an event id or a blob hash, with the report's type and words as the reason. `blockip`, `unblockip` and `listblockedips` work on the client's address, which the worker stamps on every forwarded request as `x-relay-ip` from Cloudflare's `cf-connecting-ip`, never read from a client header. The address is kept in the socket's state and in the HTTP doors' virtual connection. Per-address token buckets sit beside the per-connection ones at four times the allowance, and are the bridge's only rate limit.84+8385 ## Protocol surface8486 8587 NIP-01, 09, 11, 13, 17/59 private kinds, 29, 40, 42, 45 with HLL, 50, 56, 62, 67, 70, 77, 86, 98, plus NIP-05, NIP-43, NIP-57 and Blossom BUD-01/02/04/06. `test/conformance` is a black-box suite that runs against any relay URL.