http

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package http offers protocol operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReqestTransformer added in v0.1.8

type ReqestTransformer struct {
	Proxy bool
}

ReqestTransformer transforms http request for direct connections.

func (ReqestTransformer) Transform added in v0.1.8

func (t ReqestTransformer) Transform(b []byte) []byte

Transform does the transformation.

type Request

type Request struct {
	Method string

	Proto     string
	Auth      string
	PostData  []byte // to retry to defend RST
	TLSData   []byte // to retry to defend RST, ClientHello
	Responsed bool

	Header   textproto.MIMEHeader
	URL      *url.URL
	TryCount byte
	// contains filtered or unexported fields
}

Request struct.

func ParseRequest

func ParseRequest(rd *bufio.Reader) (r *Request, err error)

ParseRequest parses a request.

func (*Request) Command

func (r *Request) Command() string

Command requested by.

func (*Request) GetRequest

func (r *Request) GetRequest(w io.Writer, rd *bufio.Reader) (err error)

GetRequest requests the ClientHello for sending to a remote server. RCWN (Race Cache With Network) or ads blockers would abort dial-in without sendig ClientHello! Drop it.

func (*Request) Host

func (r *Request) Host() string

Host requested to.

func (*Request) Hostname

func (r *Request) Hostname() string

Hostname only requested to.

func (*Request) Port

func (r *Request) Port() string

Port requested to.

func (*Request) Request

func (r *Request) Request(fw *forwarder.Forwarder, proxy, seg bool) (restart bool, err error)

Request to a upstream server.

func (*Request) Target

func (r *Request) Target() string

Target URL requested to.

Jump to

Keyboard shortcuts

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