HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulesocks-0.6.1Haskell2010

Network.Socks5

This is an implementation of SOCKS5 as defined in RFC 1928

In Wikipedia's words:

SOCKet Secure (SOCKS) is an Internet protocol that routes network packets between a client and server through a proxy server. SOCKS5 additionally provides authentication so only authorized users may access a server. Practically, a SOCKS server will proxy TCP connections to an arbitrary IP address as well as providing a means for UDP packets to be forwarded.

BIND and UDP ASSOCIATE messages are not implemented. However main usage of SOCKS is covered in this implementation.

  • 5 types
  • 6 values
  • Packagesocks-0.6.1
  • Exports11
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceSocks5.hs

Types

4 declarations
datadata SocksError
#
Instances6Enum, Eq, Data, Ord, Show, Exception

Configuration

4 declarations

Methods

2 declarations
valuesocksConnectWithSocket
  1. :: Socket

    Socket to use.

  2. -> SocksConf

    SOCKS configuration for the server.

  3. -> SocksAddress

    SOCKS Address to connect to.

  4. -> IO (SocksHostAddress, PortNumber)
#

connect a user specified new socket on the socks server to a destination

The socket in parameter needs to be already connected to the socks server

|socket|-----sockServer----->|server|----destAddr----->|destination|

Variants

1 declaration

connect a new socket to the socks server, and connect the stream to a FQDN resolved on the server side.

The socket needs to *not* be already connected.

The destination need to be an ASCII string, otherwise unexpected behavior will ensue. For unicode destination, punycode encoding should be used.