socks-0.5.4: Socks proxy (version 5) implementation.

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell98

Network.Socks5.Types

Description

Synopsis

- data SocksVersion = SocksVer5
- data SocksCommand
  - = SocksCommandConnect
  - | SocksCommandBind
  - | SocksCommandUdpAssociate
  - | SocksCommandOther !Word8
- data SocksMethod
  - = SocksMethodNone
  - | SocksMethodGSSAPI
  - | SocksMethodUsernamePassword
  - | SocksMethodOther !Word8
  - | SocksMethodNotAcceptable
- data SocksHostAddress
  - = SocksAddrIPV4 !HostAddress
  - | SocksAddrDomainName !ByteString
  - | SocksAddrIPV6 !HostAddress6
- data SocksAddress = SocksAddress !SocksHostAddress !PortNumber
- data SocksReply
  - = SocksReplySuccess
  - | SocksReplyError SocksError
- data SocksVersionNotSupported = SocksVersionNotSupported
- data SocksError
  - = SocksErrorGeneralServerFailure
  - | SocksErrorConnectionNotAllowedByRule
  - | SocksErrorNetworkUnreachable
  - | SocksErrorHostUnreachable
  - | SocksErrorConnectionRefused
  - | SocksErrorTTLExpired
  - | SocksErrorCommandNotSupported
  - | SocksErrorAddrTypeNotSupported
  - | SocksErrorOther Word8

# Documentation

data SocksVersion

Socks Version

Constructors

SocksVer5 |

Instances

Eq SocksVersion |
Ord SocksVersion |
Show SocksVersion |

data SocksCommand

Command that can be send and receive on the SOCKS protocol

Constructors

SocksCommandConnect |
SocksCommandBind |
SocksCommandUdpAssociate |
SocksCommandOther !Word8 |

Instances

Enum SocksCommand |
Eq SocksCommand |
Ord SocksCommand |
Show SocksCommand |

data SocksMethod

Authentication methods available on the SOCKS protocol.

Only SocksMethodNone is effectively implemented, but other value are enumerated for completeness.

Constructors

SocksMethodNone |
SocksMethodGSSAPI |
SocksMethodUsernamePassword |
SocksMethodOther !Word8 |
SocksMethodNotAcceptable |

Instances

Enum SocksMethod |
Eq SocksMethod |
Ord SocksMethod |
Show SocksMethod |

data SocksHostAddress

A Host address on the SOCKS protocol.

Constructors

SocksAddrIPV4 !HostAddress |
SocksAddrDomainName !ByteString |
SocksAddrIPV6 !HostAddress6 |

Instances

Eq SocksHostAddress |
Ord SocksHostAddress |
Show SocksHostAddress |

data SocksAddress

Describe a Socket address on the SOCKS protocol

Constructors

SocksAddress !SocksHostAddress !PortNumber |

Instances

Eq SocksAddress |
Ord SocksAddress |
Show SocksAddress |

data SocksReply

Type of reply on the SOCKS protocol

Constructors

SocksReplySuccess |
SocksReplyError SocksError |

Instances

Enum SocksReply |
Eq SocksReply |
Data SocksReply |
Ord SocksReply |
Show SocksReply |

data SocksVersionNotSupported

Exception returned when using a SOCKS version that is not supported.

This package only implement version 5.

Constructors

SocksVersionNotSupported |

Instances

Data SocksVersionNotSupported |
Show SocksVersionNotSupported |
Exception SocksVersionNotSupported |

data SocksError

SOCKS error that can be received or sent

Constructors

SocksErrorGeneralServerFailure |
SocksErrorConnectionNotAllowedByRule |
SocksErrorNetworkUnreachable |
SocksErrorHostUnreachable |
SocksErrorConnectionRefused |
SocksErrorTTLExpired |
SocksErrorCommandNotSupported |
SocksErrorAddrTypeNotSupported |
SocksErrorOther Word8 |

Instances

Enum SocksError |
Eq SocksError |
Data SocksError |
Ord SocksError |
Show SocksError |
Exception SocksError |