From 63b829471d403a7b80e76485d2b2a25c2041e570 Mon Sep 17 00:00:00 2001 From: VolandSZ <{E-MAIL}> Date: Thu, 3 Sep 2026 15:55:18 +0300 Subject: [PATCH] fix: support standard Chromium-GOST installer path (Chromium\Application\chrome.exe) --- tests/utils/tls.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/utils/tls.py b/tests/utils/tls.py index 6dbebb7..cc48ce5 100644 --- a/tests/utils/tls.py +++ b/tests/utils/tls.py @@ -38,7 +38,16 @@ def find_gost_browser_executable() -> Optional[str]: prog_files_x86 = os.environ.get("ProgramFiles(x86)", "") candidates = [ - # Chromium-Gost (AppData / Program Files) + # Пути официального установщика Chromium-GOST (устанавливается в папку Chromium\Application) + os.path.join(local_app_data, "Chromium", "Application", "chrome.exe"), + os.path.join(local_app_data, "Chromium", "chrome.exe"), + os.path.join(local_app_data, "Programs", "Chromium", "Application", "chrome.exe"), + os.path.join(prog_files, "Chromium", "Application", "chrome.exe"), + os.path.join(prog_files, "Chromium", "chrome.exe"), + os.path.join(prog_files_x86, "Chromium", "Application", "chrome.exe"), + os.path.join(prog_files_x86, "Chromium", "chrome.exe"), + + # Портативные пути и архивы Chromium-Gost os.path.join(local_app_data, "Chromium-Gost", "chrome.exe"), os.path.join(local_app_data, "Chromium-Gost", "Application", "chrome.exe"), os.path.join(local_app_data, "Programs", "Chromium-Gost", "chrome.exe"), @@ -47,15 +56,11 @@ def find_gost_browser_executable() -> Optional[str]: os.path.join(prog_files, "Chromium-Gost", "Application", "chrome.exe"), os.path.join(prog_files_x86, "Chromium-Gost", "chrome.exe"), os.path.join(prog_files_x86, "Chromium-Gost", "Application", "chrome.exe"), - # Яндекс.Браузер (поддерживает ГОСТ TLS при наличии КриптоПро CSP) - os.path.join(local_app_data, "Yandex", "YandexBrowser", "Application", "browser.exe"), - os.path.join(prog_files, "Yandex", "YandexBrowser", "Application", "browser.exe"), - os.path.join(prog_files_x86, "Yandex", "YandexBrowser", "Application", "browser.exe"), + # Linux / macOS пути "/opt/chromium-gost/chrome", "/usr/bin/chromium-gost", "/Applications/Chromium-Gost.app/Contents/MacOS/Chromium-Gost", - "/Applications/Yandex.app/Contents/MacOS/Yandex", ] for path in candidates: @@ -63,7 +68,7 @@ def find_gost_browser_executable() -> Optional[str]: return os.path.abspath(path) # 3. Поиск в системном PATH - for name in ("chromium-gost", "chrome-gost", "yandex-browser"): + for name in ("chromium-gost", "chrome-gost", "chromium"): found = shutil.which(name) if found: return os.path.abspath(found)