request

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 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

Overview

Package request defines the canonical HTTP request that every Inkwall adapter produces and the inspection pipeline consumes. Adapters translate proxy-native messages (ext_proc, SPOE, forward-auth, net/http, ...) into a Request, so detection code never depends on which proxy asked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	// ID correlates the request across proxy, engine and events. Empty means
	// the engine generates one.
	ID string

	// Proto is the protocol version, e.g. "HTTP/1.1" or "HTTP/2.0".
	Proto string
	// Method is the HTTP method.
	Method string
	// Scheme is "http" or "https" as seen by the proxy.
	Scheme string
	// Host is the request authority (Host header or :authority).
	Host string
	// RawURI is the path and query exactly as received, before any
	// normalization. Rules apply their own transformations.
	RawURI string

	// Headers holds request headers. The Host header is carried in Host.
	Headers http.Header

	// ClientIP is the end client's address, resolved through trusted proxies.
	ClientIP netip.Addr
	// PeerIP is the address of the direct TCP peer.
	PeerIP netip.Addr

	// Body holds the inspected prefix of the request body, at most the
	// configured inspection limit. It is nil when the body is not inspected.
	Body []byte
	// BodyTruncated reports that the body was longer than Body.
	BodyTruncated bool
}

Request is an adapter-independent view of one HTTP request.

Jump to

Keyboard shortcuts

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