Skip to main content

Module lan

Module lan 

Source
Expand description

How a server announces itself on the LAN.

Servers publish an mDNS record under their own service name, so the records of other Iroh apps on the network (irohv1) are never heard at all. The record’s user data carries CLIENT_ALPN and the server’s name. A record without that prefix is not a Spoolframe server and is ignored.

All of it is untrusted: it says where to dial and which EndpointId to expect, and Iroh proves the identity on connect.

Structs§

Advert
What a server’s record says about it.

Constants§

MAX_ADVERT
The most user data an Iroh mDNS record holds (UserData::MAX_LENGTH).
MDNS_SERVICE
The mDNS service name: records are <id>._spoolframe._udp.local.

Functions§

advert
The user data a server called name publishes: the client ALPN and the name, the name cut at a character boundary to fit MAX_ADVERT.
parse_advert
Read a record’s user data; None unless it is a Spoolframe server speaking this client protocol.