HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Modulecrypton-socks-0.6.2Haskell2010

Network.Socks5

This is an implementation of the SOCKS Protocol Version 5 as defined in RFC 1928.

In Wikipedia's words:

SOCKS is an Internet protocol that exchanges network packets between a client and server through a proxy server. SOCKS5 optionally provides authentication so only authorized users may access a server. Practically, a SOCKS server proxies TCP connections to an arbitrary IP address, and provides a means for UDP packets to be forwarded. A SOCKS server accepts incoming client connection on TCP port 1080.

BIND and UDP ASSOCIATE messages are not implemented. However the main usage of SOCKS is implemented.

Contents
  1. Types
  2. Configuration
  3. Methods
  4. Variants
Synopsis

Types

Type representing host addresses under the SOCKS protocol.

Constructors

Instances3Eq, Ord, Show
datadata SocksReply

Type representing replies under the SOCKS protocol.

Constructors

Instances5Enum, Eq, Data, Ord, Show
  • Enum SocksReplyDefined in crypton-socks-0.6.2 · Network.Socks5.Types
  • Eq SocksReplyDefined in crypton-socks-0.6.2 · Network.Socks5.Types
  • Data SocksReplyDefined in crypton-socks-0.6.2 · Network.Socks5.Types
  • Ord SocksReplyDefined in crypton-socks-0.6.2 · Network.Socks5.Types
  • Show SocksReplyDefined in crypton-socks-0.6.2 · Network.Socks5.Types
datadata SocksError

Type representing SOCKS errors that can be part of a SOCKS reply.

Constructors

Instances6Enum, Eq, Data, Ord, Show, Exception

Configuration

Methods

Variants

valuesocksConnectName
  1. :: Socket

    The socket to use. The socket must *not* be connected already.

  2. -> SocksConf

    The SOCKS configuration for the server.

  3. -> String

    Destination FQDN. Should comprise only ASCII characters, otherwise unexpected behaviour will ensure. For FQDN including other Unicode code points, Punycode encoding should be used.

  4. -> PortNumber

    The port number to use.

  5. -> IO ()

Connect a new socket to the SOCKS server, and connect the stream to a fully-qualified domain name (FQDN) resolved on the server side.