# HG changeset patch # User Yaroslav Zhuravlev # Date 1468517585 -10800 # Node ID 3768eb3d9c6ce53d088f36541c6342d5afd3df1b # Parent 0e591e97737c9b369be7c5912c2c2599cabe9689 Documented the geo module in stream. diff --git a/xml/en/GNUmakefile b/xml/en/GNUmakefile --- a/xml/en/GNUmakefile +++ b/xml/en/GNUmakefile @@ -96,6 +96,7 @@ REFS = \ mail/ngx_mail_ssl_module \ stream/ngx_stream_access_module \ stream/ngx_stream_core_module \ + stream/ngx_stream_geo_module \ stream/ngx_stream_geoip_module \ stream/ngx_stream_limit_conn_module \ stream/ngx_stream_map_module \ diff --git a/xml/en/docs/index.xml b/xml/en/docs/index.xml --- a/xml/en/docs/index.xml +++ b/xml/en/docs/index.xml @@ -8,7 +8,7 @@
@@ -492,6 +492,11 @@ ngx_stream_access_module + +ngx_stream_geo_module + + + ngx_stream_geoip_module diff --git a/xml/en/docs/http/ngx_http_geo_module.xml b/xml/en/docs/stream/ngx_stream_geo_module.xml copy from xml/en/docs/http/ngx_http_geo_module.xml copy to xml/en/docs/stream/ngx_stream_geo_module.xml --- a/xml/en/docs/http/ngx_http_geo_module.xml +++ b/xml/en/docs/stream/ngx_stream_geo_module.xml @@ -1,21 +1,20 @@ - + rev="1">
-The ngx_http_geo_module module creates variables +The ngx_stream_geo_module module (1.11.3) creates variables with values depending on the client IP address. @@ -47,13 +46,13 @@ geo $geo { [$address] $variable -http +stream Describes the dependency of values of the specified variable on the client IP address. By default, the address is taken from the $remote_addr variable, -but it can also be taken from another variable (0.7.27), for example: +but it can also be taken from another variable, for example: geo $arg_remote_addr $geo { ...; @@ -65,7 +64,7 @@ geo $arg_remote_addr $geo { Since variables are evaluated only when used, the mere existence of even a large number of declared “geo” variables -does not cause any extra costs for request processing. +does not cause any extra costs for connection processing. @@ -76,10 +75,7 @@ then the “255.255.255.255” address is used. Addresses are specified either as prefixes in CIDR notation -(including individual addresses) or as ranges (0.7.23). - -IPv6 prefixes are supported starting from versions 1.3.10 and 1.2.7. - +(including individual addresses) or as ranges. @@ -88,7 +84,7 @@ The following special parameters are als delete -deletes the specified network (0.7.23). +deletes the specified network. default @@ -108,33 +104,9 @@ includes a file with addresses and value There can be several inclusions. -proxy - -defines trusted addresses (0.8.7, 0.7.63). -When a request comes from a trusted address, -an address from the
X-Forwarded-For
request -header field will be used instead. -In contrast to the regular addresses, trusted addresses are -checked sequentially. - -Trusted IPv6 addresses are supported starting from versions 1.3.0 and 1.2.1. - -
- -proxy_recursive - -enables recursive address search (1.3.0, 1.2.1). -If recursive search is disabled then instead of the original client -address that matches one of the trusted addresses, the last -address sent in
X-Forwarded-For
will be used. -If recursive search is enabled then instead of the original client -address that matches one of the trusted addresses, the last -non-trusted address sent in
X-Forwarded-For
will be used. -
- ranges -indicates that addresses are specified as ranges (0.7.23). +indicates that addresses are specified as ranges. This parameter should be the first. To speed up loading of a geo base, addresses should be put in ascending order. @@ -149,8 +121,6 @@ geo $country { default ZZ; include conf/geo.conf; delete 127.0.0.0/16; - proxy 192.168.100.0/24; - proxy 2001:0db8::/32; 127.0.0.0/24 US; 127.0.0.1/32 RU; diff --git a/xml/ru/GNUmakefile b/xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile +++ b/xml/ru/GNUmakefile @@ -85,6 +85,7 @@ REFS = \ mail/ngx_mail_ssl_module \ stream/ngx_stream_access_module \ stream/ngx_stream_core_module \ + stream/ngx_stream_geo_module \ stream/ngx_stream_geoip_module \ stream/ngx_stream_limit_conn_module \ stream/ngx_stream_map_module \ diff --git a/xml/ru/docs/index.xml b/xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml +++ b/xml/ru/docs/index.xml @@ -8,7 +8,7 @@
@@ -496,6 +496,11 @@ ngx_stream_access_module + +ngx_stream_geo_module + + + ngx_stream_geoip_module diff --git a/xml/ru/docs/http/ngx_http_geo_module.xml b/xml/ru/docs/stream/ngx_stream_geo_module.xml copy from xml/ru/docs/http/ngx_http_geo_module.xml copy to xml/ru/docs/stream/ngx_stream_geo_module.xml --- a/xml/ru/docs/http/ngx_http_geo_module.xml +++ b/xml/ru/docs/stream/ngx_stream_geo_module.xml @@ -1,21 +1,20 @@ - + rev="1">
-Модуль ngx_http_geo_module создаёт переменные, +Модуль ngx_http_geo_module (1.11.3) создаёт переменные, значения которых зависят от IP-адреса клиента. @@ -47,13 +46,13 @@ geo $geo { [$адрес] $переменная -http +stream Описывает для указанной переменной зависимость значения от IP-адреса клиента. По умолчанию адрес берётся из переменной $remote_addr, -но его также можно получить из другой переменной (0.7.27), например: +но его также можно получить из другой переменной, например: geo $arg_remote_addr $geo { ...; @@ -66,7 +65,7 @@ geo $arg_remote_addr $geo { Поскольку переменные вычисляются только в момент использования, само по себе наличие даже большого числа объявлений переменных “geo” не влечёт за собой никаких дополнительных -расходов на обработку запросов. +расходов на обработку соединений. @@ -77,10 +76,7 @@ geo $arg_remote_addr $geo { Адреса задаются либо префиксами в формате CIDR -(включая одиночные адреса), либо в виде диапазонов (0.7.23). - -IPv6-префиксы поддерживаются начиная с версий 1.3.10 и 1.2.7. - +(включая одиночные адреса), либо в виде диапазонов. @@ -89,7 +85,7 @@ IPv6-префиксы поддерживаются начиная с версий 1.3.10 и 1.2.7. delete -удаляет описанную сеть (0.7.23). +удаляет описанную сеть. default @@ -109,32 +105,9 @@ IPv6-префиксы поддерживаются начиная с версий 1.3.10 и 1.2.7. Включений может быть несколько. -proxy - -задаёт доверенные адреса (0.8.7, 0.7.63), -при запросе с которых будет использоваться адрес в переданном -поле заголовка запроса
X-Forwarded-For
. -В отличие от обычных адресов, доверенные адреса проверяются -последовательно. - -Доверенные IPv6-адреса поддерживаются начиная с версий 1.3.0 и 1.2.1. - -
- -proxy_recursive - -включает рекурсивный поиск адреса (1.3.0, 1.2.1). -При выключенном рекурсивном поиске вместо исходного адреса клиента, -совпадающего с одним из доверенных адресов, будет использоваться последний -адрес, переданный в
X-Forwarded-For
. -При включённом рекурсивном поиске вместо исходного адреса клиента, -совпадающего с одним из доверенных адресов, будет использоваться последний -не доверенный адрес, переданный в
X-Forwarded-For
. -
- ranges -указывает, что адреса задаются в виде диапазонов (0.7.23). +указывает, что адреса задаются в виде диапазонов. Этот параметр должен быть первым. Для ускорения загрузки гео-базы нужно располагать адреса в порядке возрастания. @@ -149,8 +122,6 @@ geo $country { default ZZ; include conf/geo.conf; delete 127.0.0.0/16; - proxy 192.168.100.0/24; - proxy 2001:0db8::/32; 127.0.0.0/24 US; 127.0.0.1/32 RU;