mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
091db15fe1
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 : cf29f76826cc7728fd36505c8271bf50001c644c
73 lines
1.9 KiB
Python
73 lines
1.9 KiB
Python
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
DIRS += [
|
|
'components',
|
|
'content',
|
|
'crashreporter',
|
|
'forgetaboutsite',
|
|
'locales',
|
|
'modules',
|
|
'mozapps/downloads',
|
|
'mozapps/extensions',
|
|
'mozapps/handling',
|
|
'mozapps/preferences',
|
|
'pluginproblem',
|
|
'profile',
|
|
'themes',
|
|
]
|
|
|
|
if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
|
DIRS += ['mozapps/update']
|
|
|
|
if CONFIG['MOZ_MAINTENANCE_SERVICE'] or CONFIG['MOZ_UPDATER']:
|
|
DIRS += [
|
|
'mozapps/update/common',
|
|
]
|
|
|
|
if CONFIG['MOZ_MAINTENANCE_SERVICE']:
|
|
DIRS += [
|
|
'components/maintenanceservice'
|
|
]
|
|
|
|
DIRS += ['xre']
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
|
|
DIRS += ['system/unixproxy']
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
DIRS += ['system/osxproxy']
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
DIRS += ['system/windowsproxy',
|
|
'system/windowsDHCPClient']
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
|
DIRS += ['system/androidproxy']
|
|
|
|
TEST_HARNESS_FILES.testing.mochitest.browser.toolkit.crashreporter.test.browser += [
|
|
'crashreporter/test/browser/crashreport.sjs',
|
|
]
|
|
|
|
with Files('moz.*'):
|
|
BUG_COMPONENT = ('Firefox Build System', 'General')
|
|
|
|
with Files('toolkit.mozbuild'):
|
|
BUG_COMPONENT = ('Firefox Build System', 'General')
|
|
|
|
with Files('nss.configure'):
|
|
BUG_COMPONENT = ('Firefox Build System', 'General')
|
|
|
|
with Files('library/**'):
|
|
BUG_COMPONENT = ('Firefox Build System', 'General')
|
|
|
|
with Files('mozapps/installer/windows/**'):
|
|
BUG_COMPONENT = ('Toolkit', 'NSIS Installer')
|
|
|
|
with Files('mozapps/preferences/**'):
|
|
BUG_COMPONENT = ('Toolkit', 'Preferences')
|
|
|
|
with Files('pluginproblem/**'):
|
|
BUG_COMPONENT = ('Core', 'Plug-ins')
|
|
|