mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
NormHost dropped one trailing dot from any host, so an IPv6 address whose zone is "." (::1%.) became ::1%, an empty zone, which netip reads as no address. The proxy refused both forms (HostOK), but a partial clone's promisor warning (privateHost) no longer saw ::1%. as private, as FuzzPromisorHostSite found. NormHost now leaves an address as it is, its dot included, so every judge reads such a host as the zoned address it is. Public now calls no address with a zone the internet's: netip's prefixes never contain a zoned address, so the ranges alone missed, for example, a zoned documentation address, which --from's registry check took as public. No VM could reach anything through such a host: every way in (CONNECT, absolute-form requests, a transparent connection's Host and its TLS server name) refused it with 400 before any lookup or connection, on every tier, the broker refuses a lookup of it and a connection to a zoned address, and no rule or NO_PROXY entry names one. Tests: TestZonedHostsRefused sends each zoned and empty-zone host through CONNECT, plain HTTP and the transparent path on the open, internet, allowlist, none and loopback-allowing tiers, checking each refusal is the proxy's own where net/http lets the request through, with a control on each path that [::1] itself reaches the dialer where allowed; it passed before the fix too, and fails when HostOK takes a zone. TestNormHost, TestBrokerLookup, TestBrokerDial, TestInternal and TestPublicAddr gain zoned cases; FuzzHostSites' splitSite and policySite list the new divergence (zoneDot), and FuzzPromisorHostSite lists a zoned address now counting as private; its crash input and the zoned-unspecified one ([::%[]:) are added. design.md's list of the host readers' differences names both. Co-Authored-By: Claude Opus 5.5 <[email protected]>