proxy

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPProxy added in v1.3.1

func NewHTTPProxy(tr http.RoundTripper, cfg config.Proxy) http.Handler

func Shutdown

func Shutdown()

Shutdown sets the shutdown flag which triggers the proxy to stop routing new requests.

func ShuttingDown

func ShuttingDown() bool

ShuttingDown returns whether the shutdown flag has been set.

Types

type TCPProxy added in v1.3.1

type TCPProxy interface {
	Serve(conn net.Conn)
}

TCPProxy implements an SNI aware transparent TCP proxy which captures the TLS client hello, extracts the host name and uses it for finding the upstream server. Then it replays the ClientHello message and copies data transparently allowing to route a TLS connection based on the SNI header without decrypting it.

This implementation is EXPERIMENTAL in the sense that it has been tested to work but is considered incomplete for production use. It needs support for read and write timeouts which require replacing the io.Copy() with something that can set the deadlines on the underlying connections. One possible way could be to use TeeReader/TeeWriter streams which discard the data and only set the deadlines. The implementation also needs a full integration test.

This implementation exists to gather more real-world data to finalize the code at a later stage.

func NewTCPSNIProxy added in v1.3.1

func NewTCPSNIProxy(cfg config.Proxy) TCPProxy

Directories

Path Synopsis
Package gzip provides an HTTP handler which compresses responses if the client supports this, the response is compressable and not already compressed.
Package gzip provides an HTTP handler which compresses responses if the client supports this, the response is compressable and not already compressed.

Jump to

Keyboard shortcuts

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