Showing posts with label Proxy. Show all posts
Showing posts with label Proxy. Show all posts

Powershell Website "Ping" using the winsystems web proxy

If you want to monitor/check (every 10s) continuesly if a website (in this exampe http://www.google.de) is reachable using powershell and also using the configured webproxy in your windows system, then you can use the following example:


while ($true) {
    $webClient = New-Object System.Net.WebClient
    $proxy = [System.Net.WebRequest]::GetSystemWebProxy()
    $proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    $webClient.Proxy = $proxy

    $proxyUri = $proxy.GetProxy([System.Uri]::new("http://www.google.de"))
    $proxyIp = $proxyUri.Host
    $proxyPort = $proxyUri.Port

    $startTime = Get-Date
    try {
        $response = $webClient.DownloadString("http://www.google.de")
        $endTime = Get-Date
        $latency = ($endTime - $startTime).TotalMilliseconds
        $statusCode = 200 # WebClient doesn't expose status code directly, assuming success here
        Write-Output "[$startTime] Latency: ${latency}ms, HTTP Status Code: $statusCode, Proxy:         $proxyIp :$proxyPort"
    } catch {
        $endTime = Get-Date
        $latency = ($endTime - $startTime).TotalMilliseconds
        $errorMessage = $_.Exception.Message
        Write-Output "[$startTime] Latency: ${latency}ms, Error: $errorMessage, Proxy: $proxyIp :$proxyPort"
    }

Start-Sleep -Seconds 10
}


powershell "ping" of website using proxy


Edge browser internal debug tools - example network traffic

 Microsoft Edge browser has some internal tools: edge://edge-urls/

Example usage net-export - debugging network traffic

  1. edge://net-export/ 


  2. Start & set file location (edge-net-export-log.json)
  3. Reproduce the issue in a new tab
  4. Stop recording
  5. The recording can be viewed via: https://netlog-viewer.appspot.com/#import
    → See Privacy: https://chromium.googlesource.com/catapult/+/master/netlog_viewer/
    "This app loads NetLog files generated by Chromium's chrome://net-export. Log data is processed and visualized entirely on the client side (your browser). Data is never uploaded to a remote endpoint."
  6. Select and load the file
  7. For example, Proxy/ProxyPAC Configuration: https://netlog-viewer.appspot.com/#proxy


  8. For example, detailed Event Timeline: https://netlog-viewer.appspot.com/#events


  9. For example, detailed DNS Events:


  10. Detailed Socket overview: https://netlog-viewer.appspot.com/#sockets
  11. Detailed HTTP/2 overview: https://netlog-viewer.appspot.com/#http2
  12. Detailed QUIC overview: https://netlog-viewer.appspot.com/#quic

Proxmox Intel NUC crashes - Detected Hardware Unit Hang

Problem  If you are running proxmox (e.g. proxmox v 8.4.14) on a Intel NUC and it sporadically crashes with the following entries in the log...