proxy

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDPConnTrackTimeout = 90 * time.Second
	UDPBufSize          = 2048
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy interface {
	// Start forwarding traffic back and forth the front and back-end
	// addresses.
	Run()
	// Stop forwarding traffic and close both ends of the Proxy.
	Close()
	// Return the address on which the proxy is listening.
	FrontendAddr() net.Addr
	// Return the proxied address.
	BackendAddr() net.Addr
}

func NewProxy

func NewProxy(frontendAddr, backendAddr net.Addr) (Proxy, error)

type TCPProxy

type TCPProxy struct {
	// contains filtered or unexported fields
}

func NewTCPProxy

func NewTCPProxy(frontendAddr, backendAddr *net.TCPAddr) (*TCPProxy, error)

func (*TCPProxy) BackendAddr

func (proxy *TCPProxy) BackendAddr() net.Addr

func (*TCPProxy) Close

func (proxy *TCPProxy) Close()

func (*TCPProxy) FrontendAddr

func (proxy *TCPProxy) FrontendAddr() net.Addr

func (*TCPProxy) Run

func (proxy *TCPProxy) Run()

type UDPProxy

type UDPProxy struct {
	// contains filtered or unexported fields
}

func NewUDPProxy

func NewUDPProxy(frontendAddr, backendAddr *net.UDPAddr) (*UDPProxy, error)

func (*UDPProxy) BackendAddr

func (proxy *UDPProxy) BackendAddr() net.Addr

func (*UDPProxy) Close

func (proxy *UDPProxy) Close()

func (*UDPProxy) FrontendAddr

func (proxy *UDPProxy) FrontendAddr() net.Addr

func (*UDPProxy) Run

func (proxy *UDPProxy) Run()

Jump to

Keyboard shortcuts

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