Skip to content

v0.3.1 — macOS relay hostname fix

Choose a tag to compare

@sepehr-safari sepehr-safari released this 11 Jul 11:21
e73a3dd

A patch release fixing hostname resolution in the live relay dialer on macOS.

What changed

  • relay.dial resolves relay hostnames with the system resolver (libc getaddrinfo) instead of std's built-in DNS resolver. std reads nameservers from /etc/resolv.conf, which is empty on macOS (name resolution goes through the system configuration framework, not resolv.conf), so it fell back to querying a dead 127.0.0.1:53 and a hostname lookup hung indefinitely. getaddrinfo uses the OS resolver and works on both macOS and Linux; an IP-literal host flows through the same path. (#41)

The live dialer isn't reachable from CI (no relay to connect to), so this had gone unnoticed until the signer connected to a real relay.

Verification

Verified by hand against a live relay: the signer resolves relay.damus.io, opens the socket, completes the TLS + WebSocket handshake, and holds an ESTABLISHED connection subscribed for NIP-46 requests. resolveAndConnect is referenced in the "semantically analyzed" test so CI keeps type-checking it; 132 tests pass, CI green on Linux and macOS.

Install

zig fetch --save https://github.com/zig-nostr/nostr/archive/refs/tags/v0.3.1.tar.gz

What's next

Milestone A5 continues in zig-nostr/signer: NIP-49 encrypted key storage at rest and a per-request approval flow, then a native macOS build.