Documentation ¶
Index ¶
- Constants
- func Register(name string, fn CreatorFn)
- type CreatorFn
- type HTTPS2HTTPPlugin
- 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, realConn frpNet.Conn, extraBufToLocal []byte)
- 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
- func Create(name string, params map[string]string) (p Plugin, err error)
- func NewHTTPS2HTTPPlugin(params map[string]string) (Plugin, error)
- func NewHttpProxyPlugin(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
- type StaticFilePlugin
- type UnixDomainSocketPlugin
Constants ¶
View Source
const PluginHTTPS2HTTP = "https2http"
View Source
const PluginHttpProxy = "http_proxy"
View Source
const PluginSocks5 = "socks5"
View Source
const PluginStaticFile = "static_file"
View Source
const PluginUnixDomainSocket = "unix_domain_socket"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPS2HTTPPlugin ¶ added in v0.26.0
type HTTPS2HTTPPlugin struct {
// contains filtered or unexported fields
}
func (*HTTPS2HTTPPlugin) Close ¶ added in v0.26.0
func (p *HTTPS2HTTPPlugin) Close() error
func (*HTTPS2HTTPPlugin) Handle ¶ added in v0.26.0
func (p *HTTPS2HTTPPlugin) Handle(conn io.ReadWriteCloser, realConn frpNet.Conn, extraBufToLocal []byte)
func (*HTTPS2HTTPPlugin) Name ¶ added in v0.26.0
func (p *HTTPS2HTTPPlugin) Name() string
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) 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 Plugin ¶
type Plugin interface { Name() string Handle(conn io.ReadWriteCloser, realConn frpNet.Conn, extraBufToLocal []byte) Close() error }
func NewHTTPS2HTTPPlugin ¶ added in v0.26.0
func NewSocks5Plugin ¶ added in v0.13.0
func NewStaticFilePlugin ¶ added in v0.16.0
type Socks5Plugin ¶ added in v0.13.0
func (*Socks5Plugin) Close ¶ added in v0.13.0
func (sp *Socks5Plugin) Close() error
func (*Socks5Plugin) Handle ¶ added in v0.13.0
func (sp *Socks5Plugin) Handle(conn io.ReadWriteCloser, realConn frpNet.Conn, extraBufToLocal []byte)
func (*Socks5Plugin) Name ¶ added in v0.13.0
func (sp *Socks5Plugin) Name() string
type StaticFilePlugin ¶ added in v0.16.0
type StaticFilePlugin struct {
// contains filtered or unexported fields
}
func (*StaticFilePlugin) Close ¶ added in v0.16.0
func (sp *StaticFilePlugin) Close() error
func (*StaticFilePlugin) Handle ¶ added in v0.16.0
func (sp *StaticFilePlugin) Handle(conn io.ReadWriteCloser, realConn frpNet.Conn, extraBufToLocal []byte)
func (*StaticFilePlugin) Name ¶ added in v0.16.0
func (sp *StaticFilePlugin) Name() string
type UnixDomainSocketPlugin ¶
func (*UnixDomainSocketPlugin) Close ¶
func (uds *UnixDomainSocketPlugin) Close() error
func (*UnixDomainSocketPlugin) Handle ¶
func (uds *UnixDomainSocketPlugin) Handle(conn io.ReadWriteCloser, realConn frpNet.Conn, extraBufToLocal []byte)
func (*UnixDomainSocketPlugin) Name ¶
func (uds *UnixDomainSocketPlugin) Name() string
Click to show internal directories.
Click to hide internal directories.