Repository navigation
Releases
[email protected]
Minor Changes
-
#1199
cce55b6Thanks @Priyanshubhartistm! - feat(nip43): publish the kind 13534 membership listWith the new
nip43.publishMembershipListsetting (off by default) the relay publishes a replaceable kind 13534 event, signed by its own key, with the NIP-70-tag and onemembertag per admitted pubkey, and refreshes it after every successful join or leave, and when a member's request to vanish is accepted, so that pubkey is taken out of it. Joins and leaves that are rejected or change nothing do not refresh it. Nothing is published wheninfo.selfdoes not match the relay's signing pubkey, since NIP-43 requires that signer. The list makes every member's pubkey public to anyone who can read the relay, which is why the setting defaults to off. It is a convenience for clients, not the source of truth for who may publish, and it holds at most the first 10,000 members. Users who asked to vanish are left out. Admissions made another way, for example a paid admission, do not refresh it. -
#1216
36ce4d5Thanks @Ferryx349! - feat(peering): show relationship state, terms and traffic split in adminThe Peering console now shows each peer's relationship state and current terms,
reconciliation and peer-request activity, and the existing budget and
held-invoice panels in one place. Relationship state follows the same access
window as the relay, so an ended period no longer appears active. -
#1169
cbc9c1dThanks @Ferryx349! - feat(peering): surface buyer invoices and budgets in the admin consoleWatches the peer's signed kind 402 invoice stream over the authenticated sync
connection, pays through LNbits or NWC, and exposes held invoices with
operator approve/reject actions, budget spend/remaining, and invoice counts. -
#1167
be2aba4Thanks @Ferryx349! - feat(peering): add the buyer invoice ledger and budget primitivesAdds the storage and decoding foundation for buying peering: a
peering_invoicesledger deduped by BOLT11 payment hash, per-peer/global
peering_budgetscounters, a narrow BOLT11 decoder, and the buyer settings
contracts. Automatic payment and admin approval ship in the follow-up slices. -
#1168
9c5917dThanks @Ferryx349! - feat(peering): enforce buyer budgets before paying peer invoicesAdds the buying-side policy: verify a peer invoice against its advertised
NIP-11 term, dedupe on the payment hash, reserve per-peer and global budget
counters atomically, pay through the configured wallet, and hold anything
outside the envelope for operator approval. -
#1233
7bbf889Thanks @Ferryx349! - feat(peering): add owner-attested peering requestsPeers can present a one-time, owner-signed request over their authenticated
NIP-42 connection. The receiving relay verifies the owner signature, the AUTH
relay key, the requested scopes, the current terms snapshot and NIP-13
proof-of-work, stores the accepted attestation, and returns a relay-signed
acceptance. Operators chooserequired,preferredorwaived; configured
peers keep working without proof-of-work by default.nostream peering request
produces and sends the request using an owner key supplied outside settings.
Operational traffic never requires the owner's key.
Patch Changes
-
#1234
bef8c4aThanks @Priyanshubhartistm! - fix(admin): record a logout in the audit history only when it ends a sessionPOST /admin/logoutis public, because it has to clear the session cookie whoever sends the request, and it wrote anadmin.logoutrecord to the audit history for every request, with or without a session. Anyone who could reach the admin routes could post to it repeatedly and fill the shared, size-limited audit history in Redis with logouts that never happened, pushing real administrator records out of it. The record is now written only by the logout that ends a session: a request with a valid session (as a cookie or a Bearer token) whose session had not been revoked yet. Revoking a session now tells the caller whether it was this call that did it, in one atomic step, so a copy of a token that was already logged out, or several logouts of the same session at once, write nothing more. Every such request still gets the cookie cleared and a 200. -
#1231
593ad2dThanks @Priyanshubhartistm! - fix(admin): the settings API cannot change the admin password hash through a parent pathPATCH /admin/settingsrefused a change toadmin.passwordHash, but it only looked at the path of the request. A request for the pathadminwith a newadminobject, alone or inside a batch of changes, replaced the object and so wrote or removedadmin.passwordHashwithout being refused. Anyone holding a valid admin session, or a copy of its token, could set a password hash they chose, or delete it, without knowing the current password, and the change outlived the session. The API now compares every write-protected value in the settings it is about to save with the stored ones and refuses the whole request when one differs (changed, added or removed), whichever path or batch caused it. Replacing theadminobject with the same hash in it, and changing any other admin setting, still work. -
#1200
49dd6f8Thanks @Priyanshubhartistm! - fix(cli): do not shadow settings.json with the defaultsnostream startandnostream setupcopy the default settings to.nostr/settings.yamlwhen that file is missing. The relay readssettings.yamlfirst and falls back to the deprecatedsettings.jsononly when there is no yaml, so on a deployment that still had only asettings.jsonthe copy replaced every override in it with the defaults: an admission policy such asnip43.enabled, payment settings and limits stopped applying, silently. The defaults are now copied only when neither file exists, so asettings.jsonkeeps working until the admin console ornostream configwrites asettings.yaml. -
#1236
1ab0404Thanks @Priyanshubhartistm! - fix(cli): keep the .env file private to its ownernostream setupandnostream config env setwrote.envwith the default file mode, which under the usual umask makes it readable by every local account that can reach the project directory. The file holdsSECRET, which signs the admin session tokens, and other credentials. The CLI now creates.envreadable by its owner only (mode 0600), including when it starts from.env.example, and restricts an existing.envto the owner whenever it writes to it. An existing.envthat setup does not need to change is left as it is. Where the permissions cannot be changed, for example on a file system without Unix permissions, the write still succeeds. -
#1237
65d5455Thanks @Priyanshubhartistm! - fix(cli): mask DB_URI and REDIS_URI innostream config envoutputnostream config env listandconfig env gethide the value of secret keys unless--show-secretsis given, but they only recognised keys with SECRET, PASSWORD, API_KEY or PRIVATE_KEY in the name.DB_URIandREDIS_URIcan carry a password (postgresql://user:password@host/db), so it was printed as it was. These two keys are now masked like the other secrets, and shown in full with--show-secrets. -
#1239
baa1c81Thanks @Priyanshubhartistm! - fix(cli): show control characters innostream infooutput as escapesnostream infoprinted the relay name, URL and other settings values as they are. These can be changed through the admin settings, so a value containing a newline or terminal escape sequence could add forged lines to the output or send commands to the operator's terminal, such as replacing the clipboard where the terminal allows it. The text output now shows control characters as visible escapes (for example\x0a).nostream info --jsonis unchanged. -
#1160 [
1267cec](1267cec935fac56b325...
[email protected]
Minor Changes
-
#1088
e1f92adThanks @Ferryx349! - feat(peering): deliver paid peering invoices and gate peer feedsConfigured peers can request their BOLT11 invoice as a signed
kind 402event
and pay it through Relay B's existing processor. FeedREQ,COUNTand NIP-77
requests are refused with a payment-required reason until a paid period is
active. Expired invoices are reissued after a cooldown, and a missed webhook is
rechecked before access is denied. -
#1087
1d5c473Thanks @Ferryx349! - feat(peering): add the paid peering billing ledger -
#1089
15de73aThanks @Ferryx349! - feat(peering): renew, lapse and expose paid peering accessThe billing worker now issues renewal invoices before a period ends, rechecks
pending payments before lapsing a peer, closes live peer sockets on lapse, and
keeps stored events and sync state for a later resume.GET /admin/peeringand
the dashboard show billing status, access end, the open invoice and the last
processor error. NEG-MSG rechecks paid access so an open NIP-77 session cannot
keep syncing after the paid period ends.
Patch Changes
-
#1145
afb381fThanks @Priyanshubhartistm! - fix(admin): revoke the session token at logout, not only its cookiePOST /admin/logoutdeleted the browser cookie but the session token itself stayed valid until it expired (24 hours by default), because the token was only<expiresAt>.<signature>and nothing on the server recorded a logout. A copy of the token kept elsewhere (aBearerclient, a log, a proxy) could restore administrator access after sign-out. The token now carries a random session id under the same signature, logout records that id in Redis until the token would have expired, and every admin request checks it, so a logout on one worker ends the session on all of them and ends only that session. If Redis cannot be read the token is refused, and a logout that cannot record the id answers 500 (and still clears the cookie).Tokens issued before this change have no session id and are refused, so every administrator signs in once more after the upgrade.
-
#1091
6b3db4dThanks @Priyanshubhartistm! - fix(cli): reject a SECRET that cannot be saved to .env and read back unchanged -
#1156
69197f7Thanks @Priyanshubhartistm! - fix(logging): do not write credential headers to debug logsDebug logging of incoming requests printed every header, so the admin session cookie, an
Authorizationbearer token, API keys and webhook signatures could be read from the logs and reused. The rate-limit middleware, the WebSocket connection log and the four payment callback controllers now log the headers with the value of every credential-bearing header replaced by[redacted]. -
#1157
8e90d9eThanks @Priyanshubhartistm! - fix(settings): reload settings when either settings.yaml or settings.json changesA worker watched only the settings file whose extension existed when it started. The loader reads
settings.yamlfirst and falls back to the deprecatedsettings.json, and the admin console and the CLI always writesettings.yaml, so a worker that started fromsettings.jsonnever reloaded after the yaml file was written. A change such as removing a pubkey from the NIP-98 admin allowlist stayed unseen by that worker until it restarted. The watcher now reloads on a change to either file. -
#1118
5c4b4f0Thanks @Ferryx349! - fix(admin): serialize every settings-file writer with the settings write lockThe lock records its owner hostname and refreshes a heartbeat, so a relay in a
container no longer steals a live CLI lock just because the host PID does not
exist in its own PID namespace. On the same host the lock checks the owner's
process start time, so a reused PID is reclaimed without ever evicting a slow
writer, and async writers keep the lock until they settle.
[email protected]
Patch Changes
-
#1130
ef017e5Thanks @dependabot! - chore(deps): bump astro from 7.4.4 to 7.4.7 -
#1092
508d8c1Thanks @Priyanshubhartistm! - fix(payments): a payment for a cheaper plan no longer downgrades a pubkey whose dearer plan is still running
[email protected]
Patch Changes
-
#1072
81edd16Thanks @chappie-daemon! - test(relay): add non-sequential socket test suite for connection and command racesAdds deterministic real-socket test cases covering racing connection states:
- Reconnect storm with immediate REQ on the open tick across multiple concurrent sockets
- Pipelined commands in a single write buffer preserving arrival order
- REQ immediately followed by CLOSE of the same subscription ID
- EVENT sent on open tick
- Binary-framed JSON commands
- Socket resilience and valid command processing following malformed JSON
[email protected]
Patch Changes
- #1075
4b4b247Thanks @chappie-daemon! - Admission now runs inside a serializable transaction.admit_user()opens withPERFORM ASSERT_SERIALIZED(), so calling it on the default read-committed connection raisedSN_NOT_SERIALIZABLEand every NIP-43 join request failed. A caller that supplies its own client (the payments path) still runs inside the transaction it passes.
[email protected]
Minor Changes
-
#1068
d6b98abThanks @aikido-autofix! - feat(web): set security headers on every web responseThe web app now sends
Strict-Transport-Security,X-Content-Type-Options: nosniff,X-Frame-Options: SAMEORIGIN,Referrer-Policy,X-DNS-Prefetch-Control,X-Permitted-Cross-Domain-Policiesand the cross-origin isolation headers through Helmet.The app's own nonce-based
Content-Security-Policyremains the single CSP on a response: Helmet's default policy is disabled, because a second CSP would intersect with the app's and block the nonce'd inline scripts the dashboard uses. Embedding the web UI in another origin is now refused byX-Frame-Options; the dashboard's own Grafana frame is unaffected.
Patch Changes
-
#1067
0832ffdThanks @Ferryx349! - fix(payments): accept LNbits 1.x callback bodiesLNbits 1.x sends the payment object as a JSON string inside the webhook body.
The callback route now allows a top-level JSON string, the controller parses it
before validation, and the body schema accepts and strips LNbits' extra payment
fields while still requiring a validpayment_hash.Non-JSON string bodies still return
400 Malformed body; the HMAC query check
and the invoice lookup from LNbits remain unchanged.
[email protected]
Minor Changes
-
#1059
dfcc967Thanks @Ferryx349! - feat(admin): account for peer on-demand requestsRecords on-demand
REQ,COUNT, andNEG-OPENrequests and the events served
for each authenticated peer pubkey in Redis. The admin console's Peering table
shows the request and event-served counts per peer, and the diagnostics export
includes the same counters. Accounting is best-effort and never fails the
request it describes.
[email protected]
Minor Changes
-
#1053
e37b284Thanks @Ferryx349! - feat(peering): rate-limit on-demand requests from authenticated peersAuthenticated peers can request events outside their standing feed with a
normalREQ,COUNT, or ad-hocNEG-OPENsession. Those requests continue to
use peer subscription and NIP-77 limits instead of client limits, and are now
bounded per peer pubkey bylimits.peer.request.rateLimits(default 300
requests/minute acrossREQ,COUNT, andNEG-OPEN).Refused
REQ/COUNTcalls receiveCLOSEDwith arate-limited:reason and
retry hint; refusedNEG-OPENsessions receiveNEG-ERR. The limiter fails
closed when its store is unavailable, and unidentified clients are unaffected.
Per-peer request/event accounting and admin-console visibility are left to the
dedicated admin-console follow-up.
Patch Changes
-
#1058
ba8691aThanks @avantikonde! - fix(cli): reject placeholder secret inherited from env or prompt in setup (#1018)Setup now rejects the default placeholder secret (
change_me_to_something_long_and_random) when read from inherited environment variables or interactive prompt input, and validates the resolved secret before persisting to.env. If a placeholder is detected, setup automatically generates a fresh cryptographically secure 64-byte random hex secret.
[email protected]
Patch Changes
-
#1062
5d5b5b1Thanks @chappie-daemon! - perf(website): size the hero poster to the box it paints inhero-poster.webpwas encoded at 1920×1080 for a boxHero.astrocaps at
1180×664 CSS px (min(1180px, 80vw, film-h * 16/9)), which Lighthouse's
image-delivery-insightreported as 36.9 KiB of waste on
ema.tnsor.network(#876).
The poster now encodes at 1440×810 — 1.22× that box, enough for a 1.25×
display, so it needs nodevicePixelRatiobranch — and drops from 42,926 B
to 30,878 B, a 28% reduction. SSIM against the old file at the display size
is 0.9968 at 1180×664 and 0.9964 at the larger 1359×764 layout #876 measured.The social preview is unaffected:
og:imagedefaults to the generated
social-card.pngat 1200×630 inbuild-social-card.mjs, and the hero poster
has no second consumer.scripts/build-media.mjsresizes to 1440 so the next
pnpm run mediakeeps the size instead of restoring 1920. -
#1063
771f53eThanks @chappie-daemon! - docs(website): lead with what the relay gives you, not its languageThe default meta description and the footer still introduced nostream as "a
Nostr relay written in TypeScript", which describes the implementation and not
the thing a reader gets. The<title>, theog:image:altand the repository
description already lead with owning a relay in a social network nobody can
switch off; the two stragglers now match them.The description feeds
meta[name=description],og:descriptionand
twitter:description, so the link preview changes with it. The technical
substance — PostgreSQL + Redis, Lightning admission, Tor and I2P, admin
console — is unchanged.
[email protected]
Patch Changes
-
#1045
ccb1c40Thanks @Ferryx349! - fix(relay): handle messages sent immediately after a WebSocket opensAttaches a temporary message listener before the awaited connection
rate-limit check, pauses the socket during admission, and buffers early
frames with bounded limits (64 messages / 1 MiB). Once admission succeeds the
adapter is created, buffered frames are replayed in arrival order, and the
socket resumes. Rate-limited connections are still terminated before any
message is processed, and buffer overflow closes with code 1009 instead of
silently dropping frames. Adds regression tests for early-message replay,
rate-limited rejection, and overflow handling.