Some site fails to load (NS_ERROR_UNKNOWN_HOST) under Happy Eyeballs — routed to a .onion Alt-Svc alternate with no fallback
Categories
(Core :: Networking: HTTP, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: kershaw, Assigned: kershaw)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
With network.http.happy_eyeballs_enabled=true, loading an origin that advertises its Tor onion service via Alt-Svc fails with NS_ERROR_UNKNOWN_HOST (0x804B001E) and remains broken across a normal reload (Ctrl+R); only a shift-reload recovers. The root cause is that HE routes the real transaction to the unreachable .onion alternate without validating it first, and when that fails, it does not fall back to the origin.
What happens (based on the log)
-
The origin advertises its onion service as an HTTP/2
Alt-Svcalternate:alt-svc: h2="<alternate>.onion:443"; ma=86400; persist=1AltSvcMapping ctor https://<origin>:443 to <alternate>.onion:443
AltSvcCache::UpdateAltServiceMappingWithoutValidation … <alternate>.onionThe important part here is
WithoutValidation, along withpersist=1, which means the mapping is kept for 24 hours and persisted to disk. -
After that, every channel to the origin is routed to the
.onionalternate:Alt Service Mapping Found https://<alternate>.onion:443 [https:<origin>:443:…] -
HE then tries to resolve the routed host, which is the
.onion, while still using the origin’s conn-info (ci=<origin>:443[!h3]):MakeNewConnection … trans=<T>
CreateHappyEyeballs ipPref=0
HappyEyeballsEvent::Tag::SendDnsQuery id=0 hostname=<alternate>.onion
HappyEyeballsEvent::Tag::SendDnsQuery id=1 hostname=<alternate>.onion -
That
.onionresolution fails by design. Per RFC 7686,nsDNSService::PreprocessHostnamereturnsNS_ERROR_UNKNOWN_HOSTfor any*.onionname whennetwork.dns.blockDotOnionis true, which is the default..onionis a special-use TLD: it is never resolved through DNS and is only reachable through Tor onion routing. -
There is then no fallback to the origin. The HE attempt fails, the transaction is closed with that error, and the error propagates to the channel:
nsHttpTransaction::Close [this=<T> reason=804b001e]
nsHttpTransaction::ShouldRestartOnResumptionError [… mResumptionAttempted=0 error=804b001e] -
The origin’s direct addresses are only reached later with shift-reload, because that bypasses the route and the cache.
| Assignee | ||
Comment 1•4 days ago
|
||
Updated•4 days ago
|
Comment 3•1 day ago
|
||
| bugherder | ||
Description
•