Documentation ¶
Overview ¶
An HTTP proxy package for intercepting, modifying traffic and forwarding it via a reverse proxy server (like HAproxy).
This package is extended upon github.com/elazarl/goproxy. Full functionality of it can access through GoProxy variable, But ctx.UserData must not be altered. And glog library for logging.
It publishes Request.Host, reverse-proxy-server and retured status-code for bad status on a redis Channel. It uses fluentd for dumping http requests and responses in json or raw wire format. And Exposes rudimentary metrics via Prometheus client library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // New goproxy server. Functionality of goproxy can access throgh this variable but ctx.UserData must not be altered. GoProxy = goproxy.NewProxyHttpServer() // Instance of Config struct Conf = new(Config) )
Functions ¶
Types ¶
type Config ¶
type Config struct { // Redis channel to be published json message containing Request.Host, sender-proxy and retured statuscode for bad status (400 <= StatusCode <= 599). RedisControllerChannel string // Forward traffic to it (only HTTP Scheme is supported) and must not be empty. ReverseProxyServer url.URL // Running proxy on this port and must not be empty. ProxyPort int // Exposing metrics on this port and must not be empty. MetricPort int // Enabling verbosabilty on underlying goproxy library. Verbose bool // If true, Dumps http request and response in wire format else in human readable format. DumpInWireFormat bool }
Click to show internal directories.
Click to hide internal directories.