fix: frame alignment, ee-prefix for lite mode, qrencode in deps

- All frame boxes: correct 54-char width with emoji compensation
- Lite mode links now include ee-prefix + mask_host hex (fake-TLS)
- Added qrencode to ensure_deps() so QR codes work after fresh install
- Centralized link generation in generate_proxy_link()
- Fixed bot.py get_proxy_link() for lite mode ee-prefix
This commit is contained in:
anten-ka
2026-04-09 19:24:05 +03:00
parent d70e046035
commit fedc8f77fe
4 changed files with 48 additions and 42 deletions

View File

@@ -967,10 +967,16 @@ async def get_proxy_link() -> Optional[str]:
faketls_secret = f"ee{secret}{domain_hex}"
return f"tg://proxy?server={domain}&port={port}&secret={faketls_secret}"
# Lite-режим: IP
# Lite-режим: IP + fake-TLS с mask_host
code, stdout, _ = await sh("curl", "-s", "-4", "--max-time", "5", "https://api.ipify.org")
server = stdout.strip() if code == 0 and stdout.strip() else "0.0.0.0"
mask_host = config.get("mask_host", "")
if mask_host:
domain_hex = mask_host.encode().hex()
faketls_secret = f"ee{secret}{domain_hex}"
return f"tg://proxy?server={server}&port={port}&secret={faketls_secret}"
return f"tg://proxy?server={server}&port={port}&secret={secret}"