How briar/socks-socket works
This is a small Java SOCKS5 socket-factory library. A caller obtains a socket from the factory and connects it to an unresolved host; the socket opens a connection to the configured proxy, negotiates SOCKS5 (optionally with username/password authentication), and requests the destination connection. IoUtils handles socket streams and complete reads, while ByteUtils encodes the port. The excerpts show these internal calls; no README or evidence of other runtime capabilities was provided.
Main entry points: SocksSocket.java SOCKS5 socket · SocksSocketFactory.java SOCKS socket factory · IoUtils.java Socket I/O helpers · ByteUtils.java Unsigned port encoding
Components 6
SOCKS connections
- SOCKS socket factory
lib/src/main/java/org/briarproject/socks/SocksSocketFactory.java - SOCKS5 socket
lib/src/main/java/org/briarproject/socks/SocksSocket.java
Encoding and I/O
- Socket I/O helpers
lib/src/main/java/org/briarproject/util/IoUtils.java - Unsigned port encoding
lib/src/main/java/org/briarproject/util/ByteUtils.java
Other components
- Socket consumer
- SOCKS proxy
Connections 6
- Socket consumer → SOCKS socket factory: requests socket
lib/src/main/java/org/briarproject/socks/SocksSocketFactory.java - SOCKS socket factory → SOCKS5 socket: creates
lib/src/main/java/org/briarproject/socks/SocksSocketFactory.java - Socket consumer → SOCKS5 socket: connects to host
- SOCKS5 socket → SOCKS proxy: negotiates connection
lib/src/main/java/org/briarproject/socks/SocksSocket.java - SOCKS5 socket → Socket I/O helpers: reads and writes
lib/src/main/java/org/briarproject/socks/SocksSocket.java - SOCKS5 socket → Unsigned port encoding: encodes port
lib/src/main/java/org/briarproject/socks/SocksSocket.java