proxy

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProxyPortStart = "9400"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	ProxyForwards map[string][]*ProxyForward
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy() *Proxy

func (*Proxy) AddProxyForward

func (p *Proxy) AddProxyForward(name string, proxyForward *ProxyForward)

AddProxyForward creates a new ProxyForward instance and attributes an IP address and a proxy port to it

func (*Proxy) Listen

func (p *Proxy) Listen() error

Listen opens a TCP proxy for each ProxyForward instance

func (*Proxy) Stop added in v0.0.5

func (p *Proxy) Stop() error

Stop stops all currently active proxy listeners

type ProxyForward

type ProxyForward struct {
	Name        string
	Hostname    string
	LocalPort   string
	ForwardPort string
	LocalIP     string
	ProxyPort   string
}

func NewProxyForward

func NewProxyForward(name, hostname, localPort, forwardPort string) *ProxyForward

func (*ProxyForward) GetHostname added in v0.0.4

func (p *ProxyForward) GetHostname() string

func (*ProxyForward) GetProxifiedPorts

func (p *ProxyForward) GetProxifiedPorts() string

func (*ProxyForward) SetLocalIP added in v0.0.4

func (p *ProxyForward) SetLocalIP(ip string)

func (*ProxyForward) SetProxyPort

func (p *ProxyForward) SetProxyPort(port string)

type ProxyInterface added in v0.0.8

type ProxyInterface interface {
	Listen() error
	Stop() error
	AddProxyForward(name string, proxyForward *ProxyForward)
}

Jump to

Keyboard shortcuts

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