Repository navigation
TgWsProxy: опциональный PROXY protocol v1 для работы за reverse proxy - #505
Merged
Merged
Conversation
Matches upstream tg-ws-proxy 1.11.4 --proxy-protocol: one v1 text line before the client handshake, used for the client label. Off by default; the header is read only from trusted peers (loopback unless configured), bounded to 107 bytes and 10 s, and a malformed, oversized, incomplete or v2 header closes the connection. Advanced setting with RU/EN strings. Closes #425
5 tasks
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.
Closes #425
Что сделано
--proxy-protocolчитает одну текстовую строку v1 перед рукопожатием (таймаут 10 с) и использует адрес только для метки в журнале. Поддержки v2 в upstream нет, поэтому реализован только v1, а бинарная сигнатура v2 явно отклоняется.ProxyProtocol: лимит 107 байт, таймаут чтения, строгий разборTCP4/TCP6/UNKNOWN. Неверный, слишком длинный, неполный заголовок или v2 закрывает соединение, не затрагивая разбор MTProto/Fake TLS.Как проверено
scripts/check.shсBYDLO_SAFE_DEV=1и-warnaserror: 1834 пройдено, 11 пропущено, 0 ошибок.Что не проверено
Работа за реальным nginx/HAProxy с живым Telegram — ручная проверка сопровождающим (шаг в TESTING.md).