socks-0.6.1: Socks proxy (ver 5)

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

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 !FQDN
  - | 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 Source #

Socks Version

Constructors

SocksVer5 |

#### Instances

Instances details

Eq SocksVersion Source # |
Instance details Defined in Network.Socks5.Types Methods (==) :: SocksVersion -> SocksVersion -> Bool # (/=) :: SocksVersion -> SocksVersion -> Bool #
Ord SocksVersion Source # |

Instance details

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 #

Show SocksVersion Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksVersion -> ShowS # show :: SocksVersion -> String # showList :: [SocksVersion] -> ShowS #

data SocksCommand Source #

Command that can be send and receive on the SOCKS protocol

Constructors

SocksCommandConnect |
SocksCommandBind |
SocksCommandUdpAssociate |
SocksCommandOther !Word8 |

#### Instances

Instances details

Enum SocksCommand Source # |

Instance details

Defined in Network.Socks5.Types

Methods

succ :: SocksCommand -> SocksCommand #

pred :: SocksCommand -> SocksCommand #

toEnum :: Int -> SocksCommand #

fromEnum :: SocksCommand -> Int #

enumFrom :: SocksCommand -> [SocksCommand] #

enumFromThen :: SocksCommand -> SocksCommand -> [SocksCommand] #

enumFromTo :: SocksCommand -> SocksCommand -> [SocksCommand] #

enumFromThenTo :: SocksCommand -> SocksCommand -> SocksCommand -> [SocksCommand] #

Eq SocksCommand Source # |
Instance details Defined in Network.Socks5.Types Methods (==) :: SocksCommand -> SocksCommand -> Bool # (/=) :: SocksCommand -> SocksCommand -> Bool #
Ord SocksCommand Source # |

Instance details

Defined in Network.Socks5.Types

Methods

compare :: SocksCommand -> SocksCommand -> Ordering #

(<) :: SocksCommand -> SocksCommand -> Bool #

(<=) :: SocksCommand -> SocksCommand -> Bool #

(>) :: SocksCommand -> SocksCommand -> Bool #

(>=) :: SocksCommand -> SocksCommand -> Bool #

max :: SocksCommand -> SocksCommand -> SocksCommand #

min :: SocksCommand -> SocksCommand -> SocksCommand #

Show SocksCommand Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksCommand -> ShowS # show :: SocksCommand -> String # showList :: [SocksCommand] -> ShowS #

data SocksMethod Source #

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

Instances details

Enum SocksMethod Source # |

Instance details

Defined in Network.Socks5.Types

Methods

succ :: SocksMethod -> SocksMethod #

pred :: SocksMethod -> SocksMethod #

toEnum :: Int -> SocksMethod #

fromEnum :: SocksMethod -> Int #

enumFrom :: SocksMethod -> [SocksMethod] #

enumFromThen :: SocksMethod -> SocksMethod -> [SocksMethod] #

enumFromTo :: SocksMethod -> SocksMethod -> [SocksMethod] #

enumFromThenTo :: SocksMethod -> SocksMethod -> SocksMethod -> [SocksMethod] #

Eq SocksMethod Source # |
Instance details Defined in Network.Socks5.Types Methods (==) :: SocksMethod -> SocksMethod -> Bool # (/=) :: SocksMethod -> SocksMethod -> Bool #
Ord SocksMethod Source # |
Instance details Defined in Network.Socks5.Types Methods compare :: SocksMethod -> SocksMethod -> Ordering # (<) :: SocksMethod -> SocksMethod -> Bool # (<=) :: SocksMethod -> SocksMethod -> Bool # (>) :: SocksMethod -> SocksMethod -> Bool # (>=) :: SocksMethod -> SocksMethod -> Bool # max :: SocksMethod -> SocksMethod -> SocksMethod # min :: SocksMethod -> SocksMethod -> SocksMethod #
Show SocksMethod Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksMethod -> ShowS # show :: SocksMethod -> String # showList :: [SocksMethod] -> ShowS #

data SocksHostAddress Source #

A Host address on the SOCKS protocol.

Constructors

SocksAddrIPV4 !HostAddress |
SocksAddrDomainName !FQDN |
SocksAddrIPV6 !HostAddress6 |

#### Instances

Instances details

Eq SocksHostAddress Source # |
Instance details Defined in Network.Socks5.Types Methods (==) :: SocksHostAddress -> SocksHostAddress -> Bool # (/=) :: SocksHostAddress -> SocksHostAddress -> Bool #
Ord SocksHostAddress Source # |

Instance details

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 #

Show SocksHostAddress Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksHostAddress -> ShowS # show :: SocksHostAddress -> String # showList :: [SocksHostAddress] -> ShowS #

data SocksAddress Source #

Describe a Socket address on the SOCKS protocol

Constructors

SocksAddress !SocksHostAddress !PortNumber |

#### Instances

Instances details

Eq SocksAddress Source # |
Instance details Defined in Network.Socks5.Types Methods (==) :: SocksAddress -> SocksAddress -> Bool # (/=) :: SocksAddress -> SocksAddress -> Bool #
Ord SocksAddress Source # |

Instance details

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 #

Show SocksAddress Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksAddress -> ShowS # show :: SocksAddress -> String # showList :: [SocksAddress] -> ShowS #

data SocksReply Source #

Type of reply on the SOCKS protocol

Constructors

SocksReplySuccess |
SocksReplyError SocksError |

#### Instances

Instances details

Enum SocksReply Source # |

Instance details

Defined in Network.Socks5.Types

Methods

succ :: SocksReply -> SocksReply #

pred :: SocksReply -> SocksReply #

toEnum :: Int -> SocksReply #

fromEnum :: SocksReply -> Int #

enumFrom :: SocksReply -> [SocksReply] #

enumFromThen :: SocksReply -> SocksReply -> [SocksReply] #

enumFromTo :: SocksReply -> SocksReply -> [SocksReply] #

enumFromThenTo :: SocksReply -> SocksReply -> SocksReply -> [SocksReply] #

Eq SocksReply Source # |
Instance details Defined in Network.Socks5.Types Methods (==) :: SocksReply -> SocksReply -> Bool # (/=) :: SocksReply -> SocksReply -> Bool #
Data SocksReply Source # |

Instance details

Defined in Network.Socks5.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SocksReply -> c SocksReply #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SocksReply #

toConstr :: SocksReply -> Constr #

dataTypeOf :: SocksReply -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SocksReply) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SocksReply) #

gmapT :: (forall b. Data b => b -> b) -> SocksReply -> SocksReply #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SocksReply -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SocksReply -> r #

gmapQ :: (forall d. Data d => d -> u) -> SocksReply -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SocksReply -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SocksReply -> m SocksReply #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SocksReply -> m SocksReply #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SocksReply -> m SocksReply #

Ord SocksReply Source # |
Instance details Defined in Network.Socks5.Types Methods compare :: SocksReply -> SocksReply -> Ordering # (<) :: SocksReply -> SocksReply -> Bool # (<=) :: SocksReply -> SocksReply -> Bool # (>) :: SocksReply -> SocksReply -> Bool # (>=) :: SocksReply -> SocksReply -> Bool # max :: SocksReply -> SocksReply -> SocksReply # min :: SocksReply -> SocksReply -> SocksReply #
Show SocksReply Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksReply -> ShowS # show :: SocksReply -> String # showList :: [SocksReply] -> ShowS #

data SocksVersionNotSupported Source #

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

This package only implement version 5.

Constructors

SocksVersionNotSupported |

#### Instances

Instances details

Data SocksVersionNotSupported Source # |

Instance details

Defined in Network.Socks5.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SocksVersionNotSupported -> c SocksVersionNotSupported #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SocksVersionNotSupported #

toConstr :: SocksVersionNotSupported -> Constr #

dataTypeOf :: SocksVersionNotSupported -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SocksVersionNotSupported) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SocksVersionNotSupported) #

gmapT :: (forall b. Data b => b -> b) -> SocksVersionNotSupported -> SocksVersionNotSupported #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SocksVersionNotSupported -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SocksVersionNotSupported -> r #

gmapQ :: (forall d. Data d => d -> u) -> SocksVersionNotSupported -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SocksVersionNotSupported -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SocksVersionNotSupported -> m SocksVersionNotSupported #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SocksVersionNotSupported -> m SocksVersionNotSupported #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SocksVersionNotSupported -> m SocksVersionNotSupported #

Show SocksVersionNotSupported Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksVersionNotSupported -> ShowS # show :: SocksVersionNotSupported -> String # showList :: [SocksVersionNotSupported] -> ShowS #
Exception SocksVersionNotSupported Source # |
Instance details Defined in Network.Socks5.Types Methods toException :: SocksVersionNotSupported -> SomeException fromException :: SomeException -> Maybe SocksVersionNotSupported displayException :: SocksVersionNotSupported -> String

data SocksError Source #

SOCKS error that can be received or sent

Constructors

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

#### Instances

Instances details

Enum SocksError Source # |

Instance details

Defined in Network.Socks5.Types

Methods

succ :: SocksError -> SocksError #

pred :: SocksError -> SocksError #

toEnum :: Int -> SocksError #

fromEnum :: SocksError -> Int #

enumFrom :: SocksError -> [SocksError] #

enumFromThen :: SocksError -> SocksError -> [SocksError] #

enumFromTo :: SocksError -> SocksError -> [SocksError] #

enumFromThenTo :: SocksError -> SocksError -> SocksError -> [SocksError] #

Eq SocksError Source # |
Instance details Defined in Network.Socks5.Types Methods (==) :: SocksError -> SocksError -> Bool # (/=) :: SocksError -> SocksError -> Bool #
Data SocksError Source # |

Instance details

Defined in Network.Socks5.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SocksError -> c SocksError #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SocksError #

toConstr :: SocksError -> Constr #

dataTypeOf :: SocksError -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SocksError) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SocksError) #

gmapT :: (forall b. Data b => b -> b) -> SocksError -> SocksError #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SocksError -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SocksError -> r #

gmapQ :: (forall d. Data d => d -> u) -> SocksError -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SocksError -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SocksError -> m SocksError #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SocksError -> m SocksError #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SocksError -> m SocksError #

Ord SocksError Source # |
Instance details Defined in Network.Socks5.Types Methods compare :: SocksError -> SocksError -> Ordering # (<) :: SocksError -> SocksError -> Bool # (<=) :: SocksError -> SocksError -> Bool # (>) :: SocksError -> SocksError -> Bool # (>=) :: SocksError -> SocksError -> Bool # max :: SocksError -> SocksError -> SocksError # min :: SocksError -> SocksError -> SocksError #
Show SocksError Source # |
Instance details Defined in Network.Socks5.Types Methods showsPrec :: Int -> SocksError -> ShowS # show :: SocksError -> String # showList :: [SocksError] -> ShowS #
Exception SocksError Source # |
Instance details Defined in Network.Socks5.Types Methods toException :: SocksError -> SomeException fromException :: SomeException -> Maybe SocksError displayException :: SocksError -> String