pub async fn accept(
client: BoxStream,
protocols: &[ProtocolId],
auth: &InboundAuthentication,
shadowsocks_config: Option<&InboundShadowsocksConfig>,
shadowsocks_metrics: Option<&Arc<ShadowsocksMetrics>>,
trojan_config: Option<&InboundTrojanConfig>,
) -> Result<AcceptedSession, AcceptError>Expand description
Read the first byte from the stream, detect the protocol, perform the
handshake parsing, and return an AcceptedSession without opening
any outbound connection or sending any success/failure reply.