changeset 2677:3760176ba83e

Documented ngx_mail_realip_module.
author Yaroslav Zhuravlev <yar@nginx.com>
date Wed, 10 Mar 2021 20:35:36 +0000
parents 468e6e14e5cc
children a4d3e6db81b9
files xml/en/GNUmakefile xml/en/docs/index.xml xml/en/docs/mail/ngx_mail_realip_module.xml xml/ru/GNUmakefile xml/ru/docs/index.xml xml/ru/docs/mail/ngx_mail_realip_module.xml
diffstat 6 files changed, 144 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/GNUmakefile
+++ b/xml/en/GNUmakefile
@@ -99,6 +99,7 @@ REFS =									\
 		mail/ngx_mail_imap_module				\
 		mail/ngx_mail_pop3_module				\
 		mail/ngx_mail_proxy_module				\
+		mail/ngx_mail_realip_module				\
 		mail/ngx_mail_smtp_module				\
 		mail/ngx_mail_ssl_module				\
 		stream/ngx_stream_access_module				\
--- a/xml/en/docs/index.xml
+++ b/xml/en/docs/index.xml
@@ -8,7 +8,7 @@
 <article name="nginx documentation"
          link="/en/docs/"
          lang="en"
-         rev="47"
+         rev="48"
          toc="no">
 
 
@@ -511,6 +511,11 @@ ngx_mail_proxy_module</link>
 </listitem>
 
 <listitem>
+<link doc="mail/ngx_mail_realip_module.xml">
+ngx_mail_realip_module</link>
+</listitem>
+
+<listitem>
 <link doc="mail/ngx_mail_ssl_module.xml">
 ngx_mail_ssl_module</link>
 </listitem>
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/mail/ngx_mail_realip_module.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright (C) Nginx, Inc.
+  -->
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_mail_realip_module"
+        link="/en/docs/mail/ngx_mail_realip_module.html"
+        lang="en"
+        rev="1">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_mail_realip_module</literal> module is used
+to change the client address and port
+to the ones sent in the PROXY protocol header (1.19.8).
+The PROXY protocol must be previously enabled by setting the
+<link doc="ngx_mail_core_module.xml" id="proxy_protocol"/> parameter
+in the <literal>listen</literal> directive.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+listen 110 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;
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="set_real_ip_from">
+<syntax>
+    <value>address</value> |
+    <value>CIDR</value> |
+    <literal>unix:</literal></syntax>
+<default/>
+<context>mail</context>
+<context>server</context>
+
+<para>
+Defines trusted addresses that are known to send correct
+replacement addresses.
+If the special value <literal>unix:</literal> is specified,
+all UNIX-domain sockets will be trusted.
+</para>
+
+</directive>
+
+</section>
+
+</module>
--- a/xml/ru/GNUmakefile
+++ b/xml/ru/GNUmakefile
@@ -86,6 +86,7 @@ REFS =									\
 		mail/ngx_mail_imap_module				\
 		mail/ngx_mail_pop3_module				\
 		mail/ngx_mail_proxy_module				\
+		mail/ngx_mail_realip_module				\
 		mail/ngx_mail_smtp_module				\
 		mail/ngx_mail_ssl_module				\
 		stream/ngx_stream_access_module				\
--- a/xml/ru/docs/index.xml
+++ b/xml/ru/docs/index.xml
@@ -8,7 +8,7 @@
 <article name="nginx: документация"
          link="/ru/docs/"
          lang="ru"
-         rev="47"
+         rev="48"
          toc="no">
 
 
@@ -516,6 +516,11 @@ ngx_mail_proxy_module</link>
 </listitem>
 
 <listitem>
+<link doc="mail/ngx_mail_realip_module.xml">
+ngx_mail_realip_module</link>
+</listitem>
+
+<listitem>
 <link doc="mail/ngx_mail_ssl_module.xml">
 ngx_mail_ssl_module</link>
 </listitem>
new file mode 100644
--- /dev/null
+++ b/xml/ru/docs/mail/ngx_mail_realip_module.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright (C) Nginx, Inc.
+  -->
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Модуль ngx_mail_realip_module"
+        link="/ru/docs/mail/ngx_mail_realip_module.html"
+        lang="ru"
+        rev="1">
+
+<section id="summary">
+
+<para>
+Модуль <literal>ngx_mail_realip_module</literal> позволяет
+менять адрес и порт клиента
+на переданные в заголовке протокола PROXY (1.19.8).
+Протокол PROXY должен быть предварительно включён при помощи установки
+параметра <link doc="ngx_mail_core_module.xml" id="proxy_protocol"/>
+в директиве <literal>listen</literal>.
+</para>
+
+</section>
+
+
+<section id="example" name="Пример конфигурации">
+
+<para>
+<example>
+listen 110 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;
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Директивы">
+
+<directive name="set_real_ip_from">
+<syntax>
+    <value>адрес</value> |
+    <value>CIDR</value> |
+    <literal>unix:</literal></syntax>
+<default/>
+<context>mail</context>
+<context>server</context>
+
+<para>
+Задаёт доверенные адреса, которые передают верный адрес
+для замены.
+Если указано специальное значение <literal>unix:</literal>,
+доверенными будут считаться все UNIX-сокеты.
+</para>
+
+</directive>
+
+</section>
+
+</module>