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>>,
},
}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).
Fields
§
cipher: Arc<Mutex<ObfuscatedCipher>>Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameKind
impl !RefUnwindSafe for FrameKind
impl Send for FrameKind
impl Sync for FrameKind
impl Unpin for FrameKind
impl UnsafeUnpin for FrameKind
impl !UnwindSafe for FrameKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more