https://bugs.winehq.org/show_bug.cgi?id=52133
Bug ID: 52133 Summary: winhttp/wininet should not query mDNS for proxy auto-detection Product: Wine Version: 6.22 Hardware: x86-64 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: winhttp Assignee: wine-bugs@winehq.org Reporter: bshanks@codeweavers.com
At least on macOS, the default hostname is something like "XXs-MacBook-Pro.local". Wine then (correctly) reads the domain name as "local".
When winhttp or wininet tries to use DNS proxy auto-detection (i.e. WinHttpDetectAutoProxyConfigUrl() with the WINHTTP_AUTO_DETECT_TYPE_DNS_A option), they try to resolve "wpad.local".
On macOS this hangs for 5 seconds before failing, causing a 10-minute long hang while launching Halo: MCC.
This also opens a security hole by allowing anyone on the local network to advertise an HTTP proxy that will be used automatically by other hosts on the network.
Microsoft has disabled link-local name resolution (i.e. NetBIOS, LLMNR, mDNS) by default for WPAD for years: https://bugs.chromium.org/p/chromium/issues/detail?id=1176970#c29
This is done on Windows with the undocumented AI_DNS_ONLY flag to getaddrinfo(), unfortunately there is no equivalent UNIX flag. Adding a special-case for ".local" domains would at least prevent the most common case of mDNS resolution.