mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
The connect_refused stat counter (the Refused line in fipstop) was defined but never incremented: every SOCKS5 connect failure recorded socks5_errors instead, so the counter sat at zero and the operator-facing gauge was permanently misleading. Both the synchronous connect path and the background connect_async task now count a genuine SOCKS5 REP=0x05 refusal as connect_refused and every other failure as a socks5_error, distinguishing them precisely via tokio_socks::Error::ConnectionRefused. Extends the mock SOCKS5 server with a configurable reply code and adds two tests covering the refused and general-failure paths.