second-transfer-0.10.0.2: Second Transfer HTTP/2 web server

Safe HaskellNone
LanguageHaskell2010

SecondTransfer.Socks5.Session

Synopsis

Documentation

tlsSOCKS5Serve :: MVar Socks5ServerState -> Socks5ConnectionCallbacks -> (ByteString -> Bool) -> Bool -> Socket -> (TLSServerSOCKS5Callbacks -> IO ()) -> IO ()

tlsSOCKS5Serve approver listening_socket onsocks5_action The approver should return True for host names that are served by this software (otherwise the connection will be closed, just for now, in the close future we will implement a way to forward requests to external Internet hosts.) Pass a bound and listening TCP socket where you expect a SOCKS5 exchange to have to tke place. And pass an action that can do something with the callbacks. The passed-in action is expected to fork a thread and return inmediately.