proxy

package
v0.7.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2013 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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