Versions in this module Expand all Collapse all v1 v1.0.0 Apr 9, 2022 Changes in this version + const PluginHTTP2HTTPS + const PluginHTTPProxy + const PluginHTTPS2HTTP + const PluginHTTPS2HTTPS + const PluginSocks5 + const PluginStaticFile + const PluginUnixDomainSocket + func Register(name string, fn CreatorFn) + type CreatorFn func(params map[string]string) (Plugin, error) + type HTTP2HTTPSPlugin struct + func (p *HTTP2HTTPSPlugin) Close() error + func (p *HTTP2HTTPSPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + func (p *HTTP2HTTPSPlugin) Name() string + type HTTPProxy struct + AuthPasswd string + AuthUser string + func (hp *HTTPProxy) Auth(req *http.Request) bool + func (hp *HTTPProxy) Close() error + func (hp *HTTPProxy) ConnectHandler(rw http.ResponseWriter, req *http.Request) + func (hp *HTTPProxy) HTTPHandler(rw http.ResponseWriter, req *http.Request) + func (hp *HTTPProxy) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + func (hp *HTTPProxy) Name() string + func (hp *HTTPProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) + type HTTPS2HTTPPlugin struct + func (p *HTTPS2HTTPPlugin) Close() error + func (p *HTTPS2HTTPPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + func (p *HTTPS2HTTPPlugin) Name() string + type HTTPS2HTTPSPlugin struct + func (p *HTTPS2HTTPSPlugin) Close() error + func (p *HTTPS2HTTPSPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + func (p *HTTPS2HTTPSPlugin) Name() string + type Listener struct + func NewProxyListener() *Listener + func (l *Listener) Accept() (net.Conn, error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + func (l *Listener) PutConn(conn net.Conn) error + type Plugin interface + Close func() error + Handle func(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + Name func() string + func Create(name string, params map[string]string) (p Plugin, err error) + func NewHTTP2HTTPSPlugin(params map[string]string) (Plugin, error) + func NewHTTPProxyPlugin(params map[string]string) (Plugin, error) + func NewHTTPS2HTTPPlugin(params map[string]string) (Plugin, error) + func NewHTTPS2HTTPSPlugin(params map[string]string) (Plugin, error) + func NewSocks5Plugin(params map[string]string) (p Plugin, err error) + func NewStaticFilePlugin(params map[string]string) (Plugin, error) + func NewUnixDomainSocketPlugin(params map[string]string) (p Plugin, err error) + type Socks5Plugin struct + Server *gosocks5.Server + func (sp *Socks5Plugin) Close() error + func (sp *Socks5Plugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + func (sp *Socks5Plugin) Name() string + type StaticFilePlugin struct + func (sp *StaticFilePlugin) Close() error + func (sp *StaticFilePlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + func (sp *StaticFilePlugin) Name() string + type UnixDomainSocketPlugin struct + UnixAddr *net.UnixAddr + func (uds *UnixDomainSocketPlugin) Close() error + func (uds *UnixDomainSocketPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) + func (uds *UnixDomainSocketPlugin) Name() string