Package org.mockserver.netty.proxy
package org.mockserver.netty.proxy
-
ClassDescriptionCuts a binary connection into the messages of a protocol, as a client sends them, so that each is matched, forwarded and logged as one message however it was read.Joins what one read loop delivers on a binary connection into one message, so that a message is not cut where a read buffer filled or where TLS handed over part of what it had decrypted.A composite
TransparentProxyHandler.OriginalDestinationResolverthat tries an ordered chain of resolution strategies and returns the first non-null result.Resolves the original destination of a transparently intercepted TCP connection by reading the Linux conntrack table (/proc/net/nf_conntrack).Resolves the original destination of a transparently intercepted TCP connection by consulting theDnsIntentRegistry— a record of hostname-to-IP answers that MockServer's DNS server has handed out.Resolves the original destination of a transparently intercepted TCP connection by reading a pinned BPF hash map populated by an external eBPF program.Cuts a binary connection into messages that each carry their own length:offsetbytes, then an unsigned length field ofprefixBytes(1, 2, 4 or 8) in the byte order given, then the body.Wires theIP_TRANSPARENTsocket option on the server bootstrap when TPROXY mode is enabled.Cuts a binary connection into the messages of the MySQL client/server protocol, as a client sends them.Cuts a binary connection into the messages of the PostgreSQL frontend/backend protocol (version 3), as a client sends them.Inbound handler that detects and parses PROXY protocol v1 (text format) and v2 (binary format) headers prepended to TCP connections by upstream load balancers (e.g., AWS GWLB, HAProxy, nginx withproxy_protocol on).Cuts a binary connection into the messages of the Redis serialization protocol (RESP2 and RESP3), as a client sends them: one complete top-level value with everything nested in it, or, when the first byte names no RESP type, one inline command up to and including its line feed.Reads the original destination of an intercepted TCP connection on Linux.Resolves the original destination of a transparently intercepted TCP connection by callinggetsockopt(fd, SOL_IP, SO_ORIGINAL_DST, ...)via JNA on Linux.Resolves the original destination of a transparently intercepted TCP connection using the TPROXY (IP_TRANSPARENT) mechanism.A Netty channel handler that resolves the original destination for transparently intercepted connections and stores it as theHttpActionHandler.REMOTE_SOCKETchannel attribute.Strategy interface for resolving the original destination.Utility for transparent HTTP proxy mode — provides Host-header parsing helpers and anTransparentProxyInitializer.isEnabled()configuration check.