Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP_TRANSPARENT support for listening sockets #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shankerwangmiao
Copy link

Proposed changes

This patch adds support for IP_TRANSPARENT support for listening sockets in the http module and stream module. Adding transparent to ths options of a listen directive, IP_TRANSPARENT will be enabled on that listening socket, allowing it to accept traffic redirected using TPROXY.

When this is enabled, the original destination IP address and port before the redirection can be fetched from the variables $server_addr and $server_port.

The original version of this patch was proposed by Stijn Tintel in https://trac.nginx.org/nginx/ticket/287.

This patch adds support for IP_TRANSPARENT support for listening sockets
in the http module and stream module. Adding `transparent` to ths
options of a listen directive, IP_TRANSPARENT will be enabled on that
listening socket, allowing it to accept traffic redirected using TPROXY.

When this is enabled, the original destination IP address and port
before the redirection can be fetched from the variables $server_addr
and $server_port.

The original version of this patch was proposed by Stijn Tintel in
<https://trac.nginx.org/nginx/ticket/287>.

Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
@shankerwangmiao shankerwangmiao marked this pull request as ready for review September 7, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant