For the specified socket, wait for a SOCKS Hello, send a SOCKS Hello response (specifying no authentification method), and wait for a SOCKS request.
Modulecrypton-socks-0.6.2Haskell2010
Network.Socks5.Lowlevel
Low level types and functions for interacting with a SOCKS server.
- 5 types
- 1 class
- 9 values
- Packagecrypton-socks-0.6.2
- Exports15
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceLowlevel.hs
Low level types and functions
14 declarationsType representing initial messages sent by a client with the list of authentification methods supported.
Constructors
Instances3Eq, Show, Serialize
Eq SocksHelloDefined in crypton-socks-0.6.2 · Network.Socks5.WireShow SocksHelloDefined in crypton-socks-0.6.2 · Network.Socks5.WireSerialize SocksHelloDefined in crypton-socks-0.6.2 · Network.Socks5.Wire
Type representing initial messages sent by a server in response to Hello, with the server's chosen method of authentication.
Constructors
Instances3Eq, Show, Serialize
Eq SocksHelloResponseDefined in crypton-socks-0.6.2 · Network.Socks5.WireShow SocksHelloResponseDefined in crypton-socks-0.6.2 · Network.Socks5.WireSerialize SocksHelloResponseDefined in crypton-socks-0.6.2 · Network.Socks5.Wire
Type representing SOCKS requests.
Constructors
Instances4Eq, Show, Serialize, Command
Eq SocksRequestDefined in crypton-socks-0.6.2 · Network.Socks5.WireShow SocksRequestDefined in crypton-socks-0.6.2 · Network.Socks5.WireSerialize SocksRequestDefined in crypton-socks-0.6.2 · Network.Socks5.WireCommand SocksRequestDefined in crypton-socks-0.6.2 · Network.Socks5.Command
Type representing SOCKS responses.
Constructors
Instances3Eq, Show, Serialize
Eq SocksResponseDefined in crypton-socks-0.6.2 · Network.Socks5.WireShow SocksResponseDefined in crypton-socks-0.6.2 · Network.Socks5.WireSerialize SocksResponseDefined in crypton-socks-0.6.2 · Network.Socks5.Wire
A type class for types that can yield a SOCKS request or, optionally, be obtained from a SOCKS request.
Methods
toRequest :: a -> SocksRequestfromRequest :: SocksRequest -> Maybe a
Instances2Command
Command ConnectDefined in crypton-socks-0.6.2 · Network.Socks5.CommandCommand SocksRequestDefined in crypton-socks-0.6.2 · Network.Socks5.Command
Type representing connect commands.
Constructors
Instances4Eq, Ord, Show, Command
establish :: SocksVersionThe SOCKS protocol version to use.
-> SocketThe socket to use.
-> [SocksMethod]A list of the authentification methods supported.
-> IO SocksMethod
Establish a connection with a SOCKS server.
rpc_ :: Command a=> SocketThe socket to use.
-> aThe command.
-> IO (SocksHostAddress, PortNumber)
As for rpc but throws an exception if it does not succeed.
connectIPV4 :: SocketThe socket to use.
-> HostAddressThe host address.
-> PortNumberThe port number to use.
-> IO (HostAddress, PortNumber)
Connect using IPv4.
connectIPV6 :: SocketThe socket to use.
-> HostAddress6The host address.
-> PortNumberThe port number to use.
-> IO (HostAddress6, PortNumber)
Connect using IPv6.
connectDomainName :: SocketThe socket to use.
-> StringDestination FQDN. Should comprise only ASCII characters, otherwise unexpected behaviour will ensure. For FQDN including other Unicode code points, Punycode encoding should be used.
-> PortNumberThe port number to use.
-> IO (SocksHostAddress, PortNumber)
Connect using a fully-qualified domain name (FQDN).
rpc :: Command a=> SocketThe socket to use.
-> aThe command.
-> IO (Either SocksError (SocksHostAddress, PortNumber))
Try to execute the specified command with the specified socket.
Send data to the specified socket.
Wait for data from the specified socket.