mirror of
https://github.com/permissionlesstech/georelays.git
synced 2026-07-25 11:05:18 +00:00
Add NIP-42 authentication to relay discovery
This commit is contained in:
@@ -14,6 +14,9 @@ The repository contains three scripts that form a simple pipeline:
|
||||
- Starts from a seed relay URL and connects to it via WebSocket (ws/wss).
|
||||
- Breadth‑first searches follow lists (kind 3) and relay lists (kind 10002), extracting relay URLs from event tags (r/p tags).
|
||||
- Tests each candidate relay for basic Nostr protocol responsiveness by issuing a REQ and evaluating responses (EVENT/EOSE/NOTICE).
|
||||
- Responds to NIP-42 authentication challenges. An ephemeral Nostr key is
|
||||
generated by default; set `NOSTR_PRIVATE_KEY` or pass `--private-key` with a
|
||||
64-character hex secret when testing membership-restricted relays.
|
||||
- Processes relays in concurrent batches and periodically saves progress to `relay_discovery_results.json`.
|
||||
- Output: `relay_discovery_results.json` with:
|
||||
- `functioning_relays` (array of ws/wss relay URLs)
|
||||
@@ -42,6 +45,8 @@ Note: The geolocation step is IPv4‑only (the DB‑IP file used here is IPv4).
|
||||
|
||||
## Tips and caveats
|
||||
- The discovery step uses timeouts and concurrent batches; tune `--batch-size`, `--timeout`, and `--max-depth` for your environment.
|
||||
- NIP-42 authentication proves control of a key but does not bypass relay
|
||||
membership or payment policies. Use a relay-authorized key when required.
|
||||
- The BitChat filter posts a test kind 20000 event. Ensure `nak` is configured to publish (e.g., via its config or environment variables as per `nak` docs).
|
||||
- Geolocation is an estimate based on DB‑IP and only for IPv4. Accuracy varies and may reflect the ISP/hosting POP rather than precise server location.
|
||||
- `relays_geo_lookup.py` stops at the first IPv4 for which DB‑IP provides coordinates. Some hostnames resolve to multiple IPs.
|
||||
|
||||
Reference in New Issue
Block a user