In the new setup proxies can't proxy localhost unless you set a pref to explicitly let them do that, and for "localhost" and hostnames ending in ".localhost" Firefox won't even ask the DNS stack for the IP, assuming loopback instead.
In the new setup proxies can't proxy localhost unless you set a pref to explicitly let them do that, and for "localhost" and hostnames ending in ".localhost" Firefox won't even ask the DNS stack for the IP, assuming loopback instead.
Which loopback, 127.0.0.1, ::1, or both?
1) If IPv6 disabled in prefs or caller explicitly requested IPv4 only, 127.0.0.1.
2) If localhost explicitly listed in the IPv4-only domains list in prefs, 127.0.0.1.
3) If caller explicitly requested IPv6 only, ::1.
4) Otherwise both 127.0.0.1 and ::1.
See nsHostResolver::InitLoopbackRecord in https://searchfox.org/mozilla-central/source/netwerk/dns/nsH... and nsDNSService::GetAFForLookup in https://searchfox.org/mozilla-central/source/netwerk/dns/nsD... for the key.af calculation that goes into that, as far as I can tell.
The "is secure context" state applies to 127.0.0.0/8 (again ignoring IPv6). See NetAddr::IsLoopBackAddressWithoutIPv6Mapping in https://searchfox.org/mozilla-central/source/netwerk/dns/DNS...
I'm pretty sure all of this is clearly specified at this point, so browsers should end up all aligning on a common behavior here at some point, if they haven't yet.