Module v2

Expand description

Version 2 of the HAProxy protocol (binary version).

See https://haproxy.org/download/1.8/doc/proxy-protocol.txt

Structs§

Builder
Implementation of the builder pattern for PROXY protocol v2 headers. Supports both valid and invalid headers via the write_payload and write_payloads functions.
Header
A proxy protocol version 2 header.
IPv4
The source and destination IPv4 addresses and TCP ports of a header.
IPv6
The source and destination IPv6 addresses and TCP ports of a header.
TypeLengthValue
A Type-Length-Value payload.
TypeLengthValues
An Iterator of TypeLengthValues stored in a byte slice.
Unix
The source and destination addresses of UNIX sockets.
Writer
Write interface for the builder’s internal buffer. Can be used to turn header parts into bytes.

Enums§

AddressFamily
The supported AddressFamily for a PROXY protocol header.
Addresses
The source and destination address information for a given AddressFamily.
Command
The supported Commands for a PROXY protocol header.
ParseError
An error in parsing a binary PROXY protocol header.
Protocol
The supported Protocols for a PROXY protocol header.
Type
Supported types for TypeLengthValue payloads.
Version
The supported Versions for binary headers.

Constants§

PROTOCOL_PREFIX
The prefix of the PROXY protocol header.

Traits§

WriteToHeader
Defines how to write a type as part of a binary PROXY protocol header.