Library Moduleswift-nio-extras 1.25.0NIOSOCKS

NIOSOCKS

SOCKS v5 protocol implementation

index.md
import NIOSOCKS

Module information

Declarations
102
Symbols
159

Coverage

75.5 percent of the declarations in NIOSOCKS are fully documented24.5 percent of the declarations in NIOSOCKS are indirectly documented

Declarations

42.2 percent of the declarations in NIOSOCKS are initializers, type members, or enum cases27.5 percent of the declarations in NIOSOCKS are instance members20.6 percent of the declarations in NIOSOCKS are structures2.0 percent of the declarations in NIOSOCKS are classes7.8 percent of the declarations in NIOSOCKS are typealiases

Interfaces

100.0 percent of the declarations in NIOSOCKS are unrestricted
Module stats and coverage details

Overview

An implementation of SOCKS v5 protocol. See RFC1928.

Add the appropriate channel handler to the start of your channel pipeline to use this protocol.

For an example see the NIOSOCKSClient target.

Channel Handlers

  • class SOCKSClientHandler

    Connects to a SOCKS server to establish a proxied connection to a host. This handler should be inserted at the beginning of a channel’s pipeline. Note that SOCKS only supports fully-qualified domain names and IPv4 or IPv6 sockets, and not UNIX sockets.

  • class SOCKSServerHandshakeHandler

    Add this handshake handler to the front of your channel, closest to the network. The handler will receive bytes from the network and run them through a state machine and parser to enforce SOCKSv5 protocol correctness. Inbound bytes will by parsed into ClientMessage for downstream consumption. Send ServerMessage to this handler.

Client Messages

Server Messages

Supporting Types