Skip to main content

Module transport_obfuscated

Module transport_obfuscated 

Source
Expand description

Obfuscated MTProto transport.

Implements the MTProto Obfuscated2 transport used by MTProxy and required in ISP-restricted networks. Every byte sent and received is XOR’d with a rolling key derived from a random 64-byte nonce so that traffic is indistinguishable from random noise to deep-packet inspection.

Structs§

ObfCipher
Rolling AES-CTR key state. In practice Obfuscated2 uses straight XOR with a stream derived from the initial nonce, so we model it as a key stream.
ObfuscatedStream
Wraps a TcpStream with obfuscated MTProto2 framing.

Functions§

derive_keys
Derive enc_key, enc_iv, dec_key, dec_iv from a 64-byte obfuscation nonce.