You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONFIGURATION.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,4 +119,10 @@ Running `nostream` for the first time creates the settings file in `<project_roo
119
119
| limits.message.ipWhitelist | List of IPs (IPv4 or IPv6) to ignore rate limits. |
120
120
| limits.admissionCheck.rateLimits[].period | Rate limit period in milliseconds. |
121
121
| limits.admissionCheck.rateLimits[].rate | Maximum number of admission checks during period. |
122
-
| limits.admissionCheck.ipWhitelist | List of IPs (IPv4 or IPv6) to ignore rate limits. |
122
+
| limits.admissionCheck.ipWhitelist | List of IPs (IPv4 or IPv6) to ignore rate limits. |
123
+
| nip05.mode | NIP-05 verification mode: `enabled` requires verification, `passive` verifies without blocking, `disabled` does nothing. Defaults to `disabled`. |
124
+
| nip05.verifyExpiration | Time in milliseconds before a successful NIP-05 verification expires and needs re-checking. Defaults to 604800000 (1 week). |
125
+
| nip05.verifyUpdateFrequency | Minimum interval in milliseconds between re-verification attempts for a given author. Defaults to 86400000 (24 hours). |
126
+
| nip05.maxConsecutiveFailures | Number of consecutive verification failures before giving up on an author. Defaults to 20. |
127
+
| nip05.domainWhitelist | List of domains allowed for NIP-05 verification. If set, only authors verified at these domains can publish. |
128
+
| nip05.domainBlacklist | List of domains blocked from NIP-05 verification. Authors with NIP-05 at these domains will be rejected. |
Copy file name to clipboardExpand all lines: README.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -570,6 +570,7 @@ To see the integration test coverage report open `.coverage/integration/lcov-rep
570
570
open .coverage/integration/lcov-report/index.html
571
571
```
572
572
573
+
573
574
## Security & Load Testing
574
575
575
576
Nostream includes a specialized security tester to simulate Slowloris-style connection holding and event flood (spam) attacks. This is used to verify relay resilience and prevent memory leaks.
@@ -614,6 +615,55 @@ To observe client and subscription counts in real-time during a test, you can in
614
615
```bash
615
616
docker compose logs -f nostream
616
617
```
618
+
=======
619
+
## Export Events
620
+
621
+
Export all stored events to a [JSON Lines](https://jsonlines.org/) (`.jsonl`) file. Each line is a valid NIP-01 Nostr event JSON object. The export streams rows from the database using cursors, so it works safely on relays with millions of events without loading them into memory.
622
+
623
+
```
624
+
npm run export # writes to events.jsonl
625
+
npm run export -- backup-2024-01-01.jsonl # custom filename
626
+
```
627
+
628
+
The script reads the same `DB_*` environment variables used by the relay (see [CONFIGURATION.md](CONFIGURATION.md)).
629
+
## Relay Maintenance
630
+
631
+
Use `clean-db` to wipe or prune `events` table data. This also removes
632
+
corresponding data from the derived `event_tags` table when present.
633
+
634
+
Dry run (no deletion):
635
+
636
+
```
637
+
npm run clean-db -- --all --dry-run
638
+
```
639
+
640
+
Full wipe:
641
+
642
+
```
643
+
npm run clean-db -- --all --force
644
+
```
645
+
646
+
Delete events older than N days:
647
+
648
+
```
649
+
npm run clean-db -- --older-than=30 --force
650
+
```
651
+
652
+
Delete only selected kinds:
653
+
654
+
```
655
+
npm run clean-db -- --kinds=1,7,4 --force
656
+
```
657
+
658
+
Delete only selected kinds older than N days:
659
+
660
+
```
661
+
npm run clean-db -- --older-than=30 --kinds=1,7,4 --force
662
+
```
663
+
664
+
By default, the script asks for explicit confirmation (`Type 'DELETE' to confirm`).
0 commit comments