Documentation ¶
Index ¶
- Constants
- func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.Plugin, ...)
- type BaseProxy
- type BaseVisitor
- type ByProxyStatusResp
- type Control
- type GeneralResponse
- type HttpProxy
- type HttpsProxy
- type Proxy
- type ProxyManager
- func (pm *ProxyManager) CheckAndStartProxy(pxyStatus []string)
- func (pm *ProxyManager) CloseProxies()
- func (pm *ProxyManager) GetAllProxyStatus() []*ProxyStatus
- func (pm *ProxyManager) HandleWorkConn(name string, workConn frpNet.Conn)
- func (pm *ProxyManager) Reload(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.ProxyConf, ...) error
- func (pm *ProxyManager) Reset(msgSendCh chan (msg.Message), logPrefix string)
- func (pm *ProxyManager) StartProxy(name string, remoteAddr string, serverRespErr string) error
- type ProxyStatus
- type ProxyStatusResp
- type ProxyWrapper
- type ReloadResp
- type Service
- type StatusResp
- type StcpProxy
- type StcpVisitor
- type TcpProxy
- type UdpProxy
- type Visitor
- type XtcpProxy
- type XtcpVisitor
Constants ¶
View Source
const ( ProxyStatusNew = "new" ProxyStatusStartErr = "start error" ProxyStatusWaitStart = "wait start" ProxyStatusRunning = "running" ProxyStatusClosed = "closed" )
Variables ¶
This section is empty.
Functions ¶
func HandleTcpWorkConnection ¶
func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.Plugin, baseInfo *config.BaseProxyConf, workConn frpNet.Conn, encKey []byte)
Common handler for tcp work connections.
Types ¶
type BaseVisitor ¶ added in v0.14.0
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 ¶
func NewControl ¶
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)
type GeneralResponse ¶ added in v0.13.0
type HttpProxy ¶
type HttpProxy struct { BaseProxy // contains filtered or unexported fields }
HTTP
func (*HttpProxy) InWorkConn ¶
type HttpsProxy ¶
type HttpsProxy struct { BaseProxy // contains filtered or unexported fields }
HTTPS
func (*HttpsProxy) Close ¶
func (pxy *HttpsProxy) Close()
func (*HttpsProxy) InWorkConn ¶
func (pxy *HttpsProxy) InWorkConn(conn frpNet.Conn)
func (*HttpsProxy) Run ¶
func (pxy *HttpsProxy) Run() (err error)
type Proxy ¶
type Proxy interface { Run() error // InWorkConn accept work connections registered to server. InWorkConn(conn frpNet.Conn) Close() log.Logger }
Proxy defines how to deal with work connections for different proxy type.
type ProxyManager ¶ added in v0.15.0
func NewProxyManager ¶ added in v0.15.0
func NewProxyManager(ctl *Control, msgSendCh chan (msg.Message), logPrefix string) *ProxyManager
func (*ProxyManager) CheckAndStartProxy ¶ added in v0.15.0
func (pm *ProxyManager) CheckAndStartProxy(pxyStatus []string)
pxyStatus: check and start proxies in which status
func (*ProxyManager) CloseProxies ¶ added in v0.15.0
func (pm *ProxyManager) CloseProxies()
func (*ProxyManager) GetAllProxyStatus ¶ added in v0.15.0
func (pm *ProxyManager) GetAllProxyStatus() []*ProxyStatus
func (*ProxyManager) HandleWorkConn ¶ added in v0.15.0
func (pm *ProxyManager) HandleWorkConn(name string, workConn frpNet.Conn)
func (*ProxyManager) Reset ¶ added in v0.15.0
func (pm *ProxyManager) Reset(msgSendCh chan (msg.Message), logPrefix string)
func (*ProxyManager) StartProxy ¶ added in v0.15.0
func (pm *ProxyManager) StartProxy(name string, remoteAddr string, serverRespErr string) error
type ProxyStatus ¶ added in v0.15.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 *ProxyStatus) ProxyStatusResp
type ProxyWrapper ¶ added in v0.15.0
type ProxyWrapper struct { Name string Type string Status string Err string Cfg config.ProxyConf RemoteAddr string // contains filtered or unexported fields }
func NewProxyWrapper ¶ added in v0.15.0
func NewProxyWrapper(cfg config.ProxyConf) *ProxyWrapper
func (*ProxyWrapper) Close ¶ added in v0.15.0
func (pw *ProxyWrapper) Close()
func (*ProxyWrapper) GetStatus ¶ added in v0.15.0
func (pw *ProxyWrapper) GetStatus() *ProxyStatus
func (*ProxyWrapper) GetStatusStr ¶ added in v0.16.0
func (pw *ProxyWrapper) GetStatusStr() string
func (*ProxyWrapper) InWorkConn ¶ added in v0.15.0
func (pw *ProxyWrapper) InWorkConn(workConn frpNet.Conn)
func (*ProxyWrapper) Start ¶ added in v0.15.0
func (pw *ProxyWrapper) Start(remoteAddr string, serverRespErr string) error
func (*ProxyWrapper) WaitStart ¶ added in v0.16.0
func (pw *ProxyWrapper) WaitStart()
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"` }
type StcpProxy ¶ added in v0.13.0
type StcpProxy struct { BaseProxy // contains filtered or unexported fields }
STCP
func (*StcpProxy) InWorkConn ¶ added in v0.13.0
type StcpVisitor ¶ added in v0.14.0
type StcpVisitor struct { BaseVisitor // contains filtered or unexported fields }
func (*StcpVisitor) Close ¶ added in v0.14.0
func (sv *StcpVisitor) Close()
func (*StcpVisitor) Run ¶ added in v0.14.0
func (sv *StcpVisitor) Run() (err error)
type TcpProxy ¶
type TcpProxy struct { BaseProxy // contains filtered or unexported fields }
TCP
func (*TcpProxy) InWorkConn ¶
type UdpProxy ¶
type UdpProxy struct { BaseProxy // contains filtered or unexported fields }
UDP
func (*UdpProxy) InWorkConn ¶
type Visitor ¶ added in v0.14.0
Visitor is used for forward traffics from local port tot remote service.
type XtcpProxy ¶ added in v0.14.0
type XtcpProxy struct { BaseProxy // contains filtered or unexported fields }
XTCP
func (*XtcpProxy) InWorkConn ¶ added in v0.14.0
type XtcpVisitor ¶ added in v0.14.0
type XtcpVisitor struct { BaseVisitor // contains filtered or unexported fields }
func (*XtcpVisitor) Close ¶ added in v0.14.0
func (sv *XtcpVisitor) Close()
func (*XtcpVisitor) Run ¶ added in v0.14.0
func (sv *XtcpVisitor) Run() (err error)
Click to show internal directories.
Click to hide internal directories.