Documentation
¶
Index ¶
- func HandleUserTcpConnection(pxy Proxy, userConn net.Conn, serverCfg config.ServerCommonConf)
- type BaseProxy
- func (pxy *BaseProxy) Close()
- func (pxy *BaseProxy) Context() context.Context
- func (pxy *BaseProxy) GetName() string
- func (pxy *BaseProxy) GetResourceController() *controller.ResourceController
- func (pxy *BaseProxy) GetUsedPortsNum() int
- func (pxy *BaseProxy) GetUserInfo() plugin.UserInfo
- func (pxy *BaseProxy) GetWorkConnFromPool(src, dst net.Addr) (workConn net.Conn, err error)
- type GetWorkConnFn
- type HttpProxy
- type HttpsProxy
- type Proxy
- type ProxyManager
- type StcpProxy
- type SudpProxy
- type TcpMuxProxy
- type TcpProxy
- type UdpProxy
- type XtcpProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleUserTcpConnection ¶
func HandleUserTcpConnection(pxy Proxy, userConn net.Conn, serverCfg config.ServerCommonConf)
HandleUserTcpConnection is used for incoming tcp user connections. It can be used for tcp, http, https type.
Types ¶
type BaseProxy ¶
type BaseProxy struct {
// contains filtered or unexported fields
}
func (*BaseProxy) GetResourceController ¶ added in v0.33.0
func (pxy *BaseProxy) GetResourceController() *controller.ResourceController
func (*BaseProxy) GetUsedPortsNum ¶
func (*BaseProxy) GetUserInfo ¶ added in v0.33.0
func (*BaseProxy) GetWorkConnFromPool ¶
GetWorkConnFromPool try to get a new work connections from pool for quickly response, we immediately send the StartWorkConn message to frpc after take out one from pool
type GetWorkConnFn ¶
type HttpProxy ¶
type HttpProxy struct {
*BaseProxy
// contains filtered or unexported fields
}
func (*HttpProxy) GetRealConn ¶
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 {
Context() context.Context
Run() (remoteAddr string, err error)
GetName() string
GetConf() config.ProxyConf
GetWorkConnFromPool(src, dst net.Addr) (workConn net.Conn, err error)
GetUsedPortsNum() int
GetResourceController() *controller.ResourceController
GetUserInfo() plugin.UserInfo
Close()
}
func NewProxy ¶
func NewProxy(ctx context.Context, userInfo plugin.UserInfo, rc *controller.ResourceController, poolCount int, getWorkConnFn GetWorkConnFn, pxyConf config.ProxyConf, serverCfg config.ServerCommonConf) (pxy Proxy, err error)
type ProxyManager ¶
type ProxyManager struct {
// contains filtered or unexported fields
}
func NewProxyManager ¶
func NewProxyManager() *ProxyManager
func (*ProxyManager) Del ¶
func (pm *ProxyManager) Del(name string)
type SudpProxy ¶ added in v0.33.0
type SudpProxy struct {
*BaseProxy
// contains filtered or unexported fields
}
type TcpMuxProxy ¶ added in v0.32.0
type TcpMuxProxy struct {
*BaseProxy
// contains filtered or unexported fields
}
func (*TcpMuxProxy) Close ¶ added in v0.32.0
func (pxy *TcpMuxProxy) Close()
func (*TcpMuxProxy) GetConf ¶ added in v0.32.0
func (pxy *TcpMuxProxy) GetConf() config.ProxyConf
func (*TcpMuxProxy) Run ¶ added in v0.32.0
func (pxy *TcpMuxProxy) Run() (remoteAddr string, err error)
Click to show internal directories.
Click to hide internal directories.