Как узнать и сбросить настройки прокси-сервера WinHTTP в Windows 10
В этом посте будет показано, как найти настройки прокси-сервера вашего компьютера Windows с помощью PowerShell, CMD, реестра и т. Д. Кроме того, если у вас возникли проблемы с загрузкой обновлений Windows или другие проблемы с сетевым подключением, вы можете выполнить сброс Настройки прокси на вашем компьютере с Windows 10 и посмотрите, поможет ли это вам.
Что такое WinHTTP прокси
Microsoft заявляет, что Windows HTTP Services (WinHTTP) — это технология доступа к HTTP, которая предоставляет разработчикам высокоуровневый интерфейс с поддержкой сервера для интернет-протокола HTTP/1.1. WinHTTP предназначен для использования преимущественно в серверных сценариях серверными приложениями, которые взаимодействуют с HTTP-серверами. WinHTTP также предназначен для использования в системных службах и клиентских приложениях на основе HTTP.
Проверьте настройки прокси-сервера
Я не использую прокси, поэтому некоторые записи могут быть не видны на моих скриншотах.
1] Командная строка
Вы должны использовать встроенный инструмент netsh.exe в вашей операционной системе Windows.
Чтобы просмотреть информацию о прокси-сервере вашего компьютера, откройте командную строку с повышенными привилегиями, введите следующую команду и нажмите клавишу ВВОД:
Есть и другие способы найти настройки прокси вашего ПК.
2] Google Chrome
В браузере Chrome введите следующее в адресную строку и нажмите Enter:
Вы увидите настройки прокси здесь.
3] Mozilla Firefox
В браузере Firefox введите следующее в адресную строку и нажмите Enter:
Прокрутите вниз и нажмите кнопку Настройки сетевого прокси, чтобы увидеть их.
4] Редактор реестра
Откройте REGEDIT и перейдите к следующей клавише:
Клавиша ProxyEnable контролирует настройки прокси. 0 отключает их, а 1 включает их. Если вы используете прокси, вы получите его значение под ключом ProxyServer .
5] PowerShell
Запустите PowerShell от имени администратора и выполните следующую команду:
6] Свойства обозревателя
Откройте «Свойства обозревателя»> вкладка «Подключения»> нажмите кнопку «Настройки сети». Там вы увидите настройки прокси-сервера.
7] Настройки Windows
Откройте «Настройки Windows»> «Сеть и Интернет»> «Прокси». Здесь вы увидите настройки прокси-сервера.
Как сбросить настройки прокси WinHTTP в Windows 10
Если ваша система использует прокси-сервер и вы хотите удалить его, откройте командную строку с повышенными привилегиями, введите следующую команду и нажмите клавишу ВВОД:
Это позволит удалить прокси-сервер и настроить «прямой доступ» к Интернету.
Говоря о сбросе настроек, вот несколько публикаций на этом сайте, которые помогут вам сбросить другие функции:
Сбросить все параметры локальной групповой политики | Сбросить приложения Магазина Windows | Сброс кеша Магазина Windows | Сбросить настройки клавиатуры | Сброс настроек сенсорной панели | Сброс устройства Surface Pro | Сброс настроек браузера Microsoft Edge | Сбросить настройки Internet Explorer | Сбросить корзину | Сброс настроек браузера Chrome | Сброс настроек Firefox | Сброс настроек безопасности Windows | Сбросить настройки брандмауэра Windows | Сброс Winsock | Сбросить TCP/IP | Сброс кеша DNS | Сбросить Центр обновления Windows | Сбросить каждый компонент Центра обновления Windows | Сбросить пароль Windows.
Как настроить работу Windows Update через прокси-сервер
Ни для кого не секрет, что в том случае, если Ваш ПК с ОС Microsoft выходит в интернет с помощью прокси-сервера, то служба обновления системы Windows Update по-умолчанию не работает. Эта заметка о том, как можно настроить работу системы обновлений Windows на ПК, находящимся за прокси-сервером.
Служба обновлений Windows Update может использовать HTTP прокси-сервер. Однако указания прокси-сервера в настройках Windows Internet Explorer недостаточно для работы службы обновления через проксю. Дело в том, что Windows Update использует Windows HTTP Services (WinHTTP) для поиска обновления, а для загрузки обновлений используется BITS. Служба Windows Update по-умолчанию настроена так, что всегда пытается попасть на сервер обновлений Microsoft напрямую, не используя прокси-сервер, даже если в настройках Internet Explorer он указан.
Однако данная проблема решаема, достаточно настроить системный WinHttp прокси. В ОС Windows XP/2003 WinHttp прокси задавался с помощью утилиты proxycfg.exe. В новых ОС Windows Vista/7/2008 данная утилита упразднена и настройка WinHttp прокси выполняется при помощи команды netsh.
Настройка выполняется при помощи следующей команды: netsh winhttp set proxy : .
После того, как вы выполните данную команду, ваша ОС Windows 7 будет обновляться, даже находясь за прокси-сервером.
Как вариант, если вы хотите взять настройки прокси из Internet Explorer, можно воспользоваться командой:
Как вариант возможна также ситуация, когда необходимо перенаправить весь трафик, кроме трафика на Microsoft (системные обновления, активация) на прокси-сервер, тогда можно воспользоваться следующей командой обхода прокси для обновлений Windows.
Сделайте обход прокси для активации и обновлений вот так:
Текущие настройки WinHttp можно посмотреть командой:
Сбросить же настройки прокси сервера можно при помощи команды:
Configure device proxy and Internet connectivity settings
Welcome to Microsoft Defender for Endpoint, the new name for Microsoft Defender Advanced Threat Protection. Read more about this and other updates here. We’ll be updating names in products and in the docs in the near future.
Applies to:
The Microsoft Defender ATP sensor requires Microsoft Windows HTTP (WinHTTP) to report sensor data and communicate with the Microsoft Defender ATP service.
The embedded Microsoft Defender ATP sensor runs in system context using the LocalSystem account. The sensor uses Microsoft Windows HTTP Services (WinHTTP) to enable communication with the Microsoft Defender ATP cloud service.
For organizations that use forward proxies as a gateway to the Internet, you can use network protection to investigate behind a proxy. For more information, see Investigate connection events that occur behind forward proxies.
The WinHTTP configuration setting is independent of the Windows Internet (WinINet) Internet browsing proxy settings and can only discover a proxy server by using the following discovery methods:
Web Proxy Auto-discovery Protocol (WPAD)
If you’re using Transparent proxy or WPAD in your network topology, you don’t need special configuration settings. For more information on Microsoft Defender ATP URL exclusions in the proxy, see Enable access to Microsoft Defender ATP service URLs in the proxy server.
Manual static proxy configuration:
- Registry based configuration
- WinHTTP configured using netsh command – Suitable only for desktops in a stable topology (for example: a desktop in a corporate network behind the same proxy)
Configure the proxy server manually using a registry-based static proxy
Configure a registry-based static proxy to allow only Microsoft Defender ATP sensor to report diagnostic data and communicate with Microsoft Defender ATP services if a computer is not be permitted to connect to the Internet.
The static proxy is configurable through Group Policy (GP). The group policy can be found under:
- Administrative Templates > Windows Components > Data Collection and Preview Builds > Configure Authenticated Proxy usage for the Connected User Experience and Telemetry Service
- Set it to Enabled and select Disable Authenticated Proxy usage:
- Set it to Enabled and select Disable Authenticated Proxy usage:
- Administrative Templates > Windows Components > Data Collection and Preview Builds > Configure connected user experiences and telemetry:
- This will affect all applications including Windows services which use WinHTTP with default proxy.
- Laptops that are changing topology (for example: from office to home) will malfunction with netsh. Use the registry-based static proxy configuration.
Configure the proxy:
The policy sets two registry values TelemetryProxyServer as REG_SZ and DisableEnterpriseAuthProxy as REG_DWORD under the registry key HKLM\Software\Policies\Microsoft\Windows\DataCollection .
The registry value TelemetryProxyServer takes the following string format:
For example: 10.0.0.6:8080
The registry value DisableEnterpriseAuthProxy should be set to 1.
Configure the proxy server manually using netsh command
Use netsh to configure a system-wide static proxy.
Open an elevated command-line:
a. Go to Start and type cmd.
b. Right-click Command prompt and select Run as administrator.
Enter the following command and press Enter:
For example: netsh winhttp set proxy 10.0.0.6:8080
To reset the winhttp proxy, enter the following command and press Enter
Enable access to Microsoft Defender ATP service URLs in the proxy server
If a proxy or firewall is blocking all traffic by default and allowing only specific domains through, add the domains listed in the downloadable sheet to the allowed domains list.
Item Description
SpreadsheetThe spreadsheet provides specific DNS records for service locations, geographic locations, and OS. If a proxy or firewall has HTTPS scanning (SSL inspection) enabled, exclude the domains listed in the above table from HTTPS scanning.
settings-win.data.microsoft.com is only needed if you have Windows 10 devices running version 1803 or earlier.
URLs that include v20 in them are only needed if you have Windows 10 devices running version 1803 or later. For example, us-v20.events.data.microsoft.com is needed for a Windows 10 device running version 1803 or later and onboarded to US Data Storage region.
If you are using Microsoft Defender Antivirus in your environment, please refer to the following article for details on allowing connections to the Microsoft Defender Antivirus cloud service: https://docs.microsoft.com/windows/security/threat-protection/microsoft-defender-antivirus/configure-network-connections-microsoft-defender-antivirus
If a proxy or firewall is blocking anonymous traffic, as Microsoft Defender ATP sensor is connecting from system context, make sure anonymous traffic is permitted in the previously listed URLs.
Log analytics agent requirements
The information below list the proxy and firewall configuration information required to communicate with Log Analytics agent (often referred to as Microsoft Monitoring Agent) for the previous versions of Windows such as Windows 7 SP1, Windows 8.1, Windows Server 2008 R2, Windows Server 2012 R2, and Windows Server 2016.
Agent Resource Ports Direction Bypass HTTPS inspection *.ods.opinsights.azure.com Port 443 Outbound Yes *.oms.opinsights.azure.com Port 443 Outbound Yes *.blob.core.windows.net Port 443 Outbound Yes Microsoft Defender ATP service backend IP range
If your network devices don’t support the URLs added to an «allow» list in the prior section, you can use the following information.
Microsoft Defender ATP is built on Azure cloud, deployed in the following regions:
You can find the Azure IP range on Microsoft Azure Datacenter IP Ranges.
As a cloud-based solution, the IP range can change. It’s recommended you move to DNS resolving setting.
Verify client connectivity to Microsoft Defender ATP service URLs
Verify the proxy configuration completed successfully, that WinHTTP can discover and communicate through the proxy server in your environment, and that the proxy server allows traffic to the Microsoft Defender ATP service URLs.
Download the MDATP Client Analyzer tool to the PC where Microsoft Defender ATP sensor is running on.
Extract the contents of MDATPClientAnalyzer.zip on the device.
Open an elevated command-line:
a. Go to Start and type cmd.
b. Right-click Command prompt and select Run as administrator.
Enter the following command and press Enter:
Replace HardDrivePath with the path where the MDATPClientAnalyzer tool was downloaded to, for example
Extract the MDATPClientAnalyzerResult.zip file created by tool in the folder used in the HardDrivePath.
Open MDATPClientAnalyzerResult.txt and verify that you have performed the proxy configuration steps to enable server discovery and access to the service URLs.
The tool checks the connectivity of Microsoft Defender ATP service URLs that Microsoft Defender ATP client is configured to interact with. It then prints the results into the MDATPClientAnalyzerResult.txt file for each URL that can potentially be used to communicate with the Microsoft Defender ATP services. For example:
If at least one of the connectivity options returns a (200) status, then the Microsoft Defender ATP client can communicate with the tested URL properly using this connectivity method.
However, if the connectivity check results indicate a failure, an HTTP error is displayed (see HTTP Status Codes). You can then use the URLs in the table shown in Enable access to Microsoft Defender ATP service URLs in the proxy server. The URLs you’ll use will depend on the region selected during the onboarding procedure.
The Connectivity Analyzer tool is not compatible with ASR rule Block process creations originating from PSExec and WMI commands. You will need to temporarily disable this rule to run the connectivity tool.
When the TelemetryProxyServer is set, in Registry or via Group Policy, Microsoft Defender ATP will fall back to direct if it can’t access the defined proxy.