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

Version on this page:
LTS Haskell 8.6:
Stackage Nightly 2017-03-28:
Latest on Hackage:
BSD3 licensed by Michael Snoyman
Maintained by

Module documentation for

There are no documented modules for this package.


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)


  • fixReqHeaders may create weird x-real-ip header #19

  • Minor doc cleanup

  • Use CPP so we can work with http-client pre and post 0.5 #17


  • Allow proxying to HTTPS servers. #15


  • Add configurable timeouts #8

  • Include and
comments powered byDisqus