Expand description
Host-to-npub static mapping.
Provides a HostMap that resolves human-readable hostnames to Nostr
public keys (npubs). Populated from two sources:
- Peer
aliasfields in the YAML configuration - An operator-maintained hosts file (
/etc/fips/hosts)
The DNS resolver checks the host map before falling back to direct
npub resolution, enabling gateway.fips instead of npub1...xyz.fips.
Structs§
- HostMap
- Bidirectional hostname ↔ npub mapping table.
- Host
MapReloader - Tracks a hosts file and reloads it when the modification time changes.
Enums§
- Host
MapError - Errors from host map operations.
Constants§
- DEFAULT_
HOSTS_ PATH - Default path for the FIPS hosts file.
Functions§
- file_
mtime - Return the modification time of a file, or
Noneif it doesn’t exist or the metadata can’t be read. - validate_
hostname - Validate a hostname for use as a FIPS DNS alias.