Documentation ¶
Index ¶
- func RegisterProxyFactory(proxyConfType reflect.Type, factory func(*BaseProxy, config.ProxyConf) Proxy)
- type BaseProxy
- func (pxy *BaseProxy) Close()
- func (pxy *BaseProxy) Context() context.Context
- func (pxy *BaseProxy) GetLimiter() *rate.Limiter
- func (pxy *BaseProxy) GetLoginMsg() *msg.Login
- 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
- func NewHTTPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- func NewHTTPSProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- func NewProxy(ctx context.Context, userInfo plugin.UserInfo, ...) (pxy Proxy, err error)
- func NewSTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- func NewSUDPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- func NewTCPMuxProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- func NewTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- func NewUDPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- func NewXTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy
- type STCPProxy
- type SUDPProxy
- type TCPMuxProxy
- type TCPProxy
- type UDPProxy
- type XTCPProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseProxy ¶
type BaseProxy struct {
// contains filtered or unexported fields
}
func (*BaseProxy) GetLimiter ¶ added in v0.51.1
func (*BaseProxy) GetLoginMsg ¶ added in v0.51.1
func (*BaseProxy) GetResourceController ¶ added in v0.37.2
func (pxy *BaseProxy) GetResourceController() *controller.ResourceController
func (*BaseProxy) GetUsedPortsNum ¶
func (*BaseProxy) GetUserInfo ¶ added in v0.37.2
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 ¶ added in v0.37.2
type HTTPProxy struct { *BaseProxy // contains filtered or unexported fields }
func (*HTTPProxy) GetRealConn ¶ added in v0.37.2
type HTTPSProxy ¶ added in v0.37.2
type HTTPSProxy struct { *BaseProxy // contains filtered or unexported fields }
func (*HTTPSProxy) Close ¶ added in v0.37.2
func (pxy *HTTPSProxy) Close()
func (*HTTPSProxy) GetConf ¶ added in v0.37.2
func (pxy *HTTPSProxy) GetConf() config.ProxyConf
func (*HTTPSProxy) Run ¶ added in v0.37.2
func (pxy *HTTPSProxy) Run() (remoteAddr string, err error)
type Manager ¶ added in v0.37.2
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶ added in v0.37.2
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 GetLimiter() *rate.Limiter GetLoginMsg() *msg.Login Close() }
func NewHTTPProxy ¶ added in v0.51.1
func NewHTTPSProxy ¶ added in v0.51.1
func NewProxy ¶
func NewProxy(ctx context.Context, userInfo plugin.UserInfo, rc *controller.ResourceController, poolCount int, getWorkConnFn GetWorkConnFn, pxyConf config.ProxyConf, serverCfg config.ServerCommonConf, loginMsg *msg.Login, ) (pxy Proxy, err error)
func NewSTCPProxy ¶ added in v0.51.1
func NewSUDPProxy ¶ added in v0.51.1
func NewTCPMuxProxy ¶ added in v0.51.1
func NewTCPProxy ¶ added in v0.51.1
func NewUDPProxy ¶ added in v0.51.1
type STCPProxy ¶ added in v0.37.2
type STCPProxy struct { *BaseProxy // contains filtered or unexported fields }
type SUDPProxy ¶ added in v0.37.2
type SUDPProxy struct { *BaseProxy // contains filtered or unexported fields }
type TCPMuxProxy ¶ added in v0.37.2
type TCPMuxProxy struct { *BaseProxy // contains filtered or unexported fields }
func (*TCPMuxProxy) Close ¶ added in v0.37.2
func (pxy *TCPMuxProxy) Close()
func (*TCPMuxProxy) GetConf ¶ added in v0.37.2
func (pxy *TCPMuxProxy) GetConf() config.ProxyConf
func (*TCPMuxProxy) Run ¶ added in v0.37.2
func (pxy *TCPMuxProxy) Run() (remoteAddr string, err error)
type TCPProxy ¶ added in v0.37.2
type TCPProxy struct { *BaseProxy // contains filtered or unexported fields }
type UDPProxy ¶ added in v0.37.2
type UDPProxy struct { *BaseProxy // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.