mmproxy is a lightweight TCP proxy that serves exactly one purpose: to smooth
the transition of TCP servers to use proxy-protocol.
Usually, introducing TCP level load balancing introduces a significant problem
- the client source IP gets lost. From the application point of view the
inbound TCP connection is originated by load-balancer, not the real client.
Proxy-protocol is an invention from Haproxy, that aims to solve this:
https://www.haproxy.com/blog/haproxy/proxy-protocol/ Proxy-protocol defines an
exchange in which the first bytes transmitted from the load balancer will
describe the Client Source IP. This is great, but applications must explicitly
support proxy-protocol to use it.
For many mature applications introducing proxy-protocol support is hard.
"mmproxy" is a workaround to help in this case.
mmproxy sits near the application, receives the proxy-protocol enabled
connections from the load balancer, spoofs the client IP addresses, and sends
traffic directly to the application. From application point of view the traffic
look identically like it would have originated from the remote client.