Open Bug 1890542 Opened 7 months ago Updated 7 months ago

Also disable Prefetch non-manual configurations of socks proxy

Categories

(Core :: Networking: Proxy, defect, P2)

defect

Tracking

()

People

(Reporter: manuel, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

We currently only disable prefetch to avoid doing dns if the proxy was manually configured, not when it was configured through system proxy/PAC scripts.

netwerk/dns/DNSServiceBase.cpp#52-60

// We should avoid doing DNS when a proxy is in use.
if (StaticPrefs::network_proxy_type() ==
        nsIProtocolProxyService::PROXYCONFIG_MANUAL &&
    mHasSocksProxy && StaticPrefs::network_proxy_socks_remote_dns()) {
  // Allow IP lookups through, but nothing else.
  if (!HostIsIPLiteral(aHostname)) {
    return true;
  }
}

This should probably don't use the StaticPrefs to determine whether socks_remote_dns is enabled, but look into the ProxyInfo and determine whether the TRANSPARENT_PROXY_RESOLVES_HOST flag is set.

netwerk/base/nsIProxyInfo.idl#100-105

/**
 * This flag is set if the proxy is to perform name resolution itself.  If
 * this is the case, the hostname is used in some fashion, and we shouldn't
 * do any form of DNS lookup ourselves.
 */
const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0;
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-new]
Whiteboard: [necko-triaged][necko-priority-new] → [necko-triaged]
You need to log in before you can comment on or make changes to this bug.