9ba63fd239481f7b8bb661b1f3d2b08d18812ea0
Extract the explicit typestate from fast-socks5 v1.0.0's server.rs into src/vendor/server.rs (ADR-011 §Amendment extraction, vendor.md cut table row 1): the states module, Socks5ServerProtocol<T, S>, the auth machinery (AuthMethod/AuthMethodSuccessState, the NoAuthentication/PasswordAuthentication impls, auth_method_enums! + StandardAuthentication), negotiate_auth/read_command/reply_success/ reply_error, transfer/wait_on_tcp, try_notify!, ErrorContext<T>, SocksServerError (landed early by the wire-vocabulary task). - carried change #2: new_reply is pub (byte-identity tested — v4 10-byte / v6 22-byte forms + the reply-code table) - extraction adjustments: log calls dropped (unused bindings renamed), reply_error's parse().unwrap() replaced with a compile-time const, auth_method_enums! de-exported to pub(crate) use, no anyhow/async-trait - cut (not copied): the legacy Socks5Server/Incoming/Socks5Socket, Config<A>/Authentication layer, DnsResolveHelper, the run_* + udp kernel-net handlers, the net-only test module - 12 first-party duplex tests: full no-auth round-trip, version mismatch, 0xff method refusal, 0x07 unknown-command reply, both reply forms byte-exact, password accept/reject Verification: cargo test (25 pass), --all-features, clippy --all-targets -D warnings (native + wasm32), cargo check --target wasm32-unknown-unknown, cargo fmt --check, cargo doc.
Languages
Rust
99%
Python
0.9%
Shell
0.1%