Skip to main content

Module tcp

Module tcp 

Source
Expand description

TCP stream proxy service

Implements raw TCP proxying with a standalone serve() method. Provides bidirectional tunneling between clients and backends.

Optionally terminates TLS at the proxy (driven by the endpoint’s stream.tls config) and/or prepends a PROXY protocol v2 header to the upstream connection (driven by stream.proxy_protocol).

Structs§

TcpStreamService
TCP stream proxy service

Functions§

build_proxy_protocol_v2_header
Build a PROXY protocol v2 header describing a proxied TCP connection from src (the real client) to dst (the proxy’s listener address).
tls_acceptor_from_resolver
Build a TlsAcceptor for L4 TLS termination from a dynamic SNI cert resolver.