Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_proxy_module.xml @ 1662:48615cf80e20
Documented the UDP proxy functionality.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 15 Mar 2016 16:31:42 +0300 |
parents | c4c1dddfedac |
children | d855e7cc3b2f |
comparison
equal
deleted
inserted
replaced
1661:0da7c65fdae5 | 1662:48615cf80e20 |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_proxy_module" | 9 <module name="Module ngx_stream_proxy_module" |
10 link="/en/docs/stream/ngx_stream_proxy_module.html" | 10 link="/en/docs/stream/ngx_stream_proxy_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="12"> | 12 rev="13"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_proxy_module</literal> module (1.9.0) allows passing | 17 The <literal>ngx_stream_proxy_module</literal> module (1.9.0) allows proxying |
18 connections to another server over TCP and UNIX-domain sockets. | 18 data streams over TCP, UDP (1.9.13), and UNIX-domain sockets. |
19 </para> | 19 </para> |
20 | 20 |
21 </section> | 21 </section> |
22 | 22 |
23 | 23 |
33 server { | 33 server { |
34 listen 12345; | 34 listen 12345; |
35 proxy_connect_timeout 1s; | 35 proxy_connect_timeout 1s; |
36 proxy_timeout 1m; | 36 proxy_timeout 1m; |
37 proxy_pass example.com:12345; | 37 proxy_pass example.com:12345; |
38 } | |
39 | |
40 server { | |
41 listen 53 udp; | |
42 proxy_responses 1; | |
43 proxy_timeout 20s; | |
44 proxy_pass dns.example.com:53; | |
38 } | 45 } |
39 | 46 |
40 server { | 47 server { |
41 listen [::1]:12345; | 48 listen [::1]:12345; |
42 proxy_pass unix:/tmp/stream.socket; | 49 proxy_pass unix:/tmp/stream.socket; |
209 </para> | 216 </para> |
210 | 217 |
211 </directive> | 218 </directive> |
212 | 219 |
213 | 220 |
221 <directive name="proxy_responses"> | |
222 <syntax><value>number</value></syntax> | |
223 <default/> | |
224 <context>stream</context> | |
225 <context>server</context> | |
226 <appeared-in>1.9.13</appeared-in> | |
227 | |
228 <para> | |
229 Sets the number of datagrams expected from the proxied server | |
230 in response to the client request | |
231 if the <link doc="ngx_stream_core_module.xml" id="udp">UDP</link> | |
232 protocol is used. | |
233 By default, the number of datagrams is not limited: | |
234 the response datagrams will be sent | |
235 until the <link id="proxy_timeout"/> value expires. | |
236 </para> | |
237 | |
238 </directive> | |
239 | |
240 | |
214 <directive name="proxy_ssl"> | 241 <directive name="proxy_ssl"> |
215 <syntax><literal>on</literal> | <literal>off</literal></syntax> | 242 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
216 <default>off</default> | 243 <default>off</default> |
217 <context>stream</context> | 244 <context>stream</context> |
218 <context>server</context> | 245 <context>server</context> |