gecko-dev/modules
Polly Shaw f95f738f4e Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.

Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
 looked for a PAC file at http://wpad/wpad.dat


This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.

The high-level components of this patch are:
 * nsIDHCPClient.idl - this is an interface which has been defined for querying the
   DHCP server.
 * nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
   http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
   thread. The class ExecutePACThreadAction has been augmented to include an
   instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
   'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
   file) back to the nsPACMan object.
 * nsProtocolProxyService.cpp
   Minor changes to reflect the fact that the PAC URL not being set does not always
   mean there is no PAC to be used; instead it could be in the process of being
   detected.
 * TestPACMan.cpp
   This is a new file, and tests only the DHCP auto-detect functionality.
   Some tests use multiple threads, as they test the non-blocking proxy detection.
 * DHCPUtils.cpp
   A class containing the main logic for querying DHCP.
 * WindowsNetworkFunctionsWrapper.cpp
   A very thin wrapper around the Windows API calls needed by DHCPUtils.
   This class was introduced so it could be mocked out in tests.
 * nsWindowsDHCPClient.cpp
 * An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
   most logic is implemented in DHCPUtils.
 * TestDHCPUtils.cpp
   Tests for DHCPUtils and nsWindowsDHCPClient

MozReview-Commit-ID: HinC1UevOon

--HG--
extra : rebase_source : df2b80fcc03948e54f222e11060e1783f3b95421
2018-04-22 18:13:11 +01:00
..
brotli Bug 1440656 - Update brotli library to upstream release 1.0.2. r=fredw 2018-02-23 14:32:23 +00:00
fdlibm Bug 1438599 - Part 2: Import fdlibm from FreeBSD (revision b21ccf63f28a3a4692d8a31419e0a725a1b1a800). r=jwalden 2018-02-18 22:56:46 +09:00
freetype2 Bug 1454359 - Cherry-pick more upstream FreeType fixes. r=jfkthame 2018-04-16 09:19:00 -04:00
libbz2 Bug 1445763 - Update moz.build meta data with "Firefox Build System". r=froydnj 2018-03-14 21:44:46 +01:00
libjar Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
libmar Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
libpref Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin 2018-04-22 18:13:11 +01:00
pdfium Backed out 22 changesets (bug 1399787) for shutdown leaks on windows 7 debug tc-M without e10s r=backout on a CLOSED TREE 2017-12-08 13:09:56 +02:00
woff2 Bug 1440658 - Update woff2 library to latest upstream code (currently at 1bccf208bca986e53a647dfe4811322adb06ecf8, release 1.0.2). r=fredw 2018-02-23 14:32:23 +00:00
xz-embedded Bug 1403346 - Replace all uses of ALLOW_COMPILER_WARNINGS with a template, remove ALLOW_COMPILER_WARNINGS. r=glandium 2017-10-25 15:12:09 -07:00
zlib Backed out 5 changesets (bug 1418425) requested per comment #83. on a CLOSED TREE a=backout 2018-01-15 15:30:30 +02:00
moz.build