1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! 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 use ;
pub use ;
pub use UdpDatagram;
/// The SOCKS5 protocol version byte (`VER`), as defined by RFC 1928.
pub const VERSION: u8 = 0x05;