Documentation ¶
Index ¶
- Constants
- func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.Plugin, ...)
- type BaseProxy
- type HttpProxy
- type HttpsProxy
- type Proxy
- type ProxyManager
- func (pm *ProxyManager) Close()
- func (pm *ProxyManager) GetAllProxyStatus() []*ProxyStatus
- func (pm *ProxyManager) HandleEvent(evType event.EventType, payload interface{}) error
- func (pm *ProxyManager) HandleWorkConn(name string, workConn frpNet.Conn)
- func (pm *ProxyManager) Reload(pxyCfgs map[string]config.ProxyConf)
- func (pm *ProxyManager) StartProxy(name string, remoteAddr string, serverRespErr string) error
- type ProxyStatus
- type ProxyWrapper
- type StcpProxy
- type TcpProxy
- type UdpProxy
- type XtcpProxy
Constants ¶
View Source
const ( ProxyStatusNew = "new" ProxyStatusWaitStart = "wait start" ProxyStatusStartErr = "start error" ProxyStatusRunning = "running" ProxyStatusCheckFailed = "check failed" 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 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 handle work connections for different proxy type.
type ProxyManager ¶
func NewProxyManager ¶
func NewProxyManager(msgSendCh chan (msg.Message), logPrefix string) *ProxyManager
func (*ProxyManager) Close ¶
func (pm *ProxyManager) Close()
func (*ProxyManager) GetAllProxyStatus ¶
func (pm *ProxyManager) GetAllProxyStatus() []*ProxyStatus
func (*ProxyManager) HandleEvent ¶
func (pm *ProxyManager) HandleEvent(evType event.EventType, payload interface{}) error
func (*ProxyManager) HandleWorkConn ¶
func (pm *ProxyManager) HandleWorkConn(name string, workConn frpNet.Conn)
func (*ProxyManager) StartProxy ¶
func (pm *ProxyManager) StartProxy(name string, remoteAddr string, serverRespErr string) error
type ProxyStatus ¶
type ProxyWrapper ¶
type ProxyWrapper struct { ProxyStatus log.Logger // contains filtered or unexported fields }
func NewProxyWrapper ¶
func NewProxyWrapper(cfg config.ProxyConf, eventHandler event.EventHandler, logPrefix string) *ProxyWrapper
func (*ProxyWrapper) GetStatus ¶
func (pw *ProxyWrapper) GetStatus() *ProxyStatus
func (*ProxyWrapper) InWorkConn ¶
func (pw *ProxyWrapper) InWorkConn(workConn frpNet.Conn)
func (*ProxyWrapper) SetRunningStatus ¶
func (pw *ProxyWrapper) SetRunningStatus(remoteAddr string, respErr string) error
func (*ProxyWrapper) Start ¶
func (pw *ProxyWrapper) Start()
func (*ProxyWrapper) Stop ¶
func (pw *ProxyWrapper) Stop()
type StcpProxy ¶
type StcpProxy struct { BaseProxy // contains filtered or unexported fields }
STCP
func (*StcpProxy) InWorkConn ¶
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 XtcpProxy ¶
type XtcpProxy struct { BaseProxy // contains filtered or unexported fields }
XTCP
func (*XtcpProxy) InWorkConn ¶
Click to show internal directories.
Click to hide internal directories.