Skip to content

fix(web): align relay and bridge with Telegram's published protocol - #429

Merged
sleep3r merged 3 commits into
mainfrom
fix/web-proxy-audit
Sep 18, 2026
Merged

sleep3r merged 3 commits into
mainfrom
fix/web-proxy-audit

Conversation

@sleep3r

@sleep3r sleep3r commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

WEB proxy sessions now follow Telegram's published bridge contract while preserving existing root/dd links. The relay accounts retained allocations, bounds frame batches and closed-stream history, uses expiring carrier tokens, and serves operator-owned public files instead of a hostname-derived placeholder. The browser bridge bounds bytes and outstanding messages, validates its parent, and delivers individual native frames.

The installer preserves client IPs through explicitly trusted HTTP peers, corrects behind-to-mask transitions, suppresses credential URI error logs, and verifies an authenticated MTProto reply before enabling WEB-only. Set [web].public_dir for an ordinary website; without it public requests return 404 while WEB links remain functional.

Validation: 495 Linux unit tests pass in Debug and ReleaseSafe; 15 browser contract cases, 7 offline HTTPS/WSS setup checks, and 6 WEB integration scenarios pass. A bounded 16-session soak with an 8 MiB buffer budget reduced retained RSS growth from about 30 MiB to 2.6 MiB. All 27 Linux integration scenarios pass, including 10,000 connection churn. The silent-admission fixture now waits for the initial batch to be accounted before testing the next client; this removes a race reproduced on the original main without changing the proxy core.

The Debian 11 test image uses official final-LTS snapshots because the live security repository has removed its packages; package signatures remain mandatory. Other distributions and production APT sources are unchanged. The fixture build, subsequent package installation and snapshot signatures were verified locally.

@sleep3r
sleep3r marked this pull request as ready for review September 18, 2026 16:31
@sleep3r
sleep3r merged commit 668afc1 into main Sep 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant