Reverse proxy HTTP requests, either over raw sockets or with WAI

Version on this page:0.4.2@rev:2
LTS Haskell 22.18:
Stackage Nightly 2024-04-22:
Latest on Hackage:

See all snapshots http-reverse-proxy appears in

BSD-3-Clause licensed by Michael Snoyman
Maintained by [email protected]
This version can be pinned in stack with:http-reverse-proxy-0.4.2@sha256:9b0effba3d1327a4a7aa8711c4acc2f9280a4c87c621f3431909bae90751b47b,2618

Module documentation for 0.4.2


Provides a simple means of reverse-proxying HTTP requests. The raw approach uses the same technique as leveraged by keter, whereas the WAI approach performs full request/response parsing via WAI and http-conduit.

Raw example

The following sets up raw reverse proxying from local port 3000 to, port 80.

{-# LANGUAGE OverloadedStrings #-}
import Network.HTTP.ReverseProxy
import Data.Conduit.Network

main :: IO ()
main = runTCPServer (serverSettings 3000 "*") $ \appData ->
        (\_headers -> return $ Right $ ProxyDest "" 80)



  • Add configurable timeouts #8

  • Include and