fix: support secured multi-secret handshakes and warm DC routing - #36
Draft
AndreyOsipuk wants to merge 5 commits into
Draft
fix: support secured multi-secret handshakes and warm DC routing#36AndreyOsipuk wants to merge 5 commits into
AndreyOsipuk wants to merge 5 commits into
Conversation
added 5 commits
July 23, 2026 11:33
mss-relay (cmd/mss-relay): TCP-релей с двухступенчатым MSS для РФ-плеча mtg. Слушает с нормальным MSS (клиентский ClientHello доезжает целиком), на время первого ответа сервера ставит TCP_MAXSEG=92 (анти-DPI для ТСПУ), потом возвращает полный размер - приём telemt client_mss_bulk, но на уровне релея. Цель - убрать второй порт и iptables-клейм, свести mtg-плечо к одному порту как :443 у telemt. ВАЖНО: на живом тесте (pr7, 27.08) сотовый Android по dd НЕ подключился без постоянного клейма - ему мелкий MSS нужен весь сеанс, а не только на рукопожатие. iPhone/Windows/ee при этом работали. Бинарь готов и оттестирован, но в проде пока socat+клейм: релей ждёт решения (двойной шейпинг с MTG_DD_SHAPE или отдельный порт под ee). 4 теста на порядок переключения MSS и прозрачность данных. proxy_stats: RejectReason-счётчики (initial_bytes/secured_handshake/client_hello/ replay/welcome) в /stats. Раньше в статистике были только успешные подключения - клиент с обрезанным рукопожатием (Windows FakeTLS) был невидим, ловили tcpdump'ом. Теперь отказы видны в JSON, watchdog сможет алертить по росту.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dd) handshakes before FakeTLS parsing;ee) clients.Validation
httpbin-backed tests (mtglib/TestHTTPSRequest,network/TestRealHTTPRequest).The production binary built from this branch is deployed to the mtg nodes behind
pr5–pr8relays. DD response shaping remains disabled in production because Android connectivity is faster and stable without the experimental fragmentation layer.