rproxy

package
v0.0.0-...-6b20bf8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2019 License: MIT Imports: 11 Imported by: 4

README

rproxy

This package contains a http.ReverseProxy that adds support for Host override, websockets and SSE.

Documentation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReverseProxy

type ReverseProxy struct {
	URL      *url.URL
	Hostname string
	// contains filtered or unexported fields
}

ReverseProxy holds the state for the HTTP ReverseProxy and Websocket Proxy

func New

func New(target *url.URL, hostname string) (*ReverseProxy, error)

New returns a new ReverseProxy

func NewWithTrustedCertificates

func NewWithTrustedCertificates(target *url.URL, hostname string, certs []*tls.Certificate) (*ReverseProxy, error)

NewWithTrustedCertificates returns a new ReverseProxy

func (*ReverseProxy) ServeHTTP

func (p *ReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP determines whether to proxy a HTTP request or a WS one

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL