pub enum FrameKind {
Abridged,
Intermediate,
Full {
send_seqno: Arc<AtomicU32>,
recv_seqno: Arc<AtomicU32>,
},
Obfuscated {
cipher: Arc<Mutex<ObfuscatedCipher>>,
},
PaddedIntermediate {
cipher: Arc<Mutex<ObfuscatedCipher>>,
},
FakeTls {
cipher: Arc<Mutex<ObfuscatedCipher>>,
tls_raw_pending: Arc<Mutex<Vec<u8>>>,
decoded_pending: Arc<Mutex<Vec<u8>>>,
},
}Expand description
How framing bytes are sent/received on a connection.
Obfuscated carries an Arc<Mutex<ObfuscatedCipher>> so the same cipher
state is shared (safely) between the writer task (TX / encrypt) and the
reader task (RX / decrypt). The two directions are separate AES-CTR
instances inside ObfuscatedCipher, so locking is only needed to prevent
concurrent mutation of the struct, not to serialise TX vs RX.
Variants§
Abridged
Intermediate
Full
Obfuscated
Obfuscated2 over Abridged framing.
Fields
cipher: Arc<Mutex<ObfuscatedCipher>>PaddedIntermediate
Obfuscated2 over Intermediate+padding framing (0xDD MTProxy).
Fields
cipher: Arc<Mutex<ObfuscatedCipher>>FakeTls
FakeTLS framing (0xEE MTProxy). Same Obfuscated2/PaddedIntermediate
transport as PaddedIntermediate, carried inside a decoy TLS
handshake + TLS record byte-stream framing. cipher is the real
data cipher (a fresh Obfuscated2 keypair generated after the decoy
handshake completes) – never derived from the ClientHello HMAC.