pub fn nonce(&self) -> Option<&[u8]> {
        match *self {
            #[cfg(feature = "stream-cipher")]
            Self::Stream(ref reader) => reader.iv(),
            #[cfg(feature = "aead-cipher")]
            Self::Aead(ref reader) => reader.salt(),
            Self::None => None,
            #[cfg(feature = "aead-cipher-2022")]
            Self::Aead2022(ref reader) => reader.salt(),
        }
    }
Get received IV (Stream) or Salt (AEAD, AEAD2022)
crates/shadowsocks/src/relay/tcprelay/crypto_io.rs