Documentation ¶
Index ¶
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) GetUsedPortsNum ¶
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 Close() }
func NewProxy ¶
func NewProxy(ctx context.Context, runId string, 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 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.