multiproxy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: MIT Imports: 6 Imported by: 0

README

package multiproxy

This package contains a wrapper around http.ReverseProxy that adds support for websocket proxies.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiProxy

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

MultiProxy holds the state for the HTTP proxy and WS proxy

func NewProxy

func NewProxy(targetURL string, hostname string) *MultiProxy

NewProxy returns a new multiproxy

func (*MultiProxy) Proxy

func (p *MultiProxy) Proxy(w http.ResponseWriter, r *http.Request)

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

Jump to

Keyboard shortcuts

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