Nginx and TPROXY

Hi all,
I just run into the need to have nginx support the Linux TPROXY
feature: there is not REDIRECT target for IPv6. As there is no support
for TPROXY in nginx I created a small patch for core & http modules
against 1.2.1. It’s enabled by recompiling nginx with --with-tproxy
and activating it by adding “tproxy” as an additional argument to

Unfortunately it is not possible to enable/disable tproxy behavior for
existing sockets during reload, only on startup or when reload adds
new listening sockets. This is due to fact that the setsockopt() call
must be done before bind().

Please have a look, so far it works for me but I did not do yet any
heavy testing and it’s not production yet:)

[email protected]