pub enum WsInspect {
NeedMore,
NotHttp,
HttpFallback,
Upgrade,
Reject(&'static str),
}Expand description
Result of inspecting buffered bytes for WebSocket upgrade.
Variants§
NeedMore
Need more data to determine protocol.
NotHttp
Not HTTP traffic, proceed as raw Trojan.
HttpFallback
HTTP but not WebSocket upgrade, fallback to HTTP backend.
Upgrade
Valid WebSocket upgrade request.
Reject(&'static str)
Reject with reason (e.g., path/host mismatch).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WsInspect
impl RefUnwindSafe for WsInspect
impl Send for WsInspect
impl Sync for WsInspect
impl Unpin for WsInspect
impl UnsafeUnpin for WsInspect
impl UnwindSafe for WsInspect
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