Files
fips/packaging/common/hosts
T
Johnathan Corgan 0bb6e70fb5 Add host-to-npub static mapping with DNS hostname resolution
Add a HostMap that resolves human-readable hostnames to npubs,
enabling `gateway.fips` instead of the full `npub1...xyz.fips`.
Two sources populate the map: peer `alias` fields from the YAML
config and an operator-maintained hosts file at /etc/fips/hosts.

The DNS responder auto-reloads the hosts file on each request by
checking the file modification time, so operators can update
mappings without restarting the daemon.

- New src/upper/hosts.rs: HostMap, HostMapReloader, hostname
  validation, hosts file parser with auto-reload on mtime change
- DNS resolver checks host map before falling back to direct npub
- Node uses host map for peer display names
- Default hosts file added to both .deb and tarball packaging
- 26 new tests (789 total)
2026-03-08 18:34:54 +00:00

23 lines
793 B
INI

# FIPS Hosts File
#
# Static hostname-to-npub mappings for .fips DNS resolution.
# Each entry allows resolving hostname.fips to the peer's IPv6 address.
#
# Format: hostname npub1...
#
# Rules:
# - Lines starting with # are comments
# - Empty lines are ignored
# - Hostnames: a-z, 0-9, hyphens only; max 63 characters
# - One hostname and one npub per line, separated by whitespace
# - Duplicate hostnames: last entry wins
#
# Peer aliases from fips.yaml are also resolved automatically.
# Entries here take precedence over peer aliases on conflict.
#
# Examples:
# vps-tx npub10yffd020a4ag8zcy75f9pruq3rnghvvhd5hphl9s62zgp35s560qrksp9u
# vps-chi npub1qmc3cvfz0yu2hx96nq3gp55zdan2qclealn7xshgr448d3nh6lks7zel98
#
# Changes are picked up automatically on the next DNS query.