
dns prefetch question
locking as a duplicate of https://support.mozilla.org/en-US/questions/989798
Since nobody will anwser question about bug of dns prefetch, so I pick this title.
Firefox will do dns prefetch direct even user use http proxy or socks5 proxy with remote_dns setting.
And cannot disable by network.dns.disablePrefetch.
Here is the bug report 2 years ago.
https://support.mozilla.org/en-US/questions/928722
I check some source code of firefox 27.0.1:
network.dns.disablePrefetch affect places
nsDNSService2.cpp
1. prefs->GetBoolPref(kPrefDisablePrefetch, &disablePrefetch);
2. mDisablePrefetch = disablePrefetch || (proxyType == nsIProtocolProxyService::PROXYCONFIG_MANUAL);
3. nsDNSService::GetPrefetchEnabled(bool *outVal) { *outVal = !mDisablePrefetch; return NS_OK; } But no other places use method GetPrefetchEnabled
actual handle of dns prefetch
nsDocShell.cpp
1. mAllowDNSPrefetch(true),
2. can turn off with header mAllowDNSPrefetch = aData.IsEmpty() || aData.LowerCaseEqualsLiteral("on"); can turn off with https if (aNewPrincipal && mAllowDNSPrefetch && sDisablePrefetchHTTPSPref) { nsDocument.cpp
3. load from docshell docShell->GetAllowDNSPrefetch(&allowDNSPrefetch);
Looks network.dns.disablePrefetch and network.dns.disablePrefetchHttps has absolutely no effect,
network.dns.disablePrefetch always false and network.dns.disablePrefetchHttps always true.
And here is a photo show how dangers use firefox with proxy.
Also dns prefetch is disabled anyway on linux(ubuntu) and macosx (10.8).
I don't known why mozilla leave this bug will put many guy in dangerous 2 years .
Modified