socker 1.0.0

Sans-IO SOCKS4, SOCKS4a, SOCKS5 and SOCKS5h protocol implementation
Documentation
//! Sans-IO implementation of SOCKS5 ([RFC 1928](https://www.rfc-editor.org/rfc/rfc1928)).
//!
//! This module knows how to encode and decode every SOCKS5 message - the
//! method negotiation greeting and choice ([`ClientGreeting`] /
//! [`ServerChoice`]), the username/password sub-negotiation
//! ([RFC 1929](https://www.rfc-editor.org/rfc/rfc1929), in [`auth`]), the
//! request/response pair for all commands ([`Request`] / [`Response`]), and
//! the UDP datagram header ([`UdpDatagram`]) - but it deliberately does
//! *not* dictate an order in which those messages are exchanged. The
//! negotiation flow is trivial enough that callers can drive it themselves;
//! the `socker-tokio` and `socker-compio` crates provide reference
//! implementations on top of async runtimes.
//!
//! All protocol numbers use [`caret`] types, so unassigned and reserved
//! values remain constructible and round-trip through encode/decode.
//!
//! [`caret`]: https://docs.rs/caret

pub mod auth;
pub mod messages;
pub mod types;
pub mod udp_relay;

#[cfg(test)]
mod tests;

pub use messages::{
    ClientGreeting,
    Request,
    Response,
    ServerChoice,
};
pub use types::{
    Address,
    AddressType,
    AuthenticationMethod,
    CommandType,
    Reply,
};
pub use udp_relay::UdpDatagram;

/// The SOCKS5 protocol version byte (`VER`), as defined by RFC 1928.
pub const VERSION: u8 = 0x05;