Documentation
¶
Overview ¶
Package httpp provides a convenient way to implement an http proxy server with flexible backends.
Index ¶
Constants ¶
View Source
const (
CONNECT = "CONNECT"
)
proxy type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
Authenticator interface
type BasicAuth ¶
type BasicAuth struct {
// contains filtered or unexported fields
}
BasicAuth ...
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request illustrates a request.
func (*Request) ClientAddr ¶
ClientAddr returns client's address.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server illustrates a server.
func (*Server) Accept ¶
Accept returns a valid request. If the server is stopped, it will return nil.
func (*Server) GetAuth ¶
func (s *Server) GetAuth(typ string) (a Authenticator)
GetAuth gets the authenticator with given type. It will return a nil authenticator when not exist.
func (*Server) SetAuth ¶
func (s *Server) SetAuth(a Authenticator)
SetAuth sets an authenticator, it will overwrite the authenticator with same type if exists.
Click to show internal directories.
Click to hide internal directories.