Our Windows IoT Core devices sit behind a firewall that blocks all outgoing traffic except what goes through a proxy server. We have tried many ways to configure the proxy server settings but all have failed. Note that we have been developing a custom FFU using the IoT Core ADK Addon kit. We are using Windows IoT Core v.10.0.17763.253 LTSC build. However we have tried the below with several versions of IoT Core and have not had success on other versions either.
1) Netsh winhttp set proxy is not a feature in this version of Windows IoT Core (BIG miss guys...ugh)
2) We used Windows Configuration Designer to create a provisioning package and deployed to c$\Windows\Provisioning\Packages. We rebooted several times and tried many provisioning settings, but the proxy server setting does not work. We have successfully changed many other settings with provisioning packages, so we think we are doing it right, but we see no changes being made to the registry and it appears that nothing happens. (this should work..???)
3) We tried WebRequest.DefaultWebProxy = new WebProxy("http://192.168.1.87:8080", false); This did not work.
4) We used the code how-setup-proxy-server-for-ftp-and-vnc-in-windows-10-core-iot-for-imax-6-solo-series by Michael Xu. This partially works. It changes the registry settings below:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
IE5_UA_Backup_Flag REG_SZ 5.0
User Agent REG_SZ Mozilla/5.0 (compatible; MSIE 9.0; Win32)
EnableNegotiate REG_DWORD 0x1
ProxyEnable REG_DWORD 0x1
ProxyServer REG_SZ 192.168.1.87:8080
These changes do enable HttpWebRequests through the proxy for current user. We are able to Invoke-WebRequest and it will go through the proxy.
The problem is that other services like Windows Update, Azure IoT DM Client, and our Azure IoT Hub connections that run in our background applications do not go through the proxy. We can see them being blocked by the firewall. On a desktop, these types of requests use WinHttpSettings, so we tried to change those....
5) We manually edited the WinHttpSettings registry key below. We took the registry key from a Windows PC (where the proxy server works fine for background processes) and copied it to the IoT Core device, but it did not work. No changes to WinHttpSettings seem to direct background traffic through proxy.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
WinHttpSettings REG_BINARY 28000000000000000300000016000000687474703D3139322E3136382E312E38373A3830383000000000
Out of ideas and stuck... can't rollout until this is solved. We are not experts in how the InternetSetOption API and IoT Core are working under the covers to determine the proper configuration, if that is even the right way...
Appreciate any help!