http-reverse-proxy

Reverse proxy HTTP requests, either over raw sockets or with WAI https://github.com/fpco/http-reverse-proxy

Version on this page:[email protected]:1
LTS Haskell 15.14:0.6.0
Stackage Nightly 2020-05-26:0.6.0
Latest on Hackage:0.6.0

See all snapshots http-reverse-proxy appears in

BSD-3-Clause licensed by Michael Snoyman
Maintained by [email protected]

Module documentation for 0.4.3

This version can be pinned in stack with:[email protected]:a0ad92bfd4ebdf1ca0c0a060d6ddf56d48856c30852fb53c58cc0f2480abc3aa,2615

http-reverse-proxy

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 www.example.com, port 80.

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

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

Changes

0.4.3

  • Allow proxying to HTTPS servers. #15

0.4.2

  • Add configurable timeouts #8

0.4.1.3

  • Include README.md and ChangeLog.md