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 Manager
- type Proxy
- 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 user TCP connections. It can be used for tcp, http, https type.
Types ¶
type BaseProxy ¶
type BaseProxy struct {
// contains filtered or unexported fields
}
func (*BaseProxy) GetResourceController ¶
func (pxy *BaseProxy) GetResourceController() *controller.ResourceController
func (*BaseProxy) GetUsedPortsNum ¶
func (*BaseProxy) GetUserInfo ¶
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 Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
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 TCPMuxProxy ¶
type TCPMuxProxy struct { *BaseProxy // contains filtered or unexported fields }
func (*TCPMuxProxy) Close ¶
func (pxy *TCPMuxProxy) Close()
func (*TCPMuxProxy) GetConf ¶
func (pxy *TCPMuxProxy) GetConf() config.ProxyConf
func (*TCPMuxProxy) Run ¶
func (pxy *TCPMuxProxy) Run() (remoteAddr string, err error)
Click to show internal directories.
Click to hide internal directories.