Ninlil loads a list of hosts files into one name table and reloads it when a file changes #174
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
lantea-one/ninlil#174
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
See #173: the loader is the base the resolver and the API read.
What changes
src/dotnet/src/Ninlil.Dns.Server.HostsFiles(packed like its siblings, inNinlil.slnx) withExtension/ServiceCollectionHostsFilesExtension.cs, and test projectsrc/dotnet/tests/Ninlil.Dns.Server.HostsFiles.Tests.HostsFilesOptionsas #173 defines it (emptyPaths, 60 s TTL). Add it tosrc/dotnet/src/Ninlil.Web/EnvironmentVariables/OptionsEnvironmentVariableRegistry.cs; ENVIRONMENT.md rows forNINLIL_DNS_SERVER_HOSTS_FILES_EXPAND_DOMAIN,..._TIME_TO_LIVE_SECONDSand..._POLL_INTERVAL, a note thatPathshas no variable, and the totals counted fromOptionsEnvironmentVariableMap.BuildMappings.HostsFileParser:DnsName(RFC 1123 §2.1); IPv6 with a zone index (fe80::1%eth0) skippedPathsalready keeps the system file out.HostsFileTable: immutable, case-insensitive name to addresses lookup, plus address to first name, with theExpandDomainforms.HostsFileLoader(hosted service): load on start, watch plus poll, swap the table atomically, keep the last good entries of an unreadable file. Caps as constants (for example 16 MiB per file, 1,000,000 entries in total) with one warning when hit. It re-readsPathsthroughIOptionsMonitor, so a settings change applies without a restart.IHostsFileStatusProvider: per path its kind (file or directory), entries loaded, invalid line count, last load time and last error.Program.cs. Nothing answers queries yet (#175).Acceptance
Parse_ForALineWithAliases_ReturnsOneEntryPerNameinsrc/dotnet/tests/Ninlil.Dns.Server.HostsFiles.Tests.ExpandDomain; the same name in two files gives both addresses; a rewritten file reloads within one poll interval (temp folder, short interval); an unreadable file keeps its previous entries and reports an error; caps; the defaults are an empty list and 60 s.dotnet test src/dotnet/tests/Ninlil.Web.Tests --filter FullyQualifiedName~EnvironmentVariablepasses.dotnet test src/dotnet/tests/Ninlil.Dns.Server.HostsFiles.Tests,dotnet test src/dotnet/tests/Ninlil.Web.Tests.Source
audit-feature-parity.md§2A #15; hosts(5) manual page for the file layout.Owner decision 2026-10-31: Q-PN-11; round 2 R2-HOSTS-DEF ("empty list by default, 60 s TTL").