http

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const StateFile = ""

Variables

This section is empty.

Functions

func NewHTTPProxy

func NewHTTPProxy(
	logger zerolog.Logger,
	httpHandler *HTTPHandler,
	httpsHandler *HTTPSHandler,
	dnsClient *dns.Client,
	ruleSet *rule.RuleSet,
	listenAddr net.TCPAddr,
	cfg *config.RuntimeConfig,
) server.Server

Types

type HTTPHandler

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

func NewHTTPHandler

func NewHTTPHandler(logger zerolog.Logger) *HTTPHandler

func (*HTTPHandler) HandleRequest

func (h *HTTPHandler) HandleRequest(
	ctx context.Context,
	lConn net.Conn,
	req *proto.HTTPRequest,
	dst *netutil.Destination,
	rule *config.Rule,
) error

type HTTPProxy

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

func (*HTTPProxy) Addr

func (p *HTTPProxy) Addr() string

func (*HTTPProxy) ListenAndServe

func (p *HTTPProxy) ListenAndServe(
	appctx context.Context,
) error

func (*HTTPProxy) SetupNetworkJobs added in v1.5.2

func (p *HTTPProxy) SetupNetworkJobs(ctx context.Context) (string, error)

type HTTPSHandler

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

func NewHTTPSHandler

func NewHTTPSHandler(
	logger zerolog.Logger,
	desyncer *desync.TLSDesyncer,
	cfg *config.RuntimeConfig,
) *HTTPSHandler

func (*HTTPSHandler) HandleRequest

func (h *HTTPSHandler) HandleRequest(
	ctx context.Context,
	lConn net.Conn,
	dst *netutil.Destination,
	rule *config.Rule,
) error

Jump to

Keyboard shortcuts

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