Napstr

How Napstr Uses Tor

Tor carries every Napstr audio transfer. There is no direct-IP fallback: if a valid Tor v3 onion connection cannot be made, the download fails closed.

Tor Is Included

Windows, Linux, and macOS releases package a pinned Tor Expert Bundle. Napstr starts and manages it automatically while the application is open. Users do not need to install the Tor Browser or configure a separate Tor daemon.

Source-development builds can instead use NAPSTR_TOR_PATH or a tor executable on the developer’s PATH.

A Private App Session

  1. The downloader requests an exact SHA-256 file ID through encrypted NIP-17.
  2. The seeder validates the audio and opens a server on loopback only: 127.0.0.1.
  3. Napstr asks Tor to create a v3 onion that maps to that loopback server and lasts only for the current app session. Its private key is discarded.
  4. Napstr creates a random 256-bit capability and sends it with the onion address inside NIP-17.
  5. The downloader rejects non-onion destinations and races up to three offers through Napstr’s local Tor SOCKS port.
  6. The first valid, responsive seeder streams the complete file; the others remain available as fallbacks.
  7. The seeder requires the capability and negotiated file ID before beginning the stream.
  8. The complete audio file is accepted only when its SHA-256 matches the catalogue file ID.
A capability expires after fifteen minutes, can authorize only its negotiated file ID. The private onion service disappears when Napstr closes.

Who Can See What?

PartyNetwork visibility
DownloaderReceives an app-session onion, not the seeder’s direct IP address
SeederReceives a Tor stream on loopback, not the downloader’s direct IP address
Nostr relayCarries the encrypted onion offer but cannot read its plaintext
ISP / networkMay observe that the computer is using Tor, but not the transferred filename or audio contents
Tor networkIndividual relays see only their part of a multi-hop circuit; no single relay is intended to know both peers

What Tor Does Not Promise

Tor greatly reduces direct peer-to-peer IP exposure, but it does not promise perfect anonymity against a global traffic-correlation adversary, a compromised computer, malicious software, or identifying information published in a Nostr profile.

Tor also does not decide whether a file is safe or lawful. Only copyleft music should be shared.