HabrAugust 28, 2026🇷🇺Translated from Russian

From HAProxy to VLESS+Reality: Overcoming DPI Blocks for MTProto Telegram Proxies

A technical case study details the difficulties of operating a reliable MTProto proxy for Telegram inside Russia when facing modern ISP deep-packet inspection. The author began with the popular mtg implementation and quickly discovered that simple forwarding solutions were insufficient against active protocol fingerprinting.

The first architecture placed HAProxy in TCP passthrough mode on a Russian server, forwarding traffic to a foreign mtg instance. Because HAProxy and raw iptables DNAT preserve every byte of the original stream, the ISP’s DPI continued to recognize the characteristic MTProto and fake-TLS patterns and throttled the connection. Changing ports or replacing HAProxy with SOCKS5 produced identical results, proving that any unauthenticated TCP tunnel remains detectable.

Only the introduction of VLESS+Reality delivered consistent connectivity. Reality performs a genuine TLS 1.3 handshake with a live destination domain, making the traffic indistinguishable from ordinary HTTPS for passive observers. The final topology routes client connections through local mtg, then through a localhost SOCKS5 listener into an Xray client that establishes a multiplexed VLESS+Reality tunnel to a foreign Xray server.

Several configuration errors were encountered and resolved. Enabling the xtls-rprx-vision flow caused immediate connection resets because the flow parser expects structured TLS records that MTProto payloads do not contain. Removing the flow parameter restored functionality. Even after that fix, short-lived Telegram connections frequently timed out during the full TLS handshake; enabling mux with concurrency 32 on the outbound eliminated repeated handshakes and stabilized the link.

Testing across multiple Russian providers revealed that some hosters apply aggressive DPI at their network edge while others do not. The same configuration that failed on the original provider worked immediately on a second provider, confirming that the root cause was the first provider’s traffic policy rather than the proxy architecture itself.

The article supplies complete configuration files, docker-compose stacks, Reality key-generation commands, and a practical checklist covering flow settings, IPv4 preference, destination domain selection, and connectivity validation with the built-in mtg doctor command.

Related articles

HabrPrivacy & Surveillance

Hydrat Project Builds Automated WireGuard Gateway for Resilient VLESS and Tor Routing

A developer has released Hydrat, a self-hosted gateway that connects devices via WireGuard while automatically managing VLESS and Tor backends to survive server blocks and quality degradation. The system maintains a pool of tested proxies, performs continuous health checks, and switches routes without requiring client-side profile changes. Two Go processes handle control logic and network enforcement separately, using SQLite for state and nftables plus Xray for traffic routing. TCP and UDP can be assigned independent exits, with geoip.dat support and custom rules to keep marketplace apps functional. The project emphasizes stability over direct connections and is designed for deployment on servers in Russian jurisdiction.

AntiMalwarePrivacy & Surveillance

OpenAI Contractors Manually Review Real User Chats in Project Lily

OpenAI has engaged hundreds of external contractors to analyze actual user conversations with ChatGPT as part of its model improvement efforts. The reviewers, working under project Lily, examine real queries that may contain personal, medical, or other sensitive information despite the use of a Privacy Filter. Contractors summarize prompts, compare four model responses, and assign ratings from one to seven while flagging behaviors such as excessive sycophancy or inappropriate emojis. User identities are hidden and some data is filtered, yet OpenAI acknowledged that not all personal information is reliably removed. The same human review process is also employed by Anthropic for its Claude model. Users can opt out of future training use through account settings, although prior data remains unaffected.

HabrPrivacy & Surveillance

UDP Proxies and QUIC Protocol: How Real IP Addresses Leak Through Anti-Detect Browsers

Anti-detect browser users relying on UDP-capable proxies face a hidden risk of real IP leakage when the browser fails to properly route UDP traffic. The QUIC protocol, which powers HTTP/3, runs over UDP and enables features like 0-RTT handshakes, independent streams, and connection migration that can bypass proxy routes. WebRTC connections using ICE, STUN, and TURN further increase exposure because they often attempt direct UDP paths outside the configured SOCKS5 proxy. Without deep network stack control such as TUN interfaces or socket interception, browsers may send WebRTC and QUIC packets through the host's real network interface. Aurorium Browser claims to solve this by natively supporting UDP proxying so that both QUIC and WebRTC traffic stays inside the tunnel. The article stresses that simply disabling WebRTC or forcing HTTP/2 fallback is insufficient and can itself create detectable anomalies for anti-fraud systems.

AntiMalwarePrivacy & Surveillance

Google to Offer Granular Controls for Advanced Protection Mode in Android 16

Google is preparing more flexible settings for its Advanced Protection security mode that first appeared in Android 16. The changes were discovered by Android Authority researchers while examining Google Play Services version 26.36.30. A new Expert features section will let users enable individual protections such as USB Protection, intrusion detection logging, and restrictions on unsafe Wi-Fi networks without activating the entire strict mode. USB Protection blocks new USB connections while the screen is locked to prevent physical attacks, though it can interfere with fast charging on Pixel 6 and newer devices. Users will also be able to opt out of automatic connections to open or risky Wi-Fi networks if they regularly use public hotspots. Intrusion Logging remains optional and stores encrypted security logs in the cloud. The update aims to preserve core security benefits while removing the all-or-nothing requirement of the current Advanced Protection implementation.