This module contains a simple HTTP and HTTPS proxy. In the most basic setup, the caller specifies a port and runds it as follows:
-- Run a HTTPS and HTTPS proxy on port 3128. import Network.HTTP.Proxy main :: IO () main = runProxy 3128
- runProxy :: Port -> IO ()
- runProxySettings :: Settings -> IO ()
- data Settings = Settings {
- proxyPort :: Int
- proxyHost :: String
- proxyOnException :: SomeException -> IO ()
- proxyTimeout :: Int
- defaultSettings :: Settings
Documentation
runProxy :: Port -> IO ()Source
Run a HTTP and HTTPS proxy server on the specified port. This calls
runProxySettings
with defaultSettings
.
runProxySettings :: Settings -> IO ()Source
Run a HTTP and HTTPS proxy server with the specified settings.
Various proxy server settings. This is purposely kept as an abstract data
type so that new settings can be added without breaking backwards
compatibility. In order to create a Settings
value, use defaultSettings
and record syntax to modify individual records. For example:
defaultSettings { proxyPort = 3128 }
Settings | |
|
defaultSettings :: SettingsSource
The default settings for the Proxy server. See the individual settings for the default value.