Documentation ¶
Index ¶
- Constants
- func Register(name string, fn CreatorFn)
- type CreatorFn
- 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) Handle(conn io.ReadWriteCloser)
- func (hp *HttpProxy) HttpHandler(rw http.ResponseWriter, req *http.Request)
- func (hp *HttpProxy) Name() string
- func (hp *HttpProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- type Listener
- type Plugin
- type UnixDomainSocketPlugin
Constants ¶
View Source
const PluginHttpProxy = "http_proxy"
View Source
const PluginUnixDomainSocket = "unix_domain_socket"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpProxy ¶
type HttpProxy struct { AuthUser string AuthPasswd string // 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) Handle ¶
func (hp *HttpProxy) Handle(conn io.ReadWriteCloser)
func (*HttpProxy) HttpHandler ¶
func (hp *HttpProxy) HttpHandler(rw http.ResponseWriter, req *http.Request)
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewProxyListener ¶
func NewProxyListener() *Listener
type UnixDomainSocketPlugin ¶
func (*UnixDomainSocketPlugin) Close ¶
func (uds *UnixDomainSocketPlugin) Close() error
func (*UnixDomainSocketPlugin) Handle ¶
func (uds *UnixDomainSocketPlugin) Handle(conn io.ReadWriteCloser)
func (*UnixDomainSocketPlugin) Name ¶
func (uds *UnixDomainSocketPlugin) Name() string
Click to show internal directories.
Click to hide internal directories.