From 26fd9c3e85652e2023280f3e8a7a8cb04057131e Mon Sep 17 00:00:00 2001 From: Alexandr Bogomyakov Date: Wed, 26 Feb 2025 11:55:30 +0200 Subject: [PATCH] Update windows_task.ps1 --- tools/windows_task.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/windows_task.ps1 b/tools/windows_task.ps1 index 25b2f9f..9888e7e 100644 --- a/tools/windows_task.ps1 +++ b/tools/windows_task.ps1 @@ -60,6 +60,13 @@ function Start-SSLocal { # Main loop while ($true) { try { + if ($url -notmatch "mode=json") { + $delimiter = "?" + if ($url -match "\?") { + $delimiter = "&" + } + $url = "$url${delimiter}mode=json" + } # Download and parse the JSON $jsonContent = Invoke-WebRequest -Uri $url -UseBasicParsing | Select-Object -ExpandProperty Content $json = $jsonContent | ConvertFrom-Json