Documentation ¶
Index ¶
- func Register(name string, fn CreatorFn)
- type CreatorFn
- type ExtraInfo
- type HTTP2HTTPPlugin
- type HTTP2HTTPSPlugin
- type HTTPProxy
- 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(_ context.Context, conn io.ReadWriteCloser, realConn net.Conn, _ *ExtraInfo)
- func (hp *HTTPProxy) Name() string
- func (hp *HTTPProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- type HTTPS2HTTPPlugin
- type HTTPS2HTTPSPlugin
- type Listener
- type Plugin
- func Create(name string, options v1.ClientPluginOptions) (p Plugin, err error)
- func NewHTTP2HTTPPlugin(options v1.ClientPluginOptions) (Plugin, error)
- func NewHTTP2HTTPSPlugin(options v1.ClientPluginOptions) (Plugin, error)
- func NewHTTPProxyPlugin(options v1.ClientPluginOptions) (Plugin, error)
- func NewHTTPS2HTTPPlugin(options v1.ClientPluginOptions) (Plugin, error)
- func NewHTTPS2HTTPSPlugin(options v1.ClientPluginOptions) (Plugin, error)
- func NewSocks5Plugin(options v1.ClientPluginOptions) (p Plugin, err error)
- func NewStaticFilePlugin(options v1.ClientPluginOptions) (Plugin, error)
- func NewTLS2RawPlugin(options v1.ClientPluginOptions) (Plugin, error)
- func NewUnixDomainSocketPlugin(options v1.ClientPluginOptions) (p Plugin, err error)
- type Socks5Plugin
- type StaticFilePlugin
- type TLS2RawPlugin
- type UnixDomainSocketPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreatorFn ¶
type CreatorFn func(options v1.ClientPluginOptions) (Plugin, error)
params has prefix "plugin_"
type HTTP2HTTPPlugin ¶ added in v0.59.0
type HTTP2HTTPPlugin struct {
// contains filtered or unexported fields
}
func (*HTTP2HTTPPlugin) Close ¶ added in v0.59.0
func (p *HTTP2HTTPPlugin) Close() error
func (*HTTP2HTTPPlugin) Handle ¶ added in v0.59.0
func (p *HTTP2HTTPPlugin) Handle(_ context.Context, conn io.ReadWriteCloser, realConn net.Conn, _ *ExtraInfo)
func (*HTTP2HTTPPlugin) Name ¶ added in v0.59.0
func (p *HTTP2HTTPPlugin) Name() string
type HTTP2HTTPSPlugin ¶
type HTTP2HTTPSPlugin struct {
// contains filtered or unexported fields
}
func (*HTTP2HTTPSPlugin) Close ¶
func (p *HTTP2HTTPSPlugin) Close() error
func (*HTTP2HTTPSPlugin) Handle ¶
func (p *HTTP2HTTPSPlugin) Handle(_ context.Context, conn io.ReadWriteCloser, realConn net.Conn, _ *ExtraInfo)
func (*HTTP2HTTPSPlugin) Name ¶
func (p *HTTP2HTTPSPlugin) Name() string
type HTTPProxy ¶
type HTTPProxy struct {
// contains filtered or unexported fields
}
func (*HTTPProxy) ConnectHandler ¶
func (hp *HTTPProxy) ConnectHandler(rw http.ResponseWriter, req *http.Request)
deprecated Hijack needs to SetReadDeadline on the Conn of the request, but if we use stream compression here, we may always get i/o timeout error.
func (*HTTPProxy) HTTPHandler ¶
func (hp *HTTPProxy) HTTPHandler(rw http.ResponseWriter, req *http.Request)
type HTTPS2HTTPPlugin ¶
type HTTPS2HTTPPlugin struct {
// contains filtered or unexported fields
}
func (*HTTPS2HTTPPlugin) Close ¶
func (p *HTTPS2HTTPPlugin) Close() error
func (*HTTPS2HTTPPlugin) Handle ¶
func (p *HTTPS2HTTPPlugin) Handle(_ context.Context, conn io.ReadWriteCloser, realConn net.Conn, extra *ExtraInfo)
func (*HTTPS2HTTPPlugin) Name ¶
func (p *HTTPS2HTTPPlugin) Name() string
type HTTPS2HTTPSPlugin ¶ added in v0.36.0
type HTTPS2HTTPSPlugin struct {
// contains filtered or unexported fields
}
func (*HTTPS2HTTPSPlugin) Close ¶ added in v0.36.0
func (p *HTTPS2HTTPSPlugin) Close() error
func (*HTTPS2HTTPSPlugin) Handle ¶ added in v0.36.0
func (p *HTTPS2HTTPSPlugin) Handle(_ context.Context, conn io.ReadWriteCloser, realConn net.Conn, extra *ExtraInfo)
func (*HTTPS2HTTPSPlugin) Name ¶ added in v0.36.0
func (p *HTTPS2HTTPSPlugin) Name() string
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewProxyListener ¶
func NewProxyListener() *Listener
type Plugin ¶
type Plugin interface { Name() string Handle(ctx context.Context, conn io.ReadWriteCloser, realConn net.Conn, extra *ExtraInfo) Close() error }
func NewHTTP2HTTPPlugin ¶ added in v0.59.0
func NewHTTP2HTTPPlugin(options v1.ClientPluginOptions) (Plugin, error)
func NewHTTP2HTTPSPlugin ¶
func NewHTTP2HTTPSPlugin(options v1.ClientPluginOptions) (Plugin, error)
func NewHTTPProxyPlugin ¶
func NewHTTPProxyPlugin(options v1.ClientPluginOptions) (Plugin, error)
func NewHTTPS2HTTPPlugin ¶
func NewHTTPS2HTTPPlugin(options v1.ClientPluginOptions) (Plugin, error)
func NewHTTPS2HTTPSPlugin ¶ added in v0.36.0
func NewHTTPS2HTTPSPlugin(options v1.ClientPluginOptions) (Plugin, error)
func NewSocks5Plugin ¶
func NewSocks5Plugin(options v1.ClientPluginOptions) (p Plugin, err error)
func NewStaticFilePlugin ¶
func NewStaticFilePlugin(options v1.ClientPluginOptions) (Plugin, error)
func NewTLS2RawPlugin ¶ added in v0.60.0
func NewTLS2RawPlugin(options v1.ClientPluginOptions) (Plugin, error)
func NewUnixDomainSocketPlugin ¶
func NewUnixDomainSocketPlugin(options v1.ClientPluginOptions) (p Plugin, err error)
type Socks5Plugin ¶
func (*Socks5Plugin) Close ¶
func (sp *Socks5Plugin) Close() error
func (*Socks5Plugin) Handle ¶
func (sp *Socks5Plugin) Handle(_ context.Context, conn io.ReadWriteCloser, realConn net.Conn, _ *ExtraInfo)
func (*Socks5Plugin) Name ¶
func (sp *Socks5Plugin) Name() string
type StaticFilePlugin ¶
type StaticFilePlugin struct {
// contains filtered or unexported fields
}
func (*StaticFilePlugin) Close ¶
func (sp *StaticFilePlugin) Close() error
func (*StaticFilePlugin) Handle ¶
func (sp *StaticFilePlugin) Handle(_ context.Context, conn io.ReadWriteCloser, realConn net.Conn, _ *ExtraInfo)
func (*StaticFilePlugin) Name ¶
func (sp *StaticFilePlugin) Name() string
type TLS2RawPlugin ¶ added in v0.60.0
type TLS2RawPlugin struct {
// contains filtered or unexported fields
}
func (*TLS2RawPlugin) Close ¶ added in v0.60.0
func (p *TLS2RawPlugin) Close() error
func (*TLS2RawPlugin) Handle ¶ added in v0.60.0
func (p *TLS2RawPlugin) Handle(ctx context.Context, conn io.ReadWriteCloser, realConn net.Conn, _ *ExtraInfo)
func (*TLS2RawPlugin) Name ¶ added in v0.60.0
func (p *TLS2RawPlugin) Name() string
type UnixDomainSocketPlugin ¶
func (*UnixDomainSocketPlugin) Close ¶
func (uds *UnixDomainSocketPlugin) Close() error
func (*UnixDomainSocketPlugin) Handle ¶
func (uds *UnixDomainSocketPlugin) Handle(ctx context.Context, conn io.ReadWriteCloser, _ net.Conn, extra *ExtraInfo)
func (*UnixDomainSocketPlugin) Name ¶
func (uds *UnixDomainSocketPlugin) Name() string
Click to show internal directories.
Click to hide internal directories.