Versions in this module Expand all Collapse all v0 v0.38.0 Jan 15, 2022 Changes in this version + const ProxyPhaseCheckFailed + const ProxyPhaseClosed + const ProxyPhaseNew + const ProxyPhaseRunning + const ProxyPhaseStartErr + const ProxyPhaseWaitStart + func HandleTCPWorkConnection(ctx context.Context, localInfo *config.LocalSvrConf, proxyPlugin plugin.Plugin, ...) + type BaseProxy struct + type HTTPProxy struct + func (pxy *HTTPProxy) Close() + func (pxy *HTTPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *HTTPProxy) Run() (err error) + type HTTPSProxy struct + func (pxy *HTTPSProxy) Close() + func (pxy *HTTPSProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *HTTPSProxy) Run() (err error) + type Manager struct + func NewManager(ctx context.Context, msgSendCh chan (msg.Message), ...) *Manager + func (pm *Manager) Close() + func (pm *Manager) GetAllProxyStatus() []*WorkingStatus + func (pm *Manager) HandleEvent(evType event.Type, payload interface{}) error + func (pm *Manager) HandleWorkConn(name string, workConn net.Conn, m *msg.StartWorkConn) + func (pm *Manager) Reload(pxyCfgs map[string]config.ProxyConf) + func (pm *Manager) StartProxy(name string, remoteAddr string, serverRespErr string) error + type Proxy interface + Close func() + InWorkConn func(net.Conn, *msg.StartWorkConn) + Run func() error + func NewProxy(ctx context.Context, pxyConf config.ProxyConf, ...) (pxy Proxy) + type STCPProxy struct + func (pxy *STCPProxy) Close() + func (pxy *STCPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *STCPProxy) Run() (err error) + type SUDPProxy struct + func (pxy *SUDPProxy) Close() + func (pxy *SUDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *SUDPProxy) Run() (err error) + type TCPMuxProxy struct + func (pxy *TCPMuxProxy) Close() + func (pxy *TCPMuxProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *TCPMuxProxy) Run() (err error) + type TCPProxy struct + func (pxy *TCPProxy) Close() + func (pxy *TCPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *TCPProxy) Run() (err error) + type UDPProxy struct + func (pxy *UDPProxy) Close() + func (pxy *UDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *UDPProxy) Run() (err error) + type WorkingStatus struct + Cfg config.ProxyConf + Err string + Name string + Phase string + RemoteAddr string + Type string + type Wrapper struct + func NewWrapper(ctx context.Context, cfg config.ProxyConf, clientCfg config.ClientCommonConf, ...) *Wrapper + func (pw *Wrapper) GetStatus() *WorkingStatus + func (pw *Wrapper) InWorkConn(workConn net.Conn, m *msg.StartWorkConn) + func (pw *Wrapper) SetRunningStatus(remoteAddr string, respErr string) error + func (pw *Wrapper) Start() + func (pw *Wrapper) Stop() + type XTCPProxy struct + func (pxy *XTCPProxy) Close() + func (pxy *XTCPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) + func (pxy *XTCPProxy) Run() (err error)