Add proxy_protocol, proxy_protocol_timeout options for ws/wss

This commit is contained in:
Feng Lee 2017-12-25 20:38:09 +08:00
parent db954aeb6d
commit d5222dcc9b
2 changed files with 24 additions and 4 deletions

View File

@ -511,6 +511,10 @@ listener.ws.external.max_clients = 64
listener.ws.external.access.1 = allow all listener.ws.external.access.1 = allow all
## Proxy Protocol V1/2
## listener.ws.external.proxy_protocol = on
## listener.ws.external.proxy_protocol_timeout = 3s
## TCP Options ## TCP Options
listener.ws.external.backlog = 1024 listener.ws.external.backlog = 1024
@ -537,6 +541,10 @@ listener.wss.external.max_clients = 64
listener.wss.external.access.1 = allow all listener.wss.external.access.1 = allow all
## Proxy Protocol V1/2
## listener.wss.external.proxy_protocol = on
## listener.wss.external.proxy_protocol_timeout = 3s
## SSL Options ## SSL Options
listener.wss.external.handshake_timeout = 15s listener.wss.external.handshake_timeout = 15s

View File

@ -795,12 +795,10 @@ end}.
]}. ]}.
{mapping, "listener.tcp.$name.proxy_protocol", "emqttd.listeners", [ {mapping, "listener.tcp.$name.proxy_protocol", "emqttd.listeners", [
%%{default, off},
{datatype, flag} {datatype, flag}
]}. ]}.
{mapping, "listener.tcp.$name.proxy_protocol_timeout", "emqttd.listeners", [ {mapping, "listener.tcp.$name.proxy_protocol_timeout", "emqttd.listeners", [
%%{default, "5s"},
{datatype, {duration, ms}} {datatype, {duration, ms}}
]}. ]}.
@ -883,12 +881,10 @@ end}.
]}. ]}.
{mapping, "listener.ssl.$name.proxy_protocol", "emqttd.listeners", [ {mapping, "listener.ssl.$name.proxy_protocol", "emqttd.listeners", [
%%{default, off},
{datatype, flag} {datatype, flag}
]}. ]}.
{mapping, "listener.ssl.$name.proxy_protocol_timeout", "emqttd.listeners", [ {mapping, "listener.ssl.$name.proxy_protocol_timeout", "emqttd.listeners", [
%%{default, "5s"},
{datatype, {duration, ms}} {datatype, {duration, ms}}
]}. ]}.
@ -1015,6 +1011,14 @@ end}.
{datatype, string} {datatype, string}
]}. ]}.
{mapping, "listener.ws.$name.proxy_protocol", "emqttd.listeners", [
{datatype, flag}
]}.
{mapping, "listener.ws.$name.proxy_protocol_timeout", "emqttd.listeners", [
{datatype, {duration, ms}}
]}.
{mapping, "listener.ws.$name.backlog", "emqttd.listeners", [ {mapping, "listener.ws.$name.backlog", "emqttd.listeners", [
{default, 1024}, {default, 1024},
{datatype, integer} {datatype, integer}
@ -1088,6 +1092,14 @@ end}.
{datatype, string} {datatype, string}
]}. ]}.
{mapping, "listener.wss.$name.proxy_protocol", "emqttd.listeners", [
{datatype, flag}
]}.
{mapping, "listener.wss.$name.proxy_protocol_timeout", "emqttd.listeners", [
{datatype, {duration, ms}}
]}.
{mapping, "listener.wss.$name.backlog", "emqttd.listeners", [ {mapping, "listener.wss.$name.backlog", "emqttd.listeners", [
{default, 1024}, {default, 1024},
{datatype, integer} {datatype, integer}