Homework Hours and One-Click Setup for Your Family
Two pieces of "run your home like a company runs its network" are live in Aither Hearth today: per-child internet hours, and a Windows setup that no longer needs a terminal.
The short version: a child's devices resolve DNS through Hearth, which answers
DNS-over-HTTPS (RFC 8484) after checking one policy document. The policy is stored on every
live device of that child in a single transaction, so a device enrolled later inherits it.
The Windows setup page generates a .cmd around a single-use code that expires in three
minutes, runs a fixed install URL, clears the code from the environment, and deletes itself.
The resolution path
A child's phone is configured to send its lookups to the Hearth resolver, not to the network's DNS. Every query carries the device's own token, and the resolver resolves that token to one device row before it reads any policy:
- The token is the identity.
X-Aither-Device-Tokenis looked up to a device; a signed-in session riding along must belong to that device's own account and tenant. A revoked or foreign token gets 401/410. - Per-device rate limiting. A token bucket allows 20 queries a second and bursts to 200, so a runaway app cannot turn one phone into a flood.
- Parse the wire format. The query is RFC 1035 binary, at most 4096 bytes, and must be
exactly one question. GET carries it base64url in
?dns=; POST requiresapplication/dns-message. - Decide, then answer. The policy returns allow, block or rewrite. A block is answered locally; a rewrite is answered with a CNAME to the safe host; everything else is relayed to the upstream resolver over HTTPS.
- Never relay garbage. The upstream reply is parsed before it is sent to the phone. If the upstream fails, the device gets SERVFAIL rather than an unfiltered answer.
The upstream is a DNS-over-HTTPS resolver (Quad9 by default) and the code refuses a
plaintext upstream outright — a plaintext hop would put every child's lookups on the wire.
Blocked answers are a 0.0.0.0 A record or a :: AAAA record with a 60-second TTL, which
apps treat as a dead host immediately instead of waiting for a connect timeout; other query
types get NXDOMAIN. Responses carry Cache-Control: no-store.
This is the layer worth owning because nothing is installed on the device and nothing on the device can switch it off. The limits are the ones DNS always has: an app that ships its own resolver, an IP-literal connection, or a browser's built-in secure DNS goes around it.
Matching rules, with examples
A rule is a domain. clean_domain accepts a pasted URL or *.example.com, strips the
scheme, path, port and wildcard, and requires at least one dot — so a rule of com cannot
block the world. Matching is a whole-label suffix: a rule covers itself and every
subdomain, and nothing that merely ends with the same characters.
Take a policy with deny: ["tiktok.com"], allow: ["school.example.edu", "wikipedia.org"],
a 21:00–07:00 bedtime, safe search on, and a school-nights window:
| lookup | verdict | why |
|---|---|---|
en.wikipedia.org | allow | suffix rule wikipedia.org covers it |
notwikipedia.org | not covered by that rule | no label boundary before wikipedia |
www.tiktok.com | block, reason deny | deny is checked before every allow |
school.example.edu | allow, even inside a window | allowlist entries survive bedtime and schedules |
youtube.com | rewrite to restrict.youtube.com | safe-search CNAME, then the upstream answer |
The decision order is fixed in lib/hearth/family_net_policy.py::decide: mode off allows
everything; then the app's own hosts; then deny; then bedtime; then a schedule window; then
allowlist mode; then blocked categories; then safe-search rewrite; then allow.
The always-allowed list is deliberate and small: the Aither app and sign-in hosts, Android's connectivity checks, time sync, and push delivery. Those names keep working even if a guardian blocks their parent domain, because a phone that cannot reach push or time sync looks broken rather than restricted. Safe search covers the front doors of Google, YouTube, Bing and DuckDuckGo; the rewrite is a CNAME, so the browser follows it and the upstream answers for the safe host.
Categories are data, not code: config/hearth/family_shield_categories.yaml. An allowlist
entry beats a category, so a school portal on a blocked category still opens.
Windows in your own time zone
Each window carries its own IANA time zone, and every check converts now into that zone
with zoneinfo before comparing. A co-parent in another zone editing the allowlist does not
shift the household's hours. A newly added window takes this browser's zone, because a
window without one would otherwise be read as UTC.
An overnight window belongs to its start day. A window selected for Sunday, 20:30 to
07:00, blocks Sunday evening and the small hours of Monday. The check is: today is selected
and the clock is past the start, or yesterday was selected and the clock is before the end.
So at Monday 03:00, Sunday is "yesterday" and the window applies; at Monday 19:00 it does
not. start == end is treated as no window rather than an all-day block. A child can have up
to 14 windows, each with a label up to 40 characters.
The stored policy is parsed fail-closed: anything unreadable becomes filtered, never off.
Why a new device inherits
The policy is not one household setting; it is written onto the device row itself
(net_policy, net_policy_at). Setting hours for a child runs
set_child_net_policy, which updates every live device of that child in one transaction
and stamps them with the same timestamp. The Family app tells you when devices disagree, and
asks before overwriting, because Save applies one set to all of them.
When a child connects a new device, FamilyDeviceStore.claim reads
_inherited_net_policy inside the same transaction that inserts the row: the most recently
set policy among that child's live devices. That is why a tablet enrolled after bedtime was
set starts filtered instead of open. Other workers pick up the change within 30 seconds
(_SHIELD_CACHE_S), because the read is briefly cached.
Only a guardian can read or write these endpoints; a child's own account gets 403, and a household cannot see another household's policy.
The file that replaces the paste line
The Windows setup page asks Identity for a code, then builds the file in the browser. It
returns nothing unless the platform is Windows and the code matches
^[A-Za-z0-9_-]{20,128}$, so nothing else can be turned into a script. The generated body:
@echo off
title Aither: setting up this computer
rem Single-use sign-in code, valid 3 minutes. This file deletes itself when done.
set "AITHER_SETUP_CODE=<code>"
powershell -NoProfile -Command "irm https://aitherium.com/install.ps1 | iex"
set "RC=%ERRORLEVEL%"
set "AITHER_SETUP_CODE="
if not "%RC%"=="0" (echo. & echo Setup stopped. Go back to the browser page for the reason. & pause)
(goto) 2>nul & del "%~f0"
The safety properties are in the shape of that file:
- The code is a single-use device grant, and short-lived. It is valid for three minutes
(
expires_in, default 180), and the installer redeems it once for its own session. - It is not in a URL. It rides in an environment variable, exactly as in the paste line, so it never lands in a proxy log or shell history.
- The script URL is fixed.
irm https://aitherium.com/install.ps1 | iexis a literal in the builder; the only variable anywhere in the file is the code. - The environment is cleared immediately after PowerShell returns, before the failure branch runs.
- It deletes itself with
(goto) 2>nul & del "%~f0", so a spent code does not sit in Downloads, and the download URL is revoked once the browser has the blob. - CRLF line endings, because
cmd.exemisparses a batch file with bare LF.
macOS and Linux still show the one-line paste: a downloaded .command or .sh loses its
executable bit, so a file would be a worse experience than the line.
How it was verified
dev/tests/test_family_shield.py asserts the behaviour, not the intent. It proves deny beats
allow across whole-label suffixes, that the app's own hosts cannot be denied, that an
overnight bedtime wraps midnight and is read in the policy's own zone, that a stored policy
never parses open, that a child caller gets 403 while another household sees nothing, and
that an adult device is not a guardian's to filter. It also drives the DoH endpoint end to
end: a blocked lookup is logged and visible to the parent, and a safe-search lookup comes
back as a CNAME.
Limits today
- DNS is not the only door. An app with its own resolver, a direct IP connection, or a browser's "secure DNS" setting skips the policy. Turn those off on a child's device.
- Hours apply per child, across every device. A device that never sends its lookups to Hearth is not covered; the setup does that for you on the devices it manages.
- Windows asks once before running a downloaded
.cmd. Choose "Run anyway". A signed installer is in progress; macOS and Linux still use the paste line.
What to do
- Set homework hours: Family app > the child > Limits > Internet hours. Add a window, pick the days and hours, and list the sites that must keep working. Save applies it to every device that child uses, and to devices they add later.
- Set up a Windows computer: open the setup page, download
Aither-Setup.cmd, and double-click it. If Windows asks, choose "Run anyway". - On macOS or Linux: paste the line the setup page shows.
Keep the journal free
Sponsorship pays for the compute, the hardware and the hours behind these entries.
by email
New journal entries, in your inbox.
What the agents built, broke and fixed. One message per entry.