feat(nip66): add shared relay probe engine (DNS, TLS, WS RTT, NIP-11) - #675
Conversation
Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>
🦋 Changeset detectedLatest commit: 84bfc3f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR introduces a reusable relay probe engine (NIP-66 groundwork) that can run DNS, TLS, WebSocket open-RTT, and NIP-11 checks against a relay URL and return structured per-check results.
Changes:
- Adds
runProbe(relayUrl)with pluggable clients and per-check timing/status reporting. - Implements Node-backed probe clients for DNS, TLS, WebSocket RTT, and NIP-11 (with SSRF redirect guards).
- Adds unit tests and a changeset for the new probing module.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/utils/relay-probe.spec.ts | Adds unit coverage for target parsing, safety checks, caching, and runProbe behavior. |
| src/utils/relay-probe/ws-rtt-probe.ts | Implements a Node ws-based connector and WebSocket open-RTT probe. |
| src/utils/relay-probe/types.ts | Defines probe result/status types and default timeout/cache constants. |
| src/utils/relay-probe/tls-probe.ts | Implements a Node TLS connector and certificate probing logic. |
| src/utils/relay-probe/target.ts | Parses relay URLs into normalized probe targets and detects network type. |
| src/utils/relay-probe/run-probe.ts | Orchestrates parallel probe execution, DNS caching, and result shaping. |
| src/utils/relay-probe/nip11-probe.ts | Implements NIP-11 fetch/validation with redirect safety checks. |
| src/utils/relay-probe/index.ts | Exposes the probe engine public API (functions + types). |
| src/utils/relay-probe/dns-probe.ts | Implements DNS record collection via Node DNS promises. |
| src/utils/relay-probe/dns-cache.ts | Adds an in-memory DNS result cache with TTL expiration. |
| .knip.json | Ignores the new probe module for knip unused-code checks. |
| .changeset/nip66-probe-engine.md | Declares a minor release for the new probe engine feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>
Ferryx349
commented
Aug 9, 2026
@cameri whenever you are free, can you please give this PR a look. |
Uh oh!
There was an error while loading. Please reload this page.
Reconcile with merged probe engine (#675) and integrate new DVM worker topology from main while keeping relay-monitor worker support.
Description
This PR adds a shared relay probe engine for NIP-66 groundwork. It introduces
runProbe(relayUrl)with structured per-check results for DNS, TLS, WebSocket open RTT, and NIP-11.Related Issue
Fixes :- #669
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: