nfunc

v0.4.3

A small tester for Nostr relays and the machines behind them, that tells you exactly where a connection fails.

What it is

A desktop app for Apple, Linux and Windows. Give it a list of relays and it tries each one in stages, timing every step and showing the error word for word when one fails. A second view checks whole machines: their name, ports, certificate and web server.

The stack

Tauri 2, React, Vite and Tailwind — the suite’s stack.

The checks run in Rust: tungstenite (with rustls) for the WebSocket and ureq for the relay’s information document, each with its own time limit and on its own thread, so relays are tried side by side.

Get it

Version 0.4.3. Every release, and the source: GitHub.

Relays

Edit a list of relay addresses and ping them. Each relay is tried in three stages, each with its own light:

Connect
Opens the WebSocket — the network connection, encryption and the upgrade — and times it.
Subscribe
Asks for a little data and waits for the relay to say it has sent everything, and shows any notice or refusal it gives.
Info
Fetches the relay’s own description: its software and version, what it supports, and whether it wants payment or a login.
why it works where a browser would not

The fetch is made from Rust, not the web view, so the browser restriction most relays trip does not hide the answer.

Hosts

The hosts view checks whole machines rather than relays. Each host can run any of these:

DNS
Looks the name up, timed. Skipped when you give an IP address.
Ping
The system’s own ping. No reply shows amber, not red: plenty of servers ignore ping.
more

It uses the system ping, which carries the permission to send raw packets; Ubuntu keeps that closed to ordinary programs.

Ports
Tries each port: open, refused or timed out, with the error. Write !22 for a port that should be closed — it passes when refused or silent, and fails if it is ever open. A small firewall audit.
TLS
Checks the certificate: that it verifies, when it expires, who issued it, the names on it and its fingerprint. An expired one is still read, so it says how long ago. Amber under 14 days. For a host given as an IP, set the name to check the certificate against.
Web
Fetches a page, following redirects: status, time, where it landed, and whether it contains some text you name. Catches a web server that is down while the machine is up.
Relay
The relay check above, against a relay on that host.
LND
For a Lightning node: whether its peer port is reachable, and its state from the one address LND answers without credentials, with its certificate’s fingerprint. It can go through a local Tor proxy.
Hosting notes
Your own records for each host — its specs, and what it costs and when it renews. The renewal counts down: amber within 30 days, red once lapsed. Notes never change a host’s status and are never sent anywhere.

No hosts come with the app. Your lists stay on your machine, and move between machines by export and import.

What it stores, and where

Everything is in the web view’s local storage — under ~/.local/share/uk.fizx.nping/localstorage/ on Linux — one file for the installed app and another for development builds, so the two never share lists. The keys are nping.relays, nping.hosts, nping.hostResults, nping.view and nping.mode.

Import and export go through the system’s file dialogs, which open where you last saved or loaded. Import merges, skipping entries already listed; export writes the lists only, never results.

How Nostr does it

nping holds no key and publishes nothing. The subscribe stage is a plain Nostr request, and the info stage reads the document a relay publishes about itself.

NIPs in play

  • NIP-01 the request, and the relay’s end-of-results reply
  • NIP-11 the relay’s information document