Documentation
¶
Index ¶
- func Authenticate(request *http.Request, cache *cache.LruCache[string, bool], ...) *http.Response
- func HandleConn(c net.Conn, in chan<- C.ConnContext, cache *cache.LruCache[string, bool], ...)
- func HandleUpgrade(localConn net.Conn, serverConn *N.BufferedConn, request *http.Request, ...) (resp *http.Response)
- func New(addr string, in chan<- C.ConnContext) (C.Listener, error)
- func NewWithAuthenticate(addr string, in chan<- C.ConnContext, authenticate bool) (C.Listener, error)
- func ReadRequest(b *bufio.Reader) (req *http.Request, err error)
- func RemoveExtraHTTPHostPort(req *http.Request)
- func RemoveHopByHopHeaders(header http.Header)
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
func HandleConn ¶
func HandleConn(c net.Conn, in chan<- C.ConnContext, cache *cache.LruCache[string, bool], auth auth.Authenticator)
func HandleUpgrade ¶
func HandleUpgrade(localConn net.Conn, serverConn *N.BufferedConn, request *http.Request, in chan<- C.ConnContext) (resp *http.Response)
func NewWithAuthenticate ¶
func RemoveExtraHTTPHostPort ¶
RemoveExtraHTTPHostPort remove extra host port (example.com:80 --> example.com) It resolves the behavior of some HTTP servers that do not handle host:80 (e.g. baidu.com)
func RemoveHopByHopHeaders ¶
RemoveHopByHopHeaders remove hop-by-hop header
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func (*Listener) RawAddress ¶
RawAddress implements C.Listener
func (*Listener) SetAuthenticator ¶
SetAuthenticator implements C.AuthenticatorListener
Click to show internal directories.
Click to hide internal directories.