proxy

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleUserTcpConnection

func HandleUserTcpConnection(pxy Proxy, userConn frpNet.Conn, statsCollector stats.Collector)

HandleUserTcpConnection is used for incoming tcp user connections. It can be used for tcp, http, https type.

Types

type BaseProxy

type BaseProxy struct {
	log.Logger
	// contains filtered or unexported fields
}

func (*BaseProxy) Close

func (pxy *BaseProxy) Close()

func (*BaseProxy) GetName

func (pxy *BaseProxy) GetName() string

func (*BaseProxy) GetUsedPortsNum

func (pxy *BaseProxy) GetUsedPortsNum() int

func (*BaseProxy) GetWorkConnFromPool

func (pxy *BaseProxy) GetWorkConnFromPool() (workConn frpNet.Conn, err error)

type GetWorkConnFn

type GetWorkConnFn func() (frpNet.Conn, error)

type HttpProxy

type HttpProxy struct {
	BaseProxy
	// contains filtered or unexported fields
}

func (*HttpProxy) Close

func (pxy *HttpProxy) Close()

func (*HttpProxy) GetConf

func (pxy *HttpProxy) GetConf() config.ProxyConf

func (*HttpProxy) GetRealConn

func (pxy *HttpProxy) GetRealConn() (workConn frpNet.Conn, err error)

func (*HttpProxy) Run

func (pxy *HttpProxy) Run() (remoteAddr string, err error)

type HttpsProxy

type HttpsProxy struct {
	BaseProxy
	// contains filtered or unexported fields
}

func (*HttpsProxy) Close

func (pxy *HttpsProxy) Close()

func (*HttpsProxy) GetConf

func (pxy *HttpsProxy) GetConf() config.ProxyConf

func (*HttpsProxy) Run

func (pxy *HttpsProxy) Run() (remoteAddr string, err error)

type Proxy

type Proxy interface {
	Run() (remoteAddr string, err error)
	GetName() string
	GetConf() config.ProxyConf
	GetWorkConnFromPool() (workConn frpNet.Conn, err error)
	GetUsedPortsNum() int
	Close()
	log.Logger
}

func NewProxy

func NewProxy(runId string, rc *controller.ResourceController, statsCollector stats.Collector, poolCount int,
	getWorkConnFn GetWorkConnFn, pxyConf config.ProxyConf) (pxy Proxy, err error)

type ProxyManager

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

func NewProxyManager

func NewProxyManager() *ProxyManager

func (*ProxyManager) Add

func (pm *ProxyManager) Add(name string, pxy Proxy) error

func (*ProxyManager) Del

func (pm *ProxyManager) Del(name string)

func (*ProxyManager) GetByName

func (pm *ProxyManager) GetByName(name string) (pxy Proxy, ok bool)

type StcpProxy

type StcpProxy struct {
	BaseProxy
	// contains filtered or unexported fields
}

func (*StcpProxy) Close

func (pxy *StcpProxy) Close()

func (*StcpProxy) GetConf

func (pxy *StcpProxy) GetConf() config.ProxyConf

func (*StcpProxy) Run

func (pxy *StcpProxy) Run() (remoteAddr string, err error)

type TcpProxy

type TcpProxy struct {
	BaseProxy
	// contains filtered or unexported fields
}

func (*TcpProxy) Close

func (pxy *TcpProxy) Close()

func (*TcpProxy) GetConf

func (pxy *TcpProxy) GetConf() config.ProxyConf

func (*TcpProxy) Run

func (pxy *TcpProxy) Run() (remoteAddr string, err error)

type UdpProxy

type UdpProxy struct {
	BaseProxy
	// contains filtered or unexported fields
}

func (*UdpProxy) Close

func (pxy *UdpProxy) Close()

func (*UdpProxy) GetConf

func (pxy *UdpProxy) GetConf() config.ProxyConf

func (*UdpProxy) Run

func (pxy *UdpProxy) Run() (remoteAddr string, err error)

type XtcpProxy

type XtcpProxy struct {
	BaseProxy
	// contains filtered or unexported fields
}

func (*XtcpProxy) Close

func (pxy *XtcpProxy) Close()

func (*XtcpProxy) GetConf

func (pxy *XtcpProxy) GetConf() config.ProxyConf

func (*XtcpProxy) Run

func (pxy *XtcpProxy) Run() (remoteAddr string, err error)

Jump to

Keyboard shortcuts

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