http

package
v5.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHost

func ParseHost(rawHost string, defaultPort net.Port) (net.Destination, error)

ParseHost splits host and port from a raw string. Default port is used when raw string doesn't contain port.

func ParseXForwardedFor

func ParseXForwardedFor(header http.Header) []net.Address

ParseXForwardedFor parses X-Forwarded-For header in http headers, and return the IP list in it.

func RemoveHopByHopHeaders

func RemoveHopByHopHeaders(header http.Header)

RemoveHopByHopHeaders remove hop by hop headers in http header list.

Types

type SniffHeader

type SniffHeader struct {
	// contains filtered or unexported fields
}

func SniffHTTP

func SniffHTTP(b []byte) (*SniffHeader, error)

func (*SniffHeader) Domain

func (h *SniffHeader) Domain() string

func (*SniffHeader) Protocol

func (h *SniffHeader) Protocol() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL