proxy

package module
v0.0.0-...-3856617 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2017 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(listener net.Listener, dial func(network, address string) (net.Conn, error))

Types

type Client

type Client struct {
	Proxy        url.URL
	TLSConfig    *tls.Config
	UpstreamDial func(network, address string) (net.Conn, error)
}

func NewClient

func NewClient(proxy url.URL, dial func(network, address string) (net.Conn, error)) *Client

func (*Client) Dial

func (client *Client) Dial(network, address string) (conn net.Conn, err error)

type Handler

type Handler struct {
	Auth        func(username, password string) bool
	Dial        func(network, address string) (net.Conn, error)
	HandleError func(error, *http.Request)
	// contains filtered or unexported fields
}

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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