summaryrefslogtreecommitdiff
path: root/auto/unix
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2015-12-18 19:05:27 +0300
committerRoman Arutyunyan <arut@nginx.com>2015-12-18 19:05:27 +0300
commitbe79f5cb16eeb452e2a9e343a89f89b3b47bc5a2 (patch)
tree00ab618ce2f89cd97f91982cf822f74cc8e16754 /auto/unix
parent77ec993fd7300423aab8f6c798082b9421f51a24 (diff)
downloadnginx-be79f5cb16eeb452e2a9e343a89f89b3b47bc5a2.tar.gz
Upstream: the "transparent" parameter of proxy_bind and friends.
This parameter lets binding the proxy connection to a non-local address. Upstream will see the connection as coming from that address. When used with $remote_addr, upstream will accept the connection from real client address. Example: proxy_bind $remote_addr transparent;
Diffstat (limited to 'auto/unix')
-rwxr-xr-xauto/unix38
1 files changed, 38 insertions, 0 deletions
diff --git a/auto/unix b/auto/unix
index 8c0e8135c..e6396ef2a 100755
--- a/auto/unix
+++ b/auto/unix
@@ -329,6 +329,44 @@ ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0)"
. auto/feature
+# NetBSD bind to any address for transparent proxying
+
+ngx_feature="SO_BINDANY"
+ngx_feature_name="NGX_HAVE_TRANSPARENT_PROXY"
+ngx_feature_run=no
+ngx_feature_incs="#include <sys/socket.h>"
+ngx_feature_path=
+ngx_feature_libs=
+ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_BINDANY, NULL, 0)"
+. auto/feature
+
+
+# Linux transparent proxying
+
+ngx_feature="IP_TRANSPARENT"
+ngx_feature_name="NGX_HAVE_TRANSPARENT_PROXY"
+ngx_feature_run=no
+ngx_feature_incs="#include <sys/socket.h>
+ #include <netinet/in.h>"
+ngx_feature_path=
+ngx_feature_libs=
+ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_TRANSPARENT, NULL, 0)"
+. auto/feature
+
+
+# FreeBSD bind to any address for transparent proxying
+
+ngx_feature="IP_BINDANY"
+ngx_feature_name="NGX_HAVE_TRANSPARENT_PROXY"
+ngx_feature_run=no
+ngx_feature_incs="#include <sys/socket.h>
+ #include <netinet/in.h>"
+ngx_feature_path=
+ngx_feature_libs=
+ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_BINDANY, NULL, 0)"
+. auto/feature
+
+
# BSD way to get IPv4 datagram destination address
ngx_feature="IP_RECVDSTADDR"