Files
fips/docs/design
Johnathan Corgan 239cbdc4ba Fix Tor onion adverts missing port in Nostr overlay discovery
The Nostr overlay advert publisher serialized `transport: tor`
endpoints as a bare `<onion>.onion` hostname with no port. The Tor
address parser requires `<host>:<port>` form and rejected the bare
shape with `expected host:port`. Any peer receiving a Tor-only
advert went into a persistent retry-fail loop on jittered backoff
until the advert aged out of the discovery cache. The bug had been
latent for as long as Tor adverts have been published on Nostr, and
was masked in deployments where every node also advertised a
non-Tor transport (peers fell through to the working endpoint).
Surfaced first on a deployment where Tor was the only advert path.

Publisher now emits `<onion>.onion:<port>` using a new
`transports.tor.advertised_port` config field that defaults to 443,
matching the Tor `HiddenServicePort 443 127.0.0.1:<bind_port>`
convention. Operators whose torrc uses a non-default virtual port
can override.

Adds a unit test that pins the publisher/parser contract: formats
the advert exactly as the publisher does and asserts `parse_tor_addr`
accepts the result; asserts the bare-onion form (the bug) does not
parse, catching any future regression that drops the port again.

Parser is unchanged (already correct).
2026-05-01 16:54:10 +00:00
..
2026-04-09 16:53:32 +00:00

FIPS Design Documents

Protocol design specifications for the Federated Interoperable Peering System — a self-organizing encrypted mesh network built on Nostr identities.

Reading Order

Start with the introduction, then follow the protocol stack from bottom to top. After the stack, the mesh operation document explains how all the pieces work together. Supporting references provide deeper dives into specific topics.

Protocol Stack

Document Description
fips-intro.md Protocol introduction: goals, architecture, layer model
fips-transport-layer.md Transport layer: datagram delivery over arbitrary media
fips-mesh-layer.md FIPS Mesh Protocol (FMP): peer authentication, link encryption, forwarding
fips-session-layer.md FIPS Session Protocol (FSP): end-to-end encryption, sessions
fips-ipv6-adapter.md IPv6 adaptation: TUN interface, DNS, MTU enforcement

Mesh Behavior

Document Description
fips-mesh-operation.md How the mesh operates: routing, discovery, error recovery
fips-wire-formats.md Wire format reference for all message types
fips-nostr-discovery.md Optional Nostr-mediated peer discovery and UDP NAT hole-punch (behind nostr-discovery feature)

Supporting References

Document Description
fips-spanning-tree.md Spanning tree algorithms: root discovery, parent selection, coordinates
fips-bloom-filters.md Bloom filter math: FPR analysis, size classes, split-horizon

Implementation

Document Description
fips-configuration.md YAML configuration reference

Supplemental

Document Description
spanning-tree-dynamics.md Spanning tree walkthroughs: convergence scenarios, worked examples

Document Relationships

Document relationships