# HG changeset patch # User Yaroslav Zhuravlev # Date 1473772440 -10800 # Node ID ee56773d44e863d89ad28c6713d22b963949dae8 # Parent 1626f1bf164c07ee548a552c0d35c78a6360e27f Documented ngx_stream_realip_module. diff -r 1626f1bf164c -r ee56773d44e8 xml/en/GNUmakefile --- a/xml/en/GNUmakefile Tue Sep 13 16:03:19 2016 +0300 +++ b/xml/en/GNUmakefile Tue Sep 13 16:14:00 2016 +0300 @@ -103,6 +103,7 @@ stream/ngx_stream_log_module \ stream/ngx_stream_map_module \ stream/ngx_stream_proxy_module \ + stream/ngx_stream_realip_module \ stream/ngx_stream_return_module \ stream/ngx_stream_split_clients_module \ stream/ngx_stream_ssl_module \ diff -r 1626f1bf164c -r ee56773d44e8 xml/en/docs/index.xml --- a/xml/en/docs/index.xml Tue Sep 13 16:03:19 2016 +0300 +++ b/xml/en/docs/index.xml Tue Sep 13 16:14:00 2016 +0300 @@ -8,7 +8,7 @@
@@ -527,6 +527,11 @@ + +ngx_stream_realip_module + + + ngx_stream_return_module diff -r 1626f1bf164c -r ee56773d44e8 xml/en/docs/stream/ngx_stream_realip_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/stream/ngx_stream_realip_module.xml Tue Sep 13 16:14:00 2016 +0300 @@ -0,0 +1,92 @@ + + + + + + + + +
+ + +The ngx_stream_realip_module module is used +to change the client address and port +to the ones sent in the PROXY protocol header (1.11.4). +The PROXY protocol must be previously enabled by setting the + parameter +in the listen directive. + + + +This module is not built by default, it should be enabled with the +--with-stream_realip_module +configuration parameter. + + +
+ + +
+ + + +listen 12345 proxy_protocol; + +set_real_ip_from 192.168.1.0/24; +set_real_ip_from 192.168.2.1; +set_real_ip_from 2001:0db8::/32; + + + +
+ + +
+ + + + address | + CIDR | + unix: + +stream +server + + +Defines trusted addresses that are known to send correct +replacement addresses. +If the special value unix: is specified, +all UNIX-domain sockets will be trusted. + + + + +
+ + +
+ + + + +$realip_remote_addr + +keeps the original client address + + +$realip_remote_port + +keeps the original client port + + + + + +
+ +
diff -r 1626f1bf164c -r ee56773d44e8 xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile Tue Sep 13 16:03:19 2016 +0300 +++ b/xml/ru/GNUmakefile Tue Sep 13 16:14:00 2016 +0300 @@ -91,6 +91,7 @@ stream/ngx_stream_log_module \ stream/ngx_stream_map_module \ stream/ngx_stream_proxy_module \ + stream/ngx_stream_realip_module \ stream/ngx_stream_return_module \ stream/ngx_stream_split_clients_module \ stream/ngx_stream_ssl_module \ diff -r 1626f1bf164c -r ee56773d44e8 xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml Tue Sep 13 16:03:19 2016 +0300 +++ b/xml/ru/docs/index.xml Tue Sep 13 16:14:00 2016 +0300 @@ -8,7 +8,7 @@
@@ -531,6 +531,11 @@ + +ngx_stream_realip_module + + + ngx_stream_return_module diff -r 1626f1bf164c -r ee56773d44e8 xml/ru/docs/stream/ngx_stream_realip_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/ru/docs/stream/ngx_stream_realip_module.xml Tue Sep 13 16:14:00 2016 +0300 @@ -0,0 +1,92 @@ + + + + + + + + +
+ + +Модуль ngx_stream_realip_module позволяет +менять адрес и порт клиента +на переданные в заголовке протокола PROXY (1.11.4). +Протокол PROXY должен быть предварительно включён при помощи установки +параметра +в директиве listen. + + + +По умолчанию этот модуль не собирается, его сборку необходимо +разрешить с помощью конфигурационного параметра +--with-stream_realip_module. + + +
+ + +
+ + + +listen 12345 proxy_protocol; + +set_real_ip_from 192.168.1.0/24; +set_real_ip_from 192.168.2.1; +set_real_ip_from 2001:0db8::/32; + + + +
+ + +
+ + + + адрес | + CIDR | + unix: + +stream +server + + +Задаёт доверенные адреса, которые передают верный адрес +для замены. +Если указано специальное значение unix:, +доверенными будут считаться все UNIX-сокеты. + + + + +
+ + +
+ + + + +$realip_remote_addr + +хранит исходный адрес клиента + + +$realip_remote_port + +хранит исходный порт клиента + + + + + +
+ +