I have seen the other posts on this problem and they usually relate to setting the proxy and/or TLS12. I have done both those things and set the proxy every which way, but my traffic is still going DIRECT.
PS C:Windowssystem32> netsh winhttp show proxy
Current WinHTTP proxy settings:
Proxy Server(s) : proxy.here.com:1234
Bypass List : (none)
My Script and output:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy($proxy)
[system.net.webrequest]::defaultwebproxy.credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true
$env:http_proxy = "http://proxy.here.com:1234"
$env:https_proxy = "http://proxy.here.com:1234"
Get-PackageProvider -Name NuGet -ErrorAction 'SilentlyContinue' -Force -Verbose
VERBOSE: No match was found for the specified search criteria and provider name 'NuGet'. Try 'Get-PackageProvider -ListAvailable' to see if the provider exists
on the system.
VERBOSE: Finding the package 'Bootstrap::FindPackage' 'NuGet','','0.0.0.1','''.
WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «»
VERBOSE: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '2' more times.
WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.
VERBOSE: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '2' more times.
VERBOSE: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '1' more times.
VERBOSE: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '1' more times.
VERBOSE: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '0' more times.
WARNING: Unable to download the list of available providers. Check your internet connection.
VERBOSE: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '0' more times.
I have monitored all traffic leaving the host IP and I never see anything to that URL. What I do see is a series of calls being made to:
https://onegetcdn.azureedge.net/providers/providers.masterList.feed.swidtag
And these calls are not using the proxy, they are going DIRECT and getting blocked at the firewall. I have had Zero success at forcing this traffic to the proxy.
More frustrating, I can then demonstrate the proxy working fine to that same URL in the same session:
VERBOSE: GET https://onegetcdn.azureedge.net/providers/providers.masterList.feed.swidtag with 0-byte payload
VERBOSE: received 1847-byte response of content type text/plain; charset=utf-8
StatusCode : 200
StatusDescription : OK
Content : <?xml version="1.0" encoding="utf-8"?>```