client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseVisitor

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

type Control

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

func NewControl

func NewControl(ctx context.Context, runId string, conn net.Conn, session *fmux.Session,
	clientCfg config.ClientCommonConf,
	pxyCfgs map[string]config.ProxyConf,
	visitorCfgs map[string]config.VisitorConf,
	serverUDPPort int) *Control

func (*Control) Close

func (ctl *Control) Close() error

func (*Control) ClosedDoneCh

func (ctl *Control) ClosedDoneCh() <-chan struct{}

ClosedDoneCh returns a channel which will be closed after all resources are released

func (*Control) HandleNewProxyResp

func (ctl *Control) HandleNewProxyResp(inMsg *msg.NewProxyResp)

func (*Control) HandleReqWorkConn

func (ctl *Control) HandleReqWorkConn(inMsg *msg.ReqWorkConn)

func (*Control) ReloadConf

func (ctl *Control) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) error

func (*Control) Run

func (ctl *Control) Run()

type Service

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

Service is a client service.

func NewService

func NewService(cfg config.ClientCommonConf, pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf, cfgFile string) (svr *Service, err error)

func (*Service) Close

func (svr *Service) Close()

func (*Service) GetController

func (svr *Service) GetController() *Control

func (*Service) ReloadConf

func (svr *Service) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) error

func (*Service) Run

func (svr *Service) Run() error

type StcpVisitor

type StcpVisitor struct {
	*BaseVisitor
	// contains filtered or unexported fields
}

func (*StcpVisitor) Close

func (sv *StcpVisitor) Close()

func (*StcpVisitor) Run

func (sv *StcpVisitor) Run() (err error)

type Visitor

type Visitor interface {
	Run() error
	Close()
}

Visitor is used for forward traffics from local port tot remote service.

func NewVisitor

func NewVisitor(ctx context.Context, ctl *Control, cfg config.VisitorConf) (visitor Visitor)

type VisitorManager

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

func NewVisitorManager

func NewVisitorManager(ctx context.Context, ctl *Control) *VisitorManager

func (*VisitorManager) Close

func (vm *VisitorManager) Close()

func (*VisitorManager) Reload

func (vm *VisitorManager) Reload(cfgs map[string]config.VisitorConf)

func (*VisitorManager) Run

func (vm *VisitorManager) Run()

type XtcpVisitor

type XtcpVisitor struct {
	*BaseVisitor
	// contains filtered or unexported fields
}

func (*XtcpVisitor) Close

func (sv *XtcpVisitor) Close()

func (*XtcpVisitor) Run

func (sv *XtcpVisitor) Run() (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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