15 Commits

Author SHA1 Message Date
Qz3rK 51ebb27e06 Update mtproto_tls_socket.cpp
-7
2026-05-30 19:40:23 +07:00
Qz3rK 018031b1d7 Fix DPI blocking by randomizing TLS ClientHello fingerprint
Default Telegram Desktop uses a static ClientHello with a fixed fingerprint, making it easy for DPI systems to detect and block MTProto traffic.

Changes:
 - Random selection between Chrome-like and Firefox-like fingerprint on each connection instead of a single static rule set
 - Dynamic cipher suites: a small set of essential suites are always present, a random subset is picked from the remaining ones, then everything is shuffled
 - Randomized TLS extensions: besides mandatory SNI, randomly add a few valid extensions from a predefined list, also shuffled
 - Chunked ClientHello sending with random delays between chunks and random initial delay, forced flush after each chunk
 - Disabled Nagle's algorithm via LowDelayOption for immediate packet sending
 - Added random jitter to timestamp to avoid perfect precision

Each new connection generates a unique ClientHello with different fingerprint, different cipher suites, different extensions and different sending pattern, making MTProto traffic detection by signature impossible.
2026-05-30 07:38:45 +07:00
Qz3rK 2089bfd1f3 implement DPI evasion for MTProto TLS connections
- Increase ClientHello size via padding
- Fragment outgoing packets with randomized chunk sizes
- Remove extension shuffling for stable fingerprint
- Add support for new TLS block schema types
- Add random jitter to timestamp generation
* Hacky implementation, needs review.
2026-05-29 05:42:07 +07:00
John Preston 407bf19641 Fix parts of client hello generation.
Inspired by wide internet discussions and #30513.
2026-04-03 15:48:00 +07:00
John Preston b72deb1a0e Update client hello algorithm. 2025-11-15 11:59:19 +04:00
John Preston 60fe961c21 Implement new client hello generation. 2023-04-27 21:11:03 +04:00
Ilya Fedin 6288da2f3d Remove socket errors from Qt adapters 2023-01-09 15:01:14 +04:00
John Preston 8658dba97a Improve mtproto connections logging. 2022-02-07 14:44:00 +03:00
23rd 0143d22a21 Split qt_adapters to separated files. 2022-01-26 10:33:28 +03:00
Ilya Fedin 847c01d605 Add Qt 6 support
Tested only on Linux so far
2021-10-21 13:15:00 +04:00
John Preston 8dac6896d6 Set Send/Receive buffer size for download TCP sockets. 2021-06-15 16:45:48 +04:00
John Preston 74d2313784 Build Linux version with Qt 5.15.1 in CentOS 7 docker. 2020-11-06 11:21:34 +03:00
John Preston 9463bbd266 Fix animated stickers with wrong dimensions. 2020-07-17 08:13:45 +04:00
Nicholas Guriev 9828262a03 Update GSL to v3.0.1 and lib_base
* Use identical types for std::min.
2020-05-01 12:03:18 +04:00
John Preston 91f50e8bdc Move some more code to lib_mtproto. 2019-12-02 16:11:22 +03:00