Copyright | (c) 2010-2019 Vincent Hanquez <vincent@snarc.org> |
---|---|
License | BSD-style |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Network.Socks5.Types
Description
Synopsis
- data SocksVersion = SocksVer5
- data SocksCommand
- data SocksMethod
- data SocksHostAddress
- data SocksAddress = SocksAddress !SocksHostAddress !PortNumber
- data SocksReply
- data SocksVersionNotSupported = SocksVersionNotSupported
- data SocksError
- type SocksFQDN = ByteString
Documentation
data SocksVersion Source #
Type representing SOCKS protocol versions.
Constructors
SocksVer5 | SOCKS Protocol Version 5. The only version implemented by the library. |
Instances
Show SocksVersion Source # | |
Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksVersion -> ShowS # show :: SocksVersion -> String # showList :: [SocksVersion] -> ShowS # | |
Eq SocksVersion Source # | |
Defined in Network.Socks5.Types | |
Ord SocksVersion Source # | |
Defined in Network.Socks5.Types Methods compare :: SocksVersion -> SocksVersion -> Ordering # (<) :: SocksVersion -> SocksVersion -> Bool # (<=) :: SocksVersion -> SocksVersion -> Bool # (>) :: SocksVersion -> SocksVersion -> Bool # (>=) :: SocksVersion -> SocksVersion -> Bool # max :: SocksVersion -> SocksVersion -> SocksVersion # min :: SocksVersion -> SocksVersion -> SocksVersion # |
data SocksCommand Source #
Type representing commands that can be sent or received under the SOCKS protocol.
Constructors
SocksCommandConnect | The CONNECT request. |
SocksCommandBind | The BIND request. Not implemented by the library. |
SocksCommandUdpAssociate | The UDP ASSOCIATE request. Not implemented by the library. |
SocksCommandOther !Word8 | Other requests. None are specified by the SOCKS Protocol Version 5. |
Instances
data SocksMethod Source #
Type representing authentication methods available under the SOCKS protocol.
Only SocksMethodNone
is effectively implemented, but other values are
enumerated for completeness.
Constructors
SocksMethodNone | NO AUTHENTICATION REQUIRED. |
SocksMethodGSSAPI | GSSAPI. |
SocksMethodUsernamePassword | USERNAME/PASSWORD. |
SocksMethodOther !Word8 | IANA ASSIGNED or RESERVED FOR PRIVATE METHODS. |
SocksMethodNotAcceptable | NO ACCEPTABLE METHODS. |
Instances
data SocksHostAddress Source #
Type representing host addresses under the SOCKS protocol.
Constructors
SocksAddrIPV4 !HostAddress | A version-4 IP address. |
SocksAddrDomainName !SocksFQDN | A fully-qualified domain name (FQDN). |
SocksAddrIPV6 !HostAddress6 | A version-6 IP address. |
Instances
Show SocksHostAddress Source # | |
Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksHostAddress -> ShowS # show :: SocksHostAddress -> String # showList :: [SocksHostAddress] -> ShowS # | |
Eq SocksHostAddress Source # | |
Defined in Network.Socks5.Types Methods (==) :: SocksHostAddress -> SocksHostAddress -> Bool # (/=) :: SocksHostAddress -> SocksHostAddress -> Bool # | |
Ord SocksHostAddress Source # | |
Defined in Network.Socks5.Types Methods compare :: SocksHostAddress -> SocksHostAddress -> Ordering # (<) :: SocksHostAddress -> SocksHostAddress -> Bool # (<=) :: SocksHostAddress -> SocksHostAddress -> Bool # (>) :: SocksHostAddress -> SocksHostAddress -> Bool # (>=) :: SocksHostAddress -> SocksHostAddress -> Bool # max :: SocksHostAddress -> SocksHostAddress -> SocksHostAddress # min :: SocksHostAddress -> SocksHostAddress -> SocksHostAddress # |
data SocksAddress Source #
Type representing socket addresses under the SOCKS protocol.
Constructors
SocksAddress !SocksHostAddress !PortNumber |
Instances
Show SocksAddress Source # | |
Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksAddress -> ShowS # show :: SocksAddress -> String # showList :: [SocksAddress] -> ShowS # | |
Eq SocksAddress Source # | |
Defined in Network.Socks5.Types | |
Ord SocksAddress Source # | |
Defined in Network.Socks5.Types Methods compare :: SocksAddress -> SocksAddress -> Ordering # (<) :: SocksAddress -> SocksAddress -> Bool # (<=) :: SocksAddress -> SocksAddress -> Bool # (>) :: SocksAddress -> SocksAddress -> Bool # (>=) :: SocksAddress -> SocksAddress -> Bool # max :: SocksAddress -> SocksAddress -> SocksAddress # min :: SocksAddress -> SocksAddress -> SocksAddress # |
data SocksReply Source #
Type representing replies under the SOCKS protocol.
Constructors
SocksReplySuccess | The server reports that the request succeeded. |
SocksReplyError SocksError | The server reports that the request did not succeed. |
Instances
data SocksVersionNotSupported Source #
Type representing exceptions.
Constructors
SocksVersionNotSupported | The SOCKS protocol version is not supported. This library only implements SOCKS Protocol Version 5. |
Instances
data SocksError Source #
Type representing SOCKS errors that can be part of a SOCKS reply.
Constructors
SocksErrorGeneralServerFailure | General SOCKS server failure. |
SocksErrorConnectionNotAllowedByRule | Connection not allowed by ruleset. |
SocksErrorNetworkUnreachable | Network unreachable. |
SocksErrorHostUnreachable | Host unreachable. |
SocksErrorConnectionRefused | Connection refused. |
SocksErrorTTLExpired | TTL expired. |
SocksErrorCommandNotSupported | Command not supported. |
SocksErrorAddrTypeNotSupported | Address type not supported. |
SocksErrorOther Word8 | Other error. Unassigned in SOCKS Protocol Version 5. |
Instances
type SocksFQDN = ByteString Source #
Type synonym representing fully-qualified domain names (FQDN). The SOCKS
Protocol Version 5 does not specify an encoding for a FQDN other than there
is no terminating NUL
octet (byte).
This library's API assumes that FQDN values comprise only ASCII characters. Domain names that include other Unicode code points should be Punycode encoded.