core: v2ray.com/core/common/protocol/http Index | Files

package http

import "v2ray.com/core/common/protocol/http"

Index

Package Files

headers.go sniff.go

Constants

const (
    HTTP1 version = iota
    HTTP2
)

func ParseHost Uses

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 Uses

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 Uses

func RemoveHopByHopHeaders(header http.Header)

RemoveHopByHopHeaders remove hop by hop headers in http header list.

type SniffHeader Uses

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

func SniffHTTP Uses

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

func (*SniffHeader) Domain Uses

func (h *SniffHeader) Domain() string

func (*SniffHeader) Protocol Uses

func (h *SniffHeader) Protocol() string

Package http imports 7 packages (graph) and is imported by 6 packages. Updated 2019-07-24. Refresh now. Tools for package owners.