Back to godoc.org
v2ray.com/core/common/protocol/http

package http

v4.19.1+incompatible
Latest Go to latest
Published: Jun 3, 2019 | License: MIT | Module: v2ray.com/core

Index

Constants

const (
	HTTP1 version = iota
	HTTP2
)

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.

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
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier