zapret-kvn/xray_fluent/diagnostics/connection_message.py
loop-uh 1e6268b6a8
All checks were successful
Windows project source guards / test (push) Successful in 1m19s
fix: align Hysteria startup and defer collapsed server updates
2026-09-06 13:50:00 +03:00

12 lines
805 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Short connection errors for the UI; full core evidence stays in the log."""
def connection_message(message: str) -> str:
text = (message or "").strip()
lowered = text.lower()
if "no authenticated handshake observed" in lowered:
return "Сервер AWG не ответил на запрос подключения. Подробности — в логах."
if "functional https probes failed" in lowered or "_ssl.c:" in lowered:
return "Проверка HTTPS через VPN не завершилась. Подробности — в логах."
if "no recent network activity" in lowered:
return "Hysteria не удалось установить соединение с сервером: превышено время ожидания."
return text