- Typed exception hierarchy: sealed
SocksExceptionwithSocksHandshakeException,SocksRequestException,SocksConnectionException, andSocksCancelledException. All implementExceptionfor backward compatibility. SocksReplyCodeenum covering all 8 SOCKS5 reply codes (RFC 1928) withfromByte()lookup.- Tor circuit isolation via
isolationTokenparameter oncreate()andreconnect(). Sends token as SOCKS5 username/password auth (RFC 1929) to request separate Tor circuits. cancel()method to abort in-flightconnect()/connectTo()operations. No-op when already connected or disconnected.
- Fix fragmented SOCKS5 response reassembly (previously caused RangeError).
- Fix connection hang when proxy drops without responding; now times out.
- Fix SSL socket leak in
close(). - Fix
outputStreamcreating a newStreamControlleron every access. - Fix error handler double-reporting errors as both Object and String.
- Deprecate non-async
SOCKSSocket()constructor (causesLateInitializationError); useSOCKSSocket.create(). - Fix broadcast stream subscription race during handshake via Completer-based approach.
- Configurable
handshakeTimeoutandoperationTimeoutoncreate()(default 30s). write()newline option for line-delimited protocols.ConnectionStateenum (disconnected, connecting, connected, error).reconnect()to re-establish a dropped connection without creating a new instance.
- Dart & Flutter 3.
- Supports SOCKS version 5 protocol.
- SSL support.
- Supports ElectrumX and Fulcrum servers via socket(s).
- Async support for non-blocking network communication.
- Lightweight and minimal dependencies.
- Working example.