Replaces the earlier browser-demo PR, which targeted a branch that has since merged and predated the WebSocket-only tunnel. Ported onto today's main, with JP's two decisions.
DNS-over-HTTPS as a fallback (dns.Lookup, dns.DoH, dns.ConfirmWith, dns.ErrUnreachable, Config.Resolvers)
- Confirmation still asks the zone's nameservers directly. Only when a round reaches none of them does it switch to DNS-over-HTTPS: Cloudflare's and Google's by default, both of which must serve the change. Embedders can choose other resolvers with
Config.Resolvers. - The fallback allows 5 extra minutes, for resolver negative caches and our 300 s TTL. Where port 53 is silently dropped, each confirmation spends up to about 15 s on direct queries before falling back.
- In a browser it goes straight to DNS-over-HTTPS (
platform_js.go). - Caveat: a resolver serving the change shows that at least one nameserver does, not that all of them do. That's weaker than the direct check for the CAA-before-issuance ordering.
Pluggable client usage (ingress.Config.Usage, ingress.NoUsage)
Usagehas two methods:Listener(ln, provider, hostname)andDay(t, hostname). Nil means the existing disk-backed counter.NoUsageleaves the listener unwrapped. Each day's check readsnot-tracked, as dostatusandjetbridge-client usage.ListenrefusesOnDisagreementother thanNotifywith it.usage.Open("")'s in-memory mode is gone. The provider's usage is untouched.
The demo (examples/browser, hack/browser-demo.sh)
- js/wasm: an acmez ACME issuer and a dial-free transport, so requests go through
fetch. localStoragefor keys and certificates, handles resolved without DNS,NoUsage, DNS-over-HTTPS confirmation.- Loaded in Chrome: cross-origin
fetchand both DNS-over-HTTPS resolvers answered. A full route bring-up needs real credentials and hasn't been run.
For review (prose): README section "Serve from a browser tab" and a not-tracked line in the results list; docs/plan.md; docs/spikes.md §10; .changeset/dns-over-https-fallback.md (patch), .changeset/pluggable-usage.md (minor), .changeset/browser-demo.md (minor). The demo page keeps four lines of explanatory copy from the old branch, not redesigned.
The last commit fixes the usage commit (Listen now refuses a Store with no UsageDir before writing anything). Squash it if you prefer.