| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Network.SOCKS5.Internal
Synopsis
- data Method
- newtype Hello = Hello {}
- newtype MethodSelection = MethodSelection {}
- data Command
- = Connect
- | Bind
- | UDPAssociate
- data Address
- data Request = Request {}
- data Rep
- data Reply = Reply {
- reply :: Rep
- boundAddress :: Address
- boundPort :: PortNumber
- data UDPRequest = UDPRequest {
- frag :: Word8
- address :: Address
- port :: PortNumber
- payload :: ByteString
- sendUDPRequestTo :: Socket -> Word8 -> Address -> PortNumber -> ByteString -> SockAddr -> IO ()
- data UserPassRequest = UserPassRequest {}
- data Status
- newtype UserPassResponse = UserPassResponse {}
- data SOCKSException
- class Connection c where
- connRecv :: c -> IO ByteString
- connSend :: c -> ByteString -> IO ()
- fromSockAddr_ :: SockAddr -> (Address, PortNumber)
- toSockAddr_ :: Address -> PortNumber -> SockAddr
- recvAndDecode :: (Binary a, Connection c, MonadIO m) => c -> ByteString -> m (a, ByteString)
- encodeAndSend :: (Binary a, Connection c, MonadIO m) => c -> a -> m ()
Documentation
Constructors
| NoAuth | |
| GSSAPI | |
| UserPass | |
| IANAAssigned Word8 | |
| PrivateMethod Word8 | |
| NoAcceptableMethods | |
| UnknownMethod Word8 |
newtype MethodSelection Source #
Constructors
| MethodSelection | |
Instances
| Show MethodSelection Source # | |
Defined in Network.SOCKS5.Internal Methods showsPrec :: Int -> MethodSelection -> ShowS # show :: MethodSelection -> String # showList :: [MethodSelection] -> ShowS # | |
| Binary MethodSelection Source # | |
Defined in Network.SOCKS5.Internal Methods put :: MethodSelection -> Put # get :: Get MethodSelection # putList :: [MethodSelection] -> Put # | |
| Eq MethodSelection Source # | |
Defined in Network.SOCKS5.Internal Methods (==) :: MethodSelection -> MethodSelection -> Bool # (/=) :: MethodSelection -> MethodSelection -> Bool # | |
Constructors
| Connect | |
| Bind | |
| UDPAssociate |
Address type used for destination addresses in SOCKS5 protocol.
Constructors
| AddressIPv4 IPv4 | |
| AddressIPv6 IPv6 | |
| AddressDomain Text |
Constructors
| Request | |
Fields | |
Constructors
| Succeeded | |
| GeneralSOCKSFailure | |
| ConnectionNotAllowedByRuleset | |
| NetworkUnreachable | |
| HostUnreachable | |
| ConnectionRefused | |
| TTLExpired | |
| CommandNotSupported | |
| AddressTypeNotSupported | |
| Unassigned Word8 |
Constructors
| Reply | |
Fields
| |
data UDPRequest Source #
Constructors
| UDPRequest | |
Fields
| |
Instances
| Show UDPRequest Source # | |
Defined in Network.SOCKS5.Internal Methods showsPrec :: Int -> UDPRequest -> ShowS # show :: UDPRequest -> String # showList :: [UDPRequest] -> ShowS # | |
| Binary UDPRequest Source # | |
Defined in Network.SOCKS5.Internal | |
| Eq UDPRequest Source # | |
Defined in Network.SOCKS5.Internal | |
sendUDPRequestTo :: Socket -> Word8 -> Address -> PortNumber -> ByteString -> SockAddr -> IO () Source #
data UserPassRequest Source #
Constructors
| UserPassRequest | |
Instances
| Show UserPassRequest Source # | |
Defined in Network.SOCKS5.Internal Methods showsPrec :: Int -> UserPassRequest -> ShowS # show :: UserPassRequest -> String # showList :: [UserPassRequest] -> ShowS # | |
| Binary UserPassRequest Source # | |
Defined in Network.SOCKS5.Internal Methods put :: UserPassRequest -> Put # get :: Get UserPassRequest # putList :: [UserPassRequest] -> Put # | |
| Eq UserPassRequest Source # | |
Defined in Network.SOCKS5.Internal Methods (==) :: UserPassRequest -> UserPassRequest -> Bool # (/=) :: UserPassRequest -> UserPassRequest -> Bool # | |
newtype UserPassResponse Source #
Constructors
| UserPassResponse | |
Instances
| Show UserPassResponse Source # | |
Defined in Network.SOCKS5.Internal Methods showsPrec :: Int -> UserPassResponse -> ShowS # show :: UserPassResponse -> String # showList :: [UserPassResponse] -> ShowS # | |
| Binary UserPassResponse Source # | |
Defined in Network.SOCKS5.Internal Methods put :: UserPassResponse -> Put # get :: Get UserPassResponse # putList :: [UserPassResponse] -> Put # | |
| Eq UserPassResponse Source # | |
Defined in Network.SOCKS5.Internal Methods (==) :: UserPassResponse -> UserPassResponse -> Bool # (/=) :: UserPassResponse -> UserPassResponse -> Bool # | |
data SOCKSException Source #
Constructors
| HandshakeFail Reply | |
| AuthUnsupported Method | |
| AuthFailed Status | |
| AuthMissingCredentials | |
| ConnectionToTargetFailed SomeException | |
| NoAcceptableAuthMethods | |
| PortStringInvalid ServiceName |
Instances
| Exception SOCKSException Source # | |
Defined in Network.SOCKS5.Internal Methods toException :: SOCKSException -> SomeException # | |
| Show SOCKSException Source # | |
Defined in Network.SOCKS5.Internal Methods showsPrec :: Int -> SOCKSException -> ShowS # show :: SOCKSException -> String # showList :: [SOCKSException] -> ShowS # | |
class Connection c where Source #
Instances
| Connection Socket Source # | |
Defined in Network.SOCKS5.Internal | |
| Connection Context Source # | |
Defined in Network.SOCKS5.Internal | |
fromSockAddr_ :: SockAddr -> (Address, PortNumber) Source #
toSockAddr_ :: Address -> PortNumber -> SockAddr Source #
recvAndDecode :: (Binary a, Connection c, MonadIO m) => c -> ByteString -> m (a, ByteString) Source #
encodeAndSend :: (Binary a, Connection c, MonadIO m) => c -> a -> m () Source #