Documentation ¶
Index ¶
- type BaseVisitor
- type ByProxyStatusResp
- type Control
- func (ctl *Control) Close() error
- func (ctl *Control) ClosedDoneCh() <-chan struct{}
- func (ctl *Control) HandleNewProxyResp(inMsg *msg.NewProxyResp)
- func (ctl *Control) HandleReqWorkConn(inMsg *msg.ReqWorkConn)
- func (ctl *Control) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) error
- func (ctl *Control) Run()
- type GeneralResponse
- type ProxyStatusResp
- type STCPVisitor
- type SUDPVisitor
- type Service
- func (svr *Service) APIGetConfig(c echo.Context) (err error)
- func (svr *Service) APIPutConfig(c echo.Context) (err error)
- func (svr *Service) APIReload(c echo.Context) (err error)
- func (svr *Service) APIStatus(c echo.Context) (err error)
- func (svr *Service) Close()
- func (svr *Service) GetController() *Control
- func (svr *Service) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) error
- func (svr *Service) Run() error
- func (svr *Service) RunAdminServer(address string) (err error)
- type StatusResp
- type Visitor
- type VisitorManager
- type XTCPVisitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseVisitor ¶ added in v0.14.0
type BaseVisitor struct {
// contains filtered or unexported fields
}
type ByProxyStatusResp ¶ added in v0.15.0
type ByProxyStatusResp []ProxyStatusResp
func (ByProxyStatusResp) Len ¶ added in v0.15.0
func (a ByProxyStatusResp) Len() int
func (ByProxyStatusResp) Less ¶ added in v0.15.0
func (a ByProxyStatusResp) Less(i, j int) bool
func (ByProxyStatusResp) Swap ¶ added in v0.15.0
func (a ByProxyStatusResp) Swap(i, j int)
type Control ¶
type Control struct {
// contains filtered or unexported fields
}
func NewControl ¶
func (*Control) ClosedDoneCh ¶ added in v0.28.1
func (ctl *Control) ClosedDoneCh() <-chan struct{}
ClosedDoneCh returns a channel which will be closed after all resources are released
func (*Control) HandleNewProxyResp ¶ added in v0.15.0
func (ctl *Control) HandleNewProxyResp(inMsg *msg.NewProxyResp)
func (*Control) HandleReqWorkConn ¶ added in v0.15.0
func (ctl *Control) HandleReqWorkConn(inMsg *msg.ReqWorkConn)
func (*Control) ReloadConf ¶ added in v0.28.1
type GeneralResponse ¶ added in v0.13.0
type ProxyStatusResp ¶ added in v0.15.0
type ProxyStatusResp struct { Name string `json:"name"` Type string `json:"type"` Status string `json:"status"` Err string `json:"err"` LocalAddr string `json:"local_addr"` Plugin string `json:"plugin"` RemoteAddr string `json:"remote_addr"` }
func NewProxyStatusResp ¶ added in v0.15.0
func NewProxyStatusResp(status *proxy.WorkingStatus, serverAddr string) ProxyStatusResp
type STCPVisitor ¶ added in v0.36.3
type STCPVisitor struct { *BaseVisitor // contains filtered or unexported fields }
func (*STCPVisitor) Close ¶ added in v0.36.3
func (sv *STCPVisitor) Close()
func (*STCPVisitor) Run ¶ added in v0.36.3
func (sv *STCPVisitor) Run() (err error)
type SUDPVisitor ¶ added in v0.36.3
type SUDPVisitor struct { *BaseVisitor // contains filtered or unexported fields }
func (*SUDPVisitor) Close ¶ added in v0.36.3
func (sv *SUDPVisitor) Close()
func (*SUDPVisitor) Run ¶ added in v0.36.3
func (sv *SUDPVisitor) Run() (err error)
SUDP Run start listen a udp port
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a client service.
func NewService ¶
func (*Service) APIGetConfig ¶ added in v0.36.4
GET api/config
func (*Service) APIPutConfig ¶ added in v0.36.4
PUT api/config
func (*Service) GetController ¶ added in v0.28.1
func (*Service) ReloadConf ¶ added in v0.28.1
func (*Service) RunAdminServer ¶ added in v0.13.0
type StatusResp ¶ added in v0.15.0
type StatusResp struct { TCP []ProxyStatusResp `json:"tcp"` UDP []ProxyStatusResp `json:"udp"` HTTP []ProxyStatusResp `json:"http"` HTTPS []ProxyStatusResp `json:"https"` STCP []ProxyStatusResp `json:"stcp"` XTCP []ProxyStatusResp `json:"xtcp"` SUDP []ProxyStatusResp `json:"sudp"` }
type Visitor ¶ added in v0.14.0
type Visitor interface { Run() error Close() }
Visitor is used for forward traffics from local port tot remote service.
func NewVisitor ¶ added in v0.14.0
type VisitorManager ¶ added in v0.28.1
type VisitorManager struct {
// contains filtered or unexported fields
}
func NewVisitorManager ¶ added in v0.28.1
func NewVisitorManager(ctx context.Context, ctl *Control) *VisitorManager
func (*VisitorManager) Close ¶ added in v0.28.1
func (vm *VisitorManager) Close()
func (*VisitorManager) Reload ¶ added in v0.28.1
func (vm *VisitorManager) Reload(cfgs map[string]config.VisitorConf)
func (*VisitorManager) Run ¶ added in v0.28.1
func (vm *VisitorManager) Run()
type XTCPVisitor ¶ added in v0.36.3
type XTCPVisitor struct { *BaseVisitor // contains filtered or unexported fields }
func (*XTCPVisitor) Close ¶ added in v0.36.3
func (sv *XTCPVisitor) Close()
func (*XTCPVisitor) Run ¶ added in v0.36.3
func (sv *XTCPVisitor) Run() (err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.