Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_ssl_preread_module.xml @ 2112:9f7e12cf974f
Documented the $ssl_preread_alpn_protocols variable.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 16 Mar 2018 13:37:02 +0300 |
parents | 59d1f512c3a0 |
children | eca16aa19cfa |
comparison
equal
deleted
inserted
replaced
2111:dab82d534f0f | 2112:9f7e12cf974f |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_ssl_preread_module" | 9 <module name="Module ngx_stream_ssl_preread_module" |
10 link="/en/docs/stream/ngx_stream_ssl_preread_module.html" | 10 link="/en/docs/stream/ngx_stream_ssl_preread_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="1"> | 12 rev="2"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_ssl_preread_module</literal> module (1.11.5) allows | 17 The <literal>ngx_stream_ssl_preread_module</literal> module (1.11.5) allows |
18 extracting information from the | 18 extracting information from the |
19 <link url="https://tools.ietf.org/html/rfc5246#section-7.4.1.2">ClientHello</link> | 19 <link url="https://tools.ietf.org/html/rfc5246#section-7.4.1.2">ClientHello</link> |
20 message without terminating SSL/TLS, | 20 message without terminating SSL/TLS, |
21 for example, the sever name requested through | 21 for example, the sever name requested through |
22 <link url="https://tools.ietf.org/html/rfc6066#section-3">SNI</link>. | 22 <link url="https://tools.ietf.org/html/rfc6066#section-3">SNI</link> |
23 or protocols advertised in | |
24 <link url="https://tools.ietf.org/html/rfc7301">ALPN</link>. | |
23 This module is not built by default, it should be enabled with the | 25 This module is not built by default, it should be enabled with the |
24 <literal>--with-stream_ssl_preread_module</literal> | 26 <literal>--with-stream_ssl_preread_module</literal> |
25 configuration parameter. | 27 configuration parameter. |
26 </para> | 28 </para> |
27 | 29 |
29 | 31 |
30 | 32 |
31 <section id="example" name="Example Configuration"> | 33 <section id="example" name="Example Configuration"> |
32 | 34 |
33 <para> | 35 <para> |
36 | |
37 Selecting an upstream based on server name: | |
38 | |
34 <example> | 39 <example> |
35 map $ssl_preread_server_name $name { | 40 map $ssl_preread_server_name $name { |
36 backend.example.com backend; | 41 backend.example.com backend; |
37 default backend2; | 42 default backend2; |
38 } | 43 } |
46 server 192.168.0.3:12345; | 51 server 192.168.0.3:12345; |
47 server 192.168.0.4:12345; | 52 server 192.168.0.4:12345; |
48 } | 53 } |
49 | 54 |
50 server { | 55 server { |
51 listen 12346; | 56 listen 12346; |
52 proxy_pass $name; | 57 proxy_pass $name; |
53 ssl_preread on; | 58 ssl_preread on; |
59 } | |
60 </example> | |
61 | |
62 Selecting an upstream based on protocol: | |
63 | |
64 <example> | |
65 map $ssl_preread_alpn_protocols $proxy { | |
66 ~\bh2\b 127.0.0.1:8001; | |
67 ~\bhttp/1.1\b 127.0.0.1:8002; | |
68 ~\bxmpp-client\b 127.0.0.1:8003; | |
69 } | |
70 | |
71 server { | |
72 listen 9000; | |
73 proxy_pass $proxy; | |
74 ssl_preread on; | |
54 } | 75 } |
55 </example> | 76 </example> |
56 | 77 |
57 </para> | 78 </para> |
58 | 79 |
82 <para> | 103 <para> |
83 <list type="tag"> | 104 <list type="tag"> |
84 | 105 |
85 <tag-name id="var_ssl_preread_server_name"><var>$ssl_preread_server_name</var></tag-name> | 106 <tag-name id="var_ssl_preread_server_name"><var>$ssl_preread_server_name</var></tag-name> |
86 <tag-desc> | 107 <tag-desc> |
87 returns the server name requested through SNI | 108 server name requested through SNI |
109 </tag-desc> | |
110 | |
111 <tag-name id="var_ssl_preread_alpn_protocols"><var>$ssl_preread_alpn_protocols</var></tag-name> | |
112 <tag-desc> | |
113 list of protocols advertised by the client through ALPN (1.13.10) | |
114 <para> | |
115 The values are separated by commas. | |
116 </para> | |
88 </tag-desc> | 117 </tag-desc> |
89 | 118 |
90 </list> | 119 </list> |
91 </para> | 120 </para> |
92 | 121 |