From 5006dbba6e769b4fa1309b446de893763b0b0cf9 Mon Sep 17 00:00:00 2001 From: HeeeJianBo Date: Fri, 1 Dec 2017 22:12:27 +0800 Subject: [PATCH 01/14] Add ws/wss proxy cofingurations for getting client original ip address --- etc/emq.conf | 8 ++++++++ priv/emq.schema | 32 ++++++++++++++++++++++++++++++-- src/emqttd_ws_client.erl | 33 +++++++++++++++++++++++++++++++-- src/emqttd_ws_client_sup.erl | 19 ++++++++++++++++++- 4 files changed, 87 insertions(+), 5 deletions(-) diff --git a/etc/emq.conf b/etc/emq.conf index 60e9c421f..779cb899b 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -496,6 +496,10 @@ listener.ws.external.max_clients = 64 listener.ws.external.access.1 = allow all +listener.ws.external.proxy_ipaddress_header = x-forwarded-for + +listener.ws.external.proxy_port_header = x-remote-port + ## TCP Options listener.ws.external.backlog = 1024 @@ -518,6 +522,10 @@ listener.wss.external.max_clients = 64 listener.wss.external.access.1 = allow all +listener.wss.external.proxy_ipaddress_header = x-forwarded-for + +listener.wss.external.proxy_port_header = x-remote-port + ## SSL Options listener.wss.external.handshake_timeout = 15s diff --git a/priv/emq.schema b/priv/emq.schema index d05cc79cf..7d756b434 100644 --- a/priv/emq.schema +++ b/priv/emq.schema @@ -987,6 +987,16 @@ end}. {datatype, string} ]}. +{mapping, "listener.ws.$name.proxy_port_header", "emqttd.listeners", [ + {datatype, string}, + hidden +]}. + +{mapping, "listener.ws.$name.proxy_ipaddress_header", "emqttd.listeners", [ + {datatype, string}, + hidden +]}. + {mapping, "listener.ws.$name.access.$id", "emqttd.listeners", [ {datatype, string} ]}. @@ -1050,6 +1060,16 @@ end}. {datatype, string} ]}. +{mapping, "listener.wss.$name.proxy_port_header", "emqttd.listeners", [ + {datatype, string}, + hidden +]}. + +{mapping, "listener.wss.$name.proxy_ipaddress_header", "emqttd.listeners", [ + {datatype, string}, + hidden +]}. + {mapping, "listener.wss.$name.access.$id", "emqttd.listeners", [ {datatype, string} ]}. @@ -1127,6 +1147,13 @@ end}. end end, + WsProxyOpts = fun(Prefix) when Prefix =:= "listener.ws.external" orelse + Prefix =:= "listener.wss.external" -> + Filter([{proxy_port_header, cuttlefish:conf_get(Prefix ++ ".proxy_port_header", Conf, undefined)}, + {proxy_ipaddress_header, cuttlefish:conf_get(Prefix ++ ".proxy_ipaddress_header", Conf, undefined)}]); + (_) -> [] + end, + MountPoint = fun(undefined) -> undefined; (S) -> list_to_binary(S) end, ConnOpts = fun(Prefix) -> @@ -1178,7 +1205,8 @@ end}. undefined -> []; ListenOn -> - [{Atom(Type), ListenOn, [{connopts, ConnOpts(Prefix)}, {sockopts, TcpOpts(Prefix)} | LisOpts(Prefix)]}] + [{Atom(Type), ListenOn, [{connopts, ConnOpts(Prefix)}, + {sockopts, TcpOpts(Prefix)} | LisOpts(Prefix) ++ WsProxyOpts(Prefix)]}] end end, @@ -1190,7 +1218,7 @@ end}. ListenOn -> [{Atom(Type), ListenOn, [{connopts, ConnOpts(Prefix)}, {sockopts, TcpOpts(Prefix)}, - {sslopts, SslOpts(Prefix)} | LisOpts(Prefix)]}] + {sslopts, SslOpts(Prefix)} | LisOpts(Prefix) ++ WsProxyOpts(Prefix)]}] end end, diff --git a/src/emqttd_ws_client.erl b/src/emqttd_ws_client.erl index b9d25ad3e..7a66dff3c 100644 --- a/src/emqttd_ws_client.erl +++ b/src/emqttd_ws_client.erl @@ -28,7 +28,7 @@ -include("emqttd_internal.hrl"). --import(proplists, [get_value/3]). +-import(proplists, [get_value/3, get_value/2]). %% API Exports -export([start_link/4]). @@ -93,7 +93,7 @@ init([Env, WsPid, Req, ReplyChannel]) -> process_flag(trap_exit, true), Conn = Req:get(connection), true = link(WsPid), - case Req:get(peername) of + case peername(Env, Req) of {ok, Peername} -> Headers = mochiweb_headers:to_list( mochiweb_request:get(headers, Req)), @@ -321,3 +321,32 @@ gc(State) -> Cb = fun() -> emit_stats(State) end, emqttd_gc:maybe_force_gc(#wsclient_state.force_gc_count, State, Cb). +peername(Env, Req) -> + Conn = Req:get(connection), + case Conn:peername() of + {ok, Peername} -> + % return original address, if existed + case last_forwarded(get_value(Conn:type(), Env, []), Req) of + undefined -> {ok, Peername}; + Forwarded -> {ok, Forwarded} + end; + {error, Reason} -> {error, Reason} + end. + +last_forwarded([], _) -> undefined; +last_forwarded(Conf, Req) -> + HostHeader = get_value(proxy_ipaddress_header, Conf), + PortHeader = get_value(proxy_port_header, Conf), + case tune_host(Req:get_header_value(HostHeader)) of + undefined -> undefined; + Host -> {Host, tune_port(Req:get_header_value(PortHeader))} + end. + +tune_host(undefined) -> undefined; +tune_host(Hosts) -> + {ok, Last} = inet:parse_address(string:strip(lists:last(string:tokens(Hosts, ",")))), + Last. + +tune_port(undefined) -> undefined; +tune_port(Port) -> list_to_integer(Port). + diff --git a/src/emqttd_ws_client_sup.erl b/src/emqttd_ws_client_sup.erl index 21f683eaa..ec46b8714 100644 --- a/src/emqttd_ws_client_sup.erl +++ b/src/emqttd_ws_client_sup.erl @@ -39,8 +39,25 @@ start_client(WsPid, Req, ReplyChannel) -> %%-------------------------------------------------------------------- init([]) -> - Env = lists:append(emqttd:env(client, []), emqttd:env(protocol, [])), + Env = lists:append(emqttd:env(client, []), + emqttd:env(protocol, []) ++ forwarded_header()), {ok, {{simple_one_for_one, 0, 1}, [{ws_client, {emqttd_ws_client, start_link, [Env]}, temporary, 5000, worker, [emqttd_ws_client]}]}}. +forwarded_header() -> + Env = [{Proto, Opts} || {Proto, _, Opts} <- emqttd:env(listeners, []), Proto == ws orelse Proto == wss], + lists:foldl(fun({Proto, Opts}, Acc) -> + Proto1 = case Proto of + ws -> tcp; + wss -> ssl + end, + case {proplists:get_value(proxy_ipaddress_header, Opts), + proplists:get_value(proxy_port_header, Opts)} of + {undefined, _} -> Acc; + {AddrHeader, undefined} -> [{Proto1, [{proxy_ipaddress_header, AddrHeader}]} | Acc]; + {AddrHeader, PortHeader} -> [{Proto1, [{proxy_ipaddress_header, AddrHeader}, + {proxy_port_header, PortHeader}]} | Acc] + end + end, [], Env). + From 4915195b1e1f1e5a06a0cdd7b450251aaa9d2f90 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Sat, 2 Dec 2017 17:59:16 +0800 Subject: [PATCH 02/14] Fix issue #1335 - Forward real client IP using a reverse proxy for websocket --- src/emqttd_ws_client.erl | 33 ++------------------------------- src/emqttd_ws_client_sup.erl | 19 +------------------ 2 files changed, 3 insertions(+), 49 deletions(-) diff --git a/src/emqttd_ws_client.erl b/src/emqttd_ws_client.erl index 7a66dff3c..b9d25ad3e 100644 --- a/src/emqttd_ws_client.erl +++ b/src/emqttd_ws_client.erl @@ -28,7 +28,7 @@ -include("emqttd_internal.hrl"). --import(proplists, [get_value/3, get_value/2]). +-import(proplists, [get_value/3]). %% API Exports -export([start_link/4]). @@ -93,7 +93,7 @@ init([Env, WsPid, Req, ReplyChannel]) -> process_flag(trap_exit, true), Conn = Req:get(connection), true = link(WsPid), - case peername(Env, Req) of + case Req:get(peername) of {ok, Peername} -> Headers = mochiweb_headers:to_list( mochiweb_request:get(headers, Req)), @@ -321,32 +321,3 @@ gc(State) -> Cb = fun() -> emit_stats(State) end, emqttd_gc:maybe_force_gc(#wsclient_state.force_gc_count, State, Cb). -peername(Env, Req) -> - Conn = Req:get(connection), - case Conn:peername() of - {ok, Peername} -> - % return original address, if existed - case last_forwarded(get_value(Conn:type(), Env, []), Req) of - undefined -> {ok, Peername}; - Forwarded -> {ok, Forwarded} - end; - {error, Reason} -> {error, Reason} - end. - -last_forwarded([], _) -> undefined; -last_forwarded(Conf, Req) -> - HostHeader = get_value(proxy_ipaddress_header, Conf), - PortHeader = get_value(proxy_port_header, Conf), - case tune_host(Req:get_header_value(HostHeader)) of - undefined -> undefined; - Host -> {Host, tune_port(Req:get_header_value(PortHeader))} - end. - -tune_host(undefined) -> undefined; -tune_host(Hosts) -> - {ok, Last} = inet:parse_address(string:strip(lists:last(string:tokens(Hosts, ",")))), - Last. - -tune_port(undefined) -> undefined; -tune_port(Port) -> list_to_integer(Port). - diff --git a/src/emqttd_ws_client_sup.erl b/src/emqttd_ws_client_sup.erl index ec46b8714..21f683eaa 100644 --- a/src/emqttd_ws_client_sup.erl +++ b/src/emqttd_ws_client_sup.erl @@ -39,25 +39,8 @@ start_client(WsPid, Req, ReplyChannel) -> %%-------------------------------------------------------------------- init([]) -> - Env = lists:append(emqttd:env(client, []), - emqttd:env(protocol, []) ++ forwarded_header()), + Env = lists:append(emqttd:env(client, []), emqttd:env(protocol, [])), {ok, {{simple_one_for_one, 0, 1}, [{ws_client, {emqttd_ws_client, start_link, [Env]}, temporary, 5000, worker, [emqttd_ws_client]}]}}. -forwarded_header() -> - Env = [{Proto, Opts} || {Proto, _, Opts} <- emqttd:env(listeners, []), Proto == ws orelse Proto == wss], - lists:foldl(fun({Proto, Opts}, Acc) -> - Proto1 = case Proto of - ws -> tcp; - wss -> ssl - end, - case {proplists:get_value(proxy_ipaddress_header, Opts), - proplists:get_value(proxy_port_header, Opts)} of - {undefined, _} -> Acc; - {AddrHeader, undefined} -> [{Proto1, [{proxy_ipaddress_header, AddrHeader}]} | Acc]; - {AddrHeader, PortHeader} -> [{Proto1, [{proxy_ipaddress_header, AddrHeader}, - {proxy_port_header, PortHeader}]} | Acc] - end - end, [], Env). - From bceb72853dff279efc14dd5bbc051b5a38264beb Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Sat, 2 Dec 2017 17:59:29 +0800 Subject: [PATCH 03/14] Fix issue #1335 - Forward real client IP using a reverse proxy for websocket --- etc/emq.conf | 8 ++++---- priv/emq.schema | 19 +++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/etc/emq.conf b/etc/emq.conf index 53f070f2d..e1f31e843 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -496,9 +496,9 @@ listener.ws.external.max_clients = 64 listener.ws.external.access.1 = allow all -listener.ws.external.proxy_ipaddress_header = x-forwarded-for +## listener.ws.external.proxy_address_header = x-forwarded-for -listener.ws.external.proxy_port_header = x-remote-port +## listener.ws.external.proxy_port_header = x-remote-port ## TCP Options listener.ws.external.backlog = 1024 @@ -522,9 +522,9 @@ listener.wss.external.max_clients = 64 listener.wss.external.access.1 = allow all -listener.wss.external.proxy_ipaddress_header = x-forwarded-for +## listener.wss.external.proxy_address_header = x-forwarded-for -listener.wss.external.proxy_port_header = x-remote-port +## listener.wss.external.proxy_port_header = x-remote-port ## SSL Options listener.wss.external.handshake_timeout = 15s diff --git a/priv/emq.schema b/priv/emq.schema index 7d756b434..7aba5304c 100644 --- a/priv/emq.schema +++ b/priv/emq.schema @@ -992,7 +992,7 @@ end}. hidden ]}. -{mapping, "listener.ws.$name.proxy_ipaddress_header", "emqttd.listeners", [ +{mapping, "listener.ws.$name.proxy_address_header", "emqttd.listeners", [ {datatype, string}, hidden ]}. @@ -1065,7 +1065,7 @@ end}. hidden ]}. -{mapping, "listener.wss.$name.proxy_ipaddress_header", "emqttd.listeners", [ +{mapping, "listener.wss.$name.proxy_address_header", "emqttd.listeners", [ {datatype, string}, hidden ]}. @@ -1147,13 +1147,6 @@ end}. end end, - WsProxyOpts = fun(Prefix) when Prefix =:= "listener.ws.external" orelse - Prefix =:= "listener.wss.external" -> - Filter([{proxy_port_header, cuttlefish:conf_get(Prefix ++ ".proxy_port_header", Conf, undefined)}, - {proxy_ipaddress_header, cuttlefish:conf_get(Prefix ++ ".proxy_ipaddress_header", Conf, undefined)}]); - (_) -> [] - end, - MountPoint = fun(undefined) -> undefined; (S) -> list_to_binary(S) end, ConnOpts = fun(Prefix) -> @@ -1162,7 +1155,9 @@ end}. {proxy_protocol, cuttlefish:conf_get(Prefix ++ ".proxy_protocol", Conf, undefined)}, {proxy_protocol_timeout, cuttlefish:conf_get(Prefix ++ ".proxy_protocol_timeout", Conf, undefined)}, {mountpoint, MountPoint(cuttlefish:conf_get(Prefix ++ ".mountpoint", Conf, undefined))}, - {peer_cert_as_username, cuttlefish:conf_get(Prefix ++ ".peer_cert_as_username", Conf, undefined)}]) + {peer_cert_as_username, cuttlefish:conf_get(Prefix ++ ".peer_cert_as_username", Conf, undefined)}, + {proxy_port_header, cuttlefish:conf_get(Prefix ++ ".proxy_port_header", Conf, undefined)}, + {proxy_address_header, cuttlefish:conf_get(Prefix ++ ".proxy_address_header", Conf, undefined)}]) end, LisOpts = fun(Prefix) -> @@ -1206,7 +1201,7 @@ end}. []; ListenOn -> [{Atom(Type), ListenOn, [{connopts, ConnOpts(Prefix)}, - {sockopts, TcpOpts(Prefix)} | LisOpts(Prefix) ++ WsProxyOpts(Prefix)]}] + {sockopts, TcpOpts(Prefix)} | LisOpts(Prefix)]}] end end, @@ -1218,7 +1213,7 @@ end}. ListenOn -> [{Atom(Type), ListenOn, [{connopts, ConnOpts(Prefix)}, {sockopts, TcpOpts(Prefix)}, - {sslopts, SslOpts(Prefix)} | LisOpts(Prefix) ++ WsProxyOpts(Prefix)]}] + {sslopts, SslOpts(Prefix)} | LisOpts(Prefix)]}] end end, From 0fe530a50263f9119ef38810b493145d9a4f3388 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Sat, 2 Dec 2017 18:00:56 +0800 Subject: [PATCH 04/14] Depends on the develop branch of mochiweb --- Makefile | 4 ++-- src/emqttd.app.src | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index de2827e23..6923c8b5d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PROJECT = emqttd PROJECT_DESCRIPTION = Erlang MQTT Broker -PROJECT_VERSION = 2.3.0 +PROJECT_VERSION = 2.3.1 DEPS = goldrush gproc lager esockd ekka mochiweb pbkdf2 lager_syslog bcrypt clique jsx @@ -10,7 +10,7 @@ dep_getopt = git https://github.com/jcomellas/getopt v0.8.2 dep_lager = git https://github.com/basho/lager master dep_esockd = git https://github.com/emqtt/esockd master dep_ekka = git https://github.com/emqtt/ekka master -dep_mochiweb = git https://github.com/emqtt/mochiweb master +dep_mochiweb = git https://github.com/emqtt/mochiweb develop dep_pbkdf2 = git https://github.com/emqtt/pbkdf2 2.0.1 dep_lager_syslog = git https://github.com/basho/lager_syslog dep_bcrypt = git https://github.com/smarkets/erlang-bcrypt master diff --git a/src/emqttd.app.src b/src/emqttd.app.src index 269601bb8..67af8854e 100644 --- a/src/emqttd.app.src +++ b/src/emqttd.app.src @@ -1,6 +1,6 @@ {application,emqttd, [{description,"Erlang MQTT Broker"}, - {vsn,"2.3.0"}, + {vsn,"2.3.1"}, {modules,[]}, {registered,[emqttd_sup]}, {applications,[kernel,stdlib,gproc,lager,esockd,mochiweb, From 56195670c61fa9035404e381296c342d9144e536 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Fri, 12 Jan 2018 10:45:36 +0800 Subject: [PATCH 05/14] Misc fix --- src/emqttd_session.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqttd_session.erl b/src/emqttd_session.erl index aa1a027a4..841a645a3 100644 --- a/src/emqttd_session.erl +++ b/src/emqttd_session.erl @@ -286,8 +286,8 @@ init([CleanSess, {ClientId, Username}, ClientPid]) -> {ok, QEnv} = emqttd:env(mqueue), MaxInflight = get_value(max_inflight, Env, 0), EnableStats = get_value(enable_stats, Env, false), - IgnoreLoopDeliver = get_value(ignore_loop_deliver, Env, false), ForceGcCount = emqttd_gc:conn_max_gc_count(), + IgnoreLoopDeliver = get_value(ignore_loop_deliver, Env, false), MQueue = ?MQueue:new(ClientId, QEnv, emqttd_alarm:alarm_fun()), State = #state{clean_sess = CleanSess, binding = binding(ClientPid), From a1cbdc51228ab9d7933932ccae8d847cfaf6ac4b Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Fri, 12 Jan 2018 10:46:35 +0800 Subject: [PATCH 06/14] Update emq.conf and emq.schema --- etc/emq.conf | 8 ++++---- priv/emq.schema | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/etc/emq.conf b/etc/emq.conf index b8c21dc40..ef05b70e2 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -1105,7 +1105,7 @@ listener.ws.external.send_timeout_close = on ## The TCP send buffer(os kernel) for external MQTT/Websocket connections. ## -## See 'listener.tcp..sndbuf' +## See: listener.tcp..sndbuf ## ## Value: Bytes ## listener.ws.external.sndbuf = 4KB @@ -1159,7 +1159,7 @@ listener.wss.external.max_clients = 64 ## Mountpoint of the MQTT/Websocket/SSL Listener. ## -## See 'listener.tcp..mountpoint' +## See: listener.tcp..mountpoint ## ## Value: String ## listener.wss.external.mountpoint = inbound/ @@ -1262,14 +1262,14 @@ listener.wss.external.certfile = {{ platform_etc_dir }}/certs/cert.pem ## TCP backlog for the Websocket/SSL connection. ## -## See 'listener.tcp..backlog' +## See listener.tcp..backlog ## ## Value: Number >= 0 listener.wss.external.backlog = 1024 ## The TCP send timeout for the Websocket/SSL connection. ## -## See 'listener.tcp..send_timeout' +## See: listener.tcp..send_timeout ## ## Value: Duration listener.wss.external.send_timeout = 15s diff --git a/priv/emq.schema b/priv/emq.schema index 11c45cecb..a70a90f90 100644 --- a/priv/emq.schema +++ b/priv/emq.schema @@ -400,7 +400,7 @@ end}. {translation, "lager.handlers", fun(Conf) -> - ErrorHandler = case cuttlefish:conf_get("log.error.file", Conf) of + ErrorHandler = case cuttlefish:conf_get("log.error.file", Conf, undefined) of undefined -> []; ErrorFilename -> [{lager_file_backend, [{file, ErrorFilename}, {level, error}, @@ -442,7 +442,6 @@ end}. cuttlefish:conf_get("log.syslog.facility", Conf), cuttlefish:conf_get("log.syslog.level", Conf)]}] end, - ConsoleHandlers ++ ErrorHandler ++ InfoHandler ++ SyslogHandler end }. From a3e97f798b65e095bb6582f82551a74fd5c0a38d Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Tue, 16 Jan 2018 08:57:46 +0800 Subject: [PATCH 07/14] Update Copyright to 2018 --- include/emqttd.hrl | 4 ++-- include/emqttd_cli.hrl | 2 +- include/emqttd_internal.hrl | 2 +- include/emqttd_protocol.hrl | 2 +- include/emqttd_trie.hrl | 2 +- src/emqttd.erl | 2 +- src/emqttd_access_control.erl | 2 +- src/emqttd_access_rule.erl | 2 +- src/emqttd_acl_internal.erl | 2 +- src/emqttd_acl_mod.erl | 2 +- src/emqttd_alarm.erl | 2 +- src/emqttd_app.erl | 2 +- src/emqttd_auth_mod.erl | 2 +- src/emqttd_base62.erl | 2 +- src/emqttd_boot.erl | 2 +- src/emqttd_bridge.erl | 2 +- src/emqttd_bridge_sup.erl | 2 +- src/emqttd_bridge_sup_sup.erl | 2 +- src/emqttd_broker.erl | 2 +- src/emqttd_cli.erl | 2 +- src/emqttd_cli_config.erl | 2 +- src/emqttd_client.erl | 2 +- src/emqttd_cm.erl | 2 +- src/emqttd_cm_sup.erl | 2 +- src/emqttd_config.erl | 2 +- src/emqttd_ctl.erl | 2 +- src/emqttd_gc.erl | 2 +- src/emqttd_gen_mod.erl | 2 +- src/emqttd_guid.erl | 2 +- src/emqttd_hooks.erl | 2 +- src/emqttd_http.erl | 2 +- src/emqttd_inflight.erl | 2 +- src/emqttd_keepalive.erl | 2 +- src/emqttd_message.erl | 2 +- src/emqttd_metrics.erl | 2 +- src/emqttd_mgmt.erl | 2 +- src/emqttd_misc.erl | 2 +- src/emqttd_mod_sup.erl | 2 +- src/emqttd_mqueue.erl | 2 +- src/emqttd_net.erl | 2 +- src/emqttd_packet.erl | 2 +- src/emqttd_parser.erl | 2 +- src/emqttd_plugins.erl | 2 +- src/emqttd_pmon.erl | 2 +- src/emqttd_pool_sup.erl | 2 +- src/emqttd_pooler.erl | 2 +- src/emqttd_protocol.erl | 2 +- src/emqttd_pubsub.erl | 2 +- src/emqttd_pubsub_sup.erl | 2 +- src/emqttd_rest_api.erl | 2 +- src/emqttd_router.erl | 2 +- src/emqttd_serializer.erl | 2 +- src/emqttd_server.erl | 2 +- src/emqttd_session.erl | 2 +- src/emqttd_session_sup.erl | 2 +- src/emqttd_sm.erl | 2 +- src/emqttd_sm_helper.erl | 2 +- src/emqttd_sm_sup.erl | 2 +- src/emqttd_stats.erl | 2 +- src/emqttd_sup.erl | 2 +- src/emqttd_sysmon.erl | 2 +- src/emqttd_sysmon_sup.erl | 2 +- src/emqttd_time.erl | 2 +- src/emqttd_topic.erl | 2 +- src/emqttd_trace.erl | 2 +- src/emqttd_trace_sup.erl | 2 +- src/emqttd_trie.erl | 2 +- src/emqttd_vm.erl | 2 +- src/emqttd_ws.erl | 2 +- src/emqttd_ws_client.erl | 2 +- src/emqttd_ws_client_sup.erl | 2 +- src/lager_emqtt_backend.erl | 2 +- test/emqttd_SUITE.erl | 2 +- test/emqttd_access_SUITE.erl | 2 +- test/emqttd_acl_test_mod.erl | 2 +- test/emqttd_auth_anonymous_test_mod.erl | 2 +- test/emqttd_auth_dashboard.erl | 2 +- test/emqttd_cli_SUITE.erl | 2 +- test/emqttd_config_SUITE.erl | 2 +- test/emqttd_inflight_SUITE.erl | 2 +- test/emqttd_lib_SUITE.erl | 2 +- test/emqttd_mod_SUITE.erl | 2 +- test/emqttd_mqueue_SUITE.erl | 2 +- test/emqttd_net_SUITE.erl | 2 +- test/emqttd_protocol_SUITE.erl | 2 +- test/emqttd_router_SUITE.erl | 2 +- test/emqttd_topic_SUITE.erl | 2 +- test/emqttd_trie_SUITE.erl | 2 +- test/emqttd_vm_SUITE.erl | 2 +- 89 files changed, 90 insertions(+), 90 deletions(-) diff --git a/include/emqttd.hrl b/include/emqttd.hrl index 508712512..975b50dd4 100644 --- a/include/emqttd.hrl +++ b/include/emqttd.hrl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ %% Banner %%-------------------------------------------------------------------- --define(COPYRIGHT, "Copyright (c) 2013-2017 EMQ Enterprise, Inc."). +-define(COPYRIGHT, "Copyright (c) 2013-2018 EMQ Enterprise, Inc."). -define(LICENSE_MESSAGE, "Licensed under the Apache License, Version 2.0"). diff --git a/include/emqttd_cli.hrl b/include/emqttd_cli.hrl index bda88d801..b99038481 100644 --- a/include/emqttd_cli.hrl +++ b/include/emqttd_cli.hrl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/include/emqttd_internal.hrl b/include/emqttd_internal.hrl index 343be68e4..c2ae503de 100644 --- a/include/emqttd_internal.hrl +++ b/include/emqttd_internal.hrl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/include/emqttd_protocol.hrl b/include/emqttd_protocol.hrl index a6d6c06e6..8a0ad4478 100644 --- a/include/emqttd_protocol.hrl +++ b/include/emqttd_protocol.hrl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/include/emqttd_trie.hrl b/include/emqttd_trie.hrl index eb4e1390d..ffd2acebc 100644 --- a/include/emqttd_trie.hrl +++ b/include/emqttd_trie.hrl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd.erl b/src/emqttd.erl index 65739952f..ecea2ca18 100644 --- a/src/emqttd.erl +++ b/src/emqttd.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_access_control.erl b/src/emqttd_access_control.erl index 601fd263f..0b74e2dc2 100644 --- a/src/emqttd_access_control.erl +++ b/src/emqttd_access_control.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_access_rule.erl b/src/emqttd_access_rule.erl index 73718fd3a..f0bad6816 100644 --- a/src/emqttd_access_rule.erl +++ b/src/emqttd_access_rule.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_acl_internal.erl b/src/emqttd_acl_internal.erl index 5305985c4..9304b9208 100644 --- a/src/emqttd_acl_internal.erl +++ b/src/emqttd_acl_internal.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_acl_mod.erl b/src/emqttd_acl_mod.erl index 4ed07b369..66e5f098b 100644 --- a/src/emqttd_acl_mod.erl +++ b/src/emqttd_acl_mod.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_alarm.erl b/src/emqttd_alarm.erl index 1467797c7..d271cb425 100644 --- a/src/emqttd_alarm.erl +++ b/src/emqttd_alarm.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_app.erl b/src/emqttd_app.erl index 1e99cb951..f14229715 100644 --- a/src/emqttd_app.erl +++ b/src/emqttd_app.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_auth_mod.erl b/src/emqttd_auth_mod.erl index d413446ff..a33631b65 100644 --- a/src/emqttd_auth_mod.erl +++ b/src/emqttd_auth_mod.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_base62.erl b/src/emqttd_base62.erl index 481488fb9..707981e32 100644 --- a/src/emqttd_base62.erl +++ b/src/emqttd_base62.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_boot.erl b/src/emqttd_boot.erl index d7a6d311e..694b5248a 100644 --- a/src/emqttd_boot.erl +++ b/src/emqttd_boot.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_bridge.erl b/src/emqttd_bridge.erl index 6c20290bd..8349eeec1 100644 --- a/src/emqttd_bridge.erl +++ b/src/emqttd_bridge.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_bridge_sup.erl b/src/emqttd_bridge_sup.erl index 75138332f..29b68c199 100644 --- a/src/emqttd_bridge_sup.erl +++ b/src/emqttd_bridge_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_bridge_sup_sup.erl b/src/emqttd_bridge_sup_sup.erl index 11679aba8..fe5c33428 100644 --- a/src/emqttd_bridge_sup_sup.erl +++ b/src/emqttd_bridge_sup_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_broker.erl b/src/emqttd_broker.erl index 9e78207ce..798c94a6a 100644 --- a/src/emqttd_broker.erl +++ b/src/emqttd_broker.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_cli.erl b/src/emqttd_cli.erl index 280c050ee..49e2500bb 100644 --- a/src/emqttd_cli.erl +++ b/src/emqttd_cli.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_cli_config.erl b/src/emqttd_cli_config.erl index 1ce0de49c..3c69c8cbc 100644 --- a/src/emqttd_cli_config.erl +++ b/src/emqttd_cli_config.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_client.erl b/src/emqttd_client.erl index 5ca450bf5..f479d2253 100644 --- a/src/emqttd_client.erl +++ b/src/emqttd_client.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_cm.erl b/src/emqttd_cm.erl index 4edc155df..bcaf353ed 100644 --- a/src/emqttd_cm.erl +++ b/src/emqttd_cm.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_cm_sup.erl b/src/emqttd_cm_sup.erl index fc01ea649..ccaea00fb 100644 --- a/src/emqttd_cm_sup.erl +++ b/src/emqttd_cm_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_config.erl b/src/emqttd_config.erl index deaaa77d1..04d94b260 100644 --- a/src/emqttd_config.erl +++ b/src/emqttd_config.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_ctl.erl b/src/emqttd_ctl.erl index 77769e3c8..a32a40172 100644 --- a/src/emqttd_ctl.erl +++ b/src/emqttd_ctl.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_gc.erl b/src/emqttd_gc.erl index 75545a77f..6484a195d 100644 --- a/src/emqttd_gc.erl +++ b/src/emqttd_gc.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_gen_mod.erl b/src/emqttd_gen_mod.erl index f8d690024..012b610da 100644 --- a/src/emqttd_gen_mod.erl +++ b/src/emqttd_gen_mod.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_guid.erl b/src/emqttd_guid.erl index 24199fa01..805a128b6 100644 --- a/src/emqttd_guid.erl +++ b/src/emqttd_guid.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_hooks.erl b/src/emqttd_hooks.erl index 693a67ff7..4fc84f9e8 100644 --- a/src/emqttd_hooks.erl +++ b/src/emqttd_hooks.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_http.erl b/src/emqttd_http.erl index a41025294..2b484038b 100644 --- a/src/emqttd_http.erl +++ b/src/emqttd_http.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_inflight.erl b/src/emqttd_inflight.erl index bb9af390b..be7517197 100644 --- a/src/emqttd_inflight.erl +++ b/src/emqttd_inflight.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_keepalive.erl b/src/emqttd_keepalive.erl index a0458038a..abc6dbc50 100644 --- a/src/emqttd_keepalive.erl +++ b/src/emqttd_keepalive.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_message.erl b/src/emqttd_message.erl index 4c3bea0d8..86918e47a 100644 --- a/src/emqttd_message.erl +++ b/src/emqttd_message.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_metrics.erl b/src/emqttd_metrics.erl index 17e6e96d4..37d897b67 100644 --- a/src/emqttd_metrics.erl +++ b/src/emqttd_metrics.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_mgmt.erl b/src/emqttd_mgmt.erl index 1a608968e..2052d68fc 100644 --- a/src/emqttd_mgmt.erl +++ b/src/emqttd_mgmt.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_misc.erl b/src/emqttd_misc.erl index e60d27d4f..2224879ca 100644 --- a/src/emqttd_misc.erl +++ b/src/emqttd_misc.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_mod_sup.erl b/src/emqttd_mod_sup.erl index 749b84a42..b8335e6b3 100644 --- a/src/emqttd_mod_sup.erl +++ b/src/emqttd_mod_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_mqueue.erl b/src/emqttd_mqueue.erl index 08e620a37..92fda72f1 100644 --- a/src/emqttd_mqueue.erl +++ b/src/emqttd_mqueue.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_net.erl b/src/emqttd_net.erl index 1f246a315..9da9cd287 100644 --- a/src/emqttd_net.erl +++ b/src/emqttd_net.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_packet.erl b/src/emqttd_packet.erl index 6349e58b1..f269f3dbe 100644 --- a/src/emqttd_packet.erl +++ b/src/emqttd_packet.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_parser.erl b/src/emqttd_parser.erl index 91df07d77..e9277a7c6 100644 --- a/src/emqttd_parser.erl +++ b/src/emqttd_parser.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_plugins.erl b/src/emqttd_plugins.erl index 81ff61a4d..4491e26df 100644 --- a/src/emqttd_plugins.erl +++ b/src/emqttd_plugins.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_pmon.erl b/src/emqttd_pmon.erl index ebe691ad4..00cb9a4c3 100644 --- a/src/emqttd_pmon.erl +++ b/src/emqttd_pmon.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_pool_sup.erl b/src/emqttd_pool_sup.erl index 87654bcff..d5f408cd2 100644 --- a/src/emqttd_pool_sup.erl +++ b/src/emqttd_pool_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_pooler.erl b/src/emqttd_pooler.erl index a74e01fec..fdde12a66 100644 --- a/src/emqttd_pooler.erl +++ b/src/emqttd_pooler.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_protocol.erl b/src/emqttd_protocol.erl index d021c9e1f..c72f7172c 100644 --- a/src/emqttd_protocol.erl +++ b/src/emqttd_protocol.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_pubsub.erl b/src/emqttd_pubsub.erl index 994ef6230..17f5455ff 100644 --- a/src/emqttd_pubsub.erl +++ b/src/emqttd_pubsub.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_pubsub_sup.erl b/src/emqttd_pubsub_sup.erl index 09d08d110..6e18aa031 100644 --- a/src/emqttd_pubsub_sup.erl +++ b/src/emqttd_pubsub_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_rest_api.erl b/src/emqttd_rest_api.erl index 0eb6adc11..ecc8410cd 100644 --- a/src/emqttd_rest_api.erl +++ b/src/emqttd_rest_api.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_router.erl b/src/emqttd_router.erl index fa1a0c70c..f667f8ea0 100644 --- a/src/emqttd_router.erl +++ b/src/emqttd_router.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_serializer.erl b/src/emqttd_serializer.erl index 079cfbb3c..1b81a45be 100644 --- a/src/emqttd_serializer.erl +++ b/src/emqttd_serializer.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_server.erl b/src/emqttd_server.erl index 4e05c00aa..38e7be311 100644 --- a/src/emqttd_server.erl +++ b/src/emqttd_server.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_session.erl b/src/emqttd_session.erl index 841a645a3..dfba46b3e 100644 --- a/src/emqttd_session.erl +++ b/src/emqttd_session.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_session_sup.erl b/src/emqttd_session_sup.erl index bd9b34f02..506383834 100644 --- a/src/emqttd_session_sup.erl +++ b/src/emqttd_session_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_sm.erl b/src/emqttd_sm.erl index a46d56fa6..e2e332041 100644 --- a/src/emqttd_sm.erl +++ b/src/emqttd_sm.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_sm_helper.erl b/src/emqttd_sm_helper.erl index 0721339fd..7a1875be1 100644 --- a/src/emqttd_sm_helper.erl +++ b/src/emqttd_sm_helper.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_sm_sup.erl b/src/emqttd_sm_sup.erl index 1c2e7f31a..f26716e0d 100644 --- a/src/emqttd_sm_sup.erl +++ b/src/emqttd_sm_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_stats.erl b/src/emqttd_stats.erl index 6d84395e2..4471a2814 100644 --- a/src/emqttd_stats.erl +++ b/src/emqttd_stats.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_sup.erl b/src/emqttd_sup.erl index e38d20d65..0d0bf496c 100644 --- a/src/emqttd_sup.erl +++ b/src/emqttd_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_sysmon.erl b/src/emqttd_sysmon.erl index c94c1df54..8a9489c9e 100644 --- a/src/emqttd_sysmon.erl +++ b/src/emqttd_sysmon.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_sysmon_sup.erl b/src/emqttd_sysmon_sup.erl index 99e7a628d..884112a00 100644 --- a/src/emqttd_sysmon_sup.erl +++ b/src/emqttd_sysmon_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_time.erl b/src/emqttd_time.erl index 7e5940438..77459195e 100644 --- a/src/emqttd_time.erl +++ b/src/emqttd_time.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_topic.erl b/src/emqttd_topic.erl index 91cd0ff08..6623c730f 100644 --- a/src/emqttd_topic.erl +++ b/src/emqttd_topic.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_trace.erl b/src/emqttd_trace.erl index 05734c2d2..b87359416 100644 --- a/src/emqttd_trace.erl +++ b/src/emqttd_trace.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_trace_sup.erl b/src/emqttd_trace_sup.erl index 728e6818e..35264e017 100644 --- a/src/emqttd_trace_sup.erl +++ b/src/emqttd_trace_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_trie.erl b/src/emqttd_trie.erl index 0bb6ec63e..2dae6974a 100644 --- a/src/emqttd_trie.erl +++ b/src/emqttd_trie.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_vm.erl b/src/emqttd_vm.erl index 16fae60ae..368463d35 100644 --- a/src/emqttd_vm.erl +++ b/src/emqttd_vm.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_ws.erl b/src/emqttd_ws.erl index 798c4d69b..e2375e4a6 100644 --- a/src/emqttd_ws.erl +++ b/src/emqttd_ws.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_ws_client.erl b/src/emqttd_ws_client.erl index 206f461bb..0462e3220 100644 --- a/src/emqttd_ws_client.erl +++ b/src/emqttd_ws_client.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/emqttd_ws_client_sup.erl b/src/emqttd_ws_client_sup.erl index 21f683eaa..48f3b1193 100644 --- a/src/emqttd_ws_client_sup.erl +++ b/src/emqttd_ws_client_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/lager_emqtt_backend.erl b/src/lager_emqtt_backend.erl index 69c1aece4..1ceb9785e 100644 --- a/src/lager_emqtt_backend.erl +++ b/src/lager_emqtt_backend.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_SUITE.erl b/test/emqttd_SUITE.erl index c5794e5b0..360905859 100644 --- a/test/emqttd_SUITE.erl +++ b/test/emqttd_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_access_SUITE.erl b/test/emqttd_access_SUITE.erl index 762ae6f40..c3529d935 100644 --- a/test/emqttd_access_SUITE.erl +++ b/test/emqttd_access_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_acl_test_mod.erl b/test/emqttd_acl_test_mod.erl index 08f1f9c94..9ed34c263 100644 --- a/test/emqttd_acl_test_mod.erl +++ b/test/emqttd_acl_test_mod.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_auth_anonymous_test_mod.erl b/test/emqttd_auth_anonymous_test_mod.erl index be6a14bf8..0f01be47f 100644 --- a/test/emqttd_auth_anonymous_test_mod.erl +++ b/test/emqttd_auth_anonymous_test_mod.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_auth_dashboard.erl b/test/emqttd_auth_dashboard.erl index 49f54c377..97ed17ea4 100644 --- a/test/emqttd_auth_dashboard.erl +++ b/test/emqttd_auth_dashboard.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_cli_SUITE.erl b/test/emqttd_cli_SUITE.erl index 273518b7f..024432d95 100644 --- a/test/emqttd_cli_SUITE.erl +++ b/test/emqttd_cli_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_config_SUITE.erl b/test/emqttd_config_SUITE.erl index 744f7402e..8b227b1b2 100644 --- a/test/emqttd_config_SUITE.erl +++ b/test/emqttd_config_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_inflight_SUITE.erl b/test/emqttd_inflight_SUITE.erl index de5391f1a..d3800fc72 100644 --- a/test/emqttd_inflight_SUITE.erl +++ b/test/emqttd_inflight_SUITE.erl @@ -1,5 +1,5 @@ %% -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% -module(emqttd_inflight_SUITE). diff --git a/test/emqttd_lib_SUITE.erl b/test/emqttd_lib_SUITE.erl index a808fbcc8..dac72e210 100644 --- a/test/emqttd_lib_SUITE.erl +++ b/test/emqttd_lib_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_mod_SUITE.erl b/test/emqttd_mod_SUITE.erl index 1fcf455d0..9935b7424 100644 --- a/test/emqttd_mod_SUITE.erl +++ b/test/emqttd_mod_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_mqueue_SUITE.erl b/test/emqttd_mqueue_SUITE.erl index 93ccc9833..f709f1478 100644 --- a/test/emqttd_mqueue_SUITE.erl +++ b/test/emqttd_mqueue_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_net_SUITE.erl b/test/emqttd_net_SUITE.erl index 78abb50c9..c6bb10c14 100644 --- a/test/emqttd_net_SUITE.erl +++ b/test/emqttd_net_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_protocol_SUITE.erl b/test/emqttd_protocol_SUITE.erl index 21428f0c7..3401860e6 100644 --- a/test/emqttd_protocol_SUITE.erl +++ b/test/emqttd_protocol_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_router_SUITE.erl b/test/emqttd_router_SUITE.erl index 415550ec3..b305d699d 100644 --- a/test/emqttd_router_SUITE.erl +++ b/test/emqttd_router_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_topic_SUITE.erl b/test/emqttd_topic_SUITE.erl index 9ec7736bd..984d0b299 100644 --- a/test/emqttd_topic_SUITE.erl +++ b/test/emqttd_topic_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_trie_SUITE.erl b/test/emqttd_trie_SUITE.erl index a81a132f5..629531934 100644 --- a/test/emqttd_trie_SUITE.erl +++ b/test/emqttd_trie_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/test/emqttd_vm_SUITE.erl b/test/emqttd_vm_SUITE.erl index ef0ac2946..49252c2ae 100644 --- a/test/emqttd_vm_SUITE.erl +++ b/test/emqttd_vm_SUITE.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) +%% Copyright (c) 2013-2018 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. From 701c632e074505eef76f2d10d7656ae27be992f0 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Tue, 23 Jan 2018 11:09:42 +0800 Subject: [PATCH 08/14] Fix issue #1461 - keep the retain flag for new subscription --- src/emqttd_protocol.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/emqttd_protocol.erl b/src/emqttd_protocol.erl index d021c9e1f..eaa81e092 100644 --- a/src/emqttd_protocol.erl +++ b/src/emqttd_protocol.erl @@ -563,8 +563,11 @@ sp(false) -> 0. %% The retained flag should be propagated for bridge. %%-------------------------------------------------------------------- -clean_retain(false, Msg = #mqtt_message{retain = true}) -> - Msg#mqtt_message{retain = false}; +clean_retain(false, Msg = #mqtt_message{retain = true, headers = Headers}) -> + case lists:member(retained, Headers) of + true -> Msg; + false -> Msg#mqtt_message{retain = false} + end; clean_retain(_IsBridge, Msg) -> Msg. From b9dcccd7f76d7538bcb71ce96063a1dbe96701d1 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Tue, 23 Jan 2018 15:20:35 +0800 Subject: [PATCH 09/14] Version 2.3.4 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a7bb63edc..804123d2d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PROJECT = emqttd PROJECT_DESCRIPTION = Erlang MQTT Broker -PROJECT_VERSION = 2.3.3 +PROJECT_VERSION = 2.3.4 DEPS = goldrush gproc lager esockd ekka mochiweb pbkdf2 lager_syslog bcrypt clique jsx From 87ae76b6b4464ee591e453c8d2b685cec1771adc Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Tue, 23 Jan 2018 15:22:05 +0800 Subject: [PATCH 10/14] Fix issue #1460 - Add node.proto_dist option to support inet6_dist --- etc/emq.conf | 9 +++++++++ priv/emq.schema | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/etc/emq.conf b/etc/emq.conf index ef05b70e2..a5cc7584a 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -231,6 +231,15 @@ node.fullsweep_after = 1000 ## Value: Log file node.crash_dump = {{ platform_log_dir }}/crash.dump +## Specify the erlang distributed protocol. +## +## Value: Enum +## - inet_tcp: the default; handles TCP streams with IPv4 addressing. +## - inet6_tcp: handles TCP with IPv6 addressing. +## +## vm.args: -proto_dist inet_tcp +## node.proto_dist = inet_tcp + ## Sets the net_kernel tick time. TickTime is specified in seconds. ## Notice that all communicating nodes are to have the same TickTime ## value specified. diff --git a/priv/emq.schema b/priv/emq.schema index a70a90f90..954f1bdea 100644 --- a/priv/emq.schema +++ b/priv/emq.schema @@ -168,6 +168,11 @@ end}. {default, "emq@127.0.0.1"} ]}. +%% @doc The erlang distributed protocol +{mapping, "node.proto_dist", "vm_args.-proto_dist", [ + %%{default, "inet_tcp"} +]}. + %% @doc Secret cookie for distributed erlang node {mapping, "node.cookie", "vm_args.-setcookie", [ {default, "emqsecretcookie"} From 94e1229abb162f51c2ed30188ca0c911a8be774c Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Tue, 23 Jan 2018 16:32:53 +0800 Subject: [PATCH 11/14] Uncomment the 'node.proto_dist' to support docker env --- etc/emq.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/emq.conf b/etc/emq.conf index a5cc7584a..681dc9b54 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -238,7 +238,7 @@ node.crash_dump = {{ platform_log_dir }}/crash.dump ## - inet6_tcp: handles TCP with IPv6 addressing. ## ## vm.args: -proto_dist inet_tcp -## node.proto_dist = inet_tcp +node.proto_dist = inet_tcp ## Sets the net_kernel tick time. TickTime is specified in seconds. ## Notice that all communicating nodes are to have the same TickTime From f70bf23440a7d3dbdaa1489d66a1f3312342b9fc Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Wed, 24 Jan 2018 09:48:06 +0800 Subject: [PATCH 12/14] Add 'listener...reuseaddr' option --- etc/emq.conf | 71 +++++++++++++++++++++++++++++++++---------------- priv/emq.schema | 28 ++++++++++++++++++- 2 files changed, 75 insertions(+), 24 deletions(-) diff --git a/etc/emq.conf b/etc/emq.conf index 681dc9b54..1042d880b 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -704,6 +704,11 @@ listener.tcp.external.tune_buffer = on ## Value: true | false listener.tcp.external.nodelay = true +## The SO_REUSEADDR flag for TCP listener. +## +## Value: true | false +listener.tcp.external.reuseaddr = true + ##-------------------------------------------------------------------- ## Internal TCP Listener for MQTT Protocol @@ -800,6 +805,11 @@ listener.tcp.internal.tune_buffer = on ## Value: true | false listener.tcp.internal.nodelay = false +## The SO_REUSEADDR flag for MQTT/TCP Listener. +## +## Value: true | false +listener.tcp.internal.reuseaddr = true + ##-------------------------------------------------------------------- ## MQTT/SSL - External SSL Listener for MQTT Protocol @@ -1029,10 +1039,15 @@ listener.ssl.external.certfile = {{ platform_etc_dir }}/certs/cert.pem ## Value: true | false ## listener.ssl.external.nodelay = true +## The SO_REUSEADDR flag for MQTT/SSL Listener. +## +## Value: true | false +listener.ssl.external.reuseaddr = true + ##-------------------------------------------------------------------- ## External WebSocket Listener for MQTT Protocol -## listener.ws. is the IP address and port that the MQTT/Websocket +## listener.ws. is the IP address and port that the MQTT/WebSocket ## listener will bind. ## ## Value: IP:Port | Port @@ -1040,29 +1055,29 @@ listener.ssl.external.certfile = {{ platform_etc_dir }}/certs/cert.pem ## Examples: 8083, 127.0.0.1:8083, ::1:8083 listener.ws.external = 8083 -## The acceptor pool for external MQTT/Websocket listener. +## The acceptor pool for external MQTT/WebSocket listener. ## ## Value: Number listener.ws.external.acceptors = 4 -## Maximum number of concurrent MQTT/Websocket connections. +## Maximum number of concurrent MQTT/WebSocket connections. ## ## Value: Number listener.ws.external.max_clients = 102400 -## TODO: Zone of the external MQTT/Websocket listener belonged to. +## TODO: Zone of the external MQTT/WebSocket listener belonged to. ## ## Value: String ## listener.ws.external.zone = external -## Mountpoint of the MQTT/Websocket Listener. +## Mountpoint of the MQTT/WebSocket Listener. ## ## See: listener.tcp..mountpoint ## ## Value: String ## listener.ws.external.mountpoint = external/ -## The access control for the MQTT/Websocket listener. +## The access control for the MQTT/WebSocket listener. ## ## See: listener.tcp..access ## @@ -1084,35 +1099,35 @@ listener.ws.external.access.1 = allow all ## Value: Duration ## listener.ws.external.proxy_protocol_timeout = 3s -## The TCP backlog of external MQTT/Websocket Listener. +## The TCP backlog of external MQTT/WebSocket Listener. ## ## See: listener.tcp..backlog ## ## Value: Number >= 0 listener.ws.external.backlog = 1024 -## The TCP send timeout for external MQTT/Websocket connections. +## The TCP send timeout for external MQTT/WebSocket connections. ## ## See: listener.tcp..send_timeout ## ## Value: Duration listener.ws.external.send_timeout = 15s -## Close the MQTT/Websocket connection if send timeout. +## Close the MQTT/WebSocket connection if send timeout. ## ## See: listener.tcp..send_timeout_close ## ## Value: on | off listener.ws.external.send_timeout_close = on -## The TCP receive buffer(os kernel) for external MQTT/Websocket connections. +## The TCP receive buffer(os kernel) for external MQTT/WebSocket connections. ## ## See: listener.tcp..recbuf ## ## Value: Bytes ## listener.ws.external.recbuf = 4KB -## The TCP send buffer(os kernel) for external MQTT/Websocket connections. +## The TCP send buffer(os kernel) for external MQTT/WebSocket connections. ## ## See: listener.tcp..sndbuf ## @@ -1133,17 +1148,22 @@ listener.ws.external.send_timeout_close = on ## Value: on | off listener.ws.external.tune_buffer = on -## The TCP_NODELAY flag for external MQTT/Websocket connections. +## The TCP_NODELAY flag for external MQTT/WebSocket connections. ## ## See: listener.tcp..nodelay ## ## Value: true | false listener.ws.external.nodelay = true +## The SO_REUSEADDR flag for MQTT/WebSocket Listener. +## +## Value: true | false +listener.ws.external.reuseaddr = true + ##-------------------------------------------------------------------- ## External WebSocket/SSL listener for MQTT Protocol -## listener.wss. is the IP address and port that the MQTT/Websocket/SSL +## listener.wss. is the IP address and port that the MQTT/WebSocket/SSL ## listener will bind. ## ## Value: IP:Port | Port @@ -1151,7 +1171,7 @@ listener.ws.external.nodelay = true ## Examples: 8084, 127.0.0.1:8084, ::1:8084 listener.wss.external = 8084 -## The acceptor pool for external MQTT/Websocket/SSL listener. +## The acceptor pool for external MQTT/WebSocket/SSL listener. ## ## Value: Number listener.wss.external.acceptors = 4 @@ -1161,19 +1181,19 @@ listener.wss.external.acceptors = 4 ## Value: Number listener.wss.external.max_clients = 64 -## TODO: Zone of the external MQTT/Websocket/SSL listener belonged to. +## TODO: Zone of the external MQTT/WebSocket/SSL listener belonged to. ## ## Value: String ## listener.wss.external.zone = external -## Mountpoint of the MQTT/Websocket/SSL Listener. +## Mountpoint of the MQTT/WebSocket/SSL Listener. ## ## See: listener.tcp..mountpoint ## ## Value: String ## listener.wss.external.mountpoint = inbound/ -## The access control rules for the MQTT/Websocket/SSL listener. +## The access control rules for the MQTT/WebSocket/SSL listener. ## ## See: listener.tcp..access. ## @@ -1269,35 +1289,35 @@ listener.wss.external.certfile = {{ platform_etc_dir }}/certs/cert.pem ## Value: cn | dn ## listener.wss.external.peer_cert_as_username = cn -## TCP backlog for the Websocket/SSL connection. +## TCP backlog for the WebSocket/SSL connection. ## ## See listener.tcp..backlog ## ## Value: Number >= 0 listener.wss.external.backlog = 1024 -## The TCP send timeout for the Websocket/SSL connection. +## The TCP send timeout for the WebSocket/SSL connection. ## ## See: listener.tcp..send_timeout ## ## Value: Duration listener.wss.external.send_timeout = 15s -## Close the Websocket/SSL connection if send timeout. +## Close the WebSocket/SSL connection if send timeout. ## ## See: listener.tcp..send_timeout_close ## ## Value: on | off listener.wss.external.send_timeout_close = on -## The TCP receive buffer(os kernel) for the Websocket/SSL connections. +## The TCP receive buffer(os kernel) for the WebSocket/SSL connections. ## ## See: listener.tcp..recbuf ## ## Value: Bytes ## listener.wss.external.recbuf = 4KB -## The TCP send buffer(os kernel) for the Websocket/SSL connections. +## The TCP send buffer(os kernel) for the WebSocket/SSL connections. ## ## See: listener.tcp..sndbuf ## @@ -1311,13 +1331,18 @@ listener.wss.external.send_timeout_close = on ## Value: Bytes ## listener.wss.external.buffer = 4KB -## The TCP_NODELAY flag for Websocket/SSL connections. +## The TCP_NODELAY flag for WebSocket/SSL connections. ## ## See: listener.tcp..nodelay ## ## Value: true | false ## listener.wss.external.nodelay = true +## The SO_REUSEADDR flag for WebSocket/SSL listener. +## +## Value: true | false +listener.wss.external.reuseaddr = true + ##-------------------------------------------------------------------- ## HTTP Management API Listener diff --git a/priv/emq.schema b/priv/emq.schema index 954f1bdea..b07055ead 100644 --- a/priv/emq.schema +++ b/priv/emq.schema @@ -850,6 +850,11 @@ end}. hidden ]}. +{mapping, "listener.tcp.$name.reuseaddr", "emqttd.listeners", [ + {datatype, {enum, [true, false]}}, + hidden +]}. + %%-------------------------------------------------------------------- %% SSL Listeners @@ -932,6 +937,11 @@ end}. hidden ]}. +{mapping, "listener.ssl.$name.reuseaddr", "emqttd.listeners", [ + {datatype, {enum, [true, false]}}, + hidden +]}. + {mapping, "listener.ssl.$name.tls_versions", "emqttd.listeners", [ {datatype, string} ]}. @@ -1067,6 +1077,11 @@ end}. hidden ]}. +{mapping, "listener.ws.$name.reuseaddr", "emqttd.listeners", [ + {datatype, {enum, [true, false]}}, + hidden +]}. + %%-------------------------------------------------------------------- %% MQTT/WebSocket/SSL Listeners @@ -1148,6 +1163,11 @@ end}. hidden ]}. +{mapping, "listener.wss.$name.reuseaddr", "emqttd.listeners", [ + {datatype, {enum, [true, false]}}, + hidden +]}. + {mapping, "listener.wss.$name.tls_versions", "emqttd.listeners", [ {datatype, string} ]}. @@ -1239,7 +1259,8 @@ end}. {recbuf, cuttlefish:conf_get(Prefix ++ ".recbuf", Conf, undefined)}, {sndbuf, cuttlefish:conf_get(Prefix ++ ".sndbuf", Conf, undefined)}, {buffer, cuttlefish:conf_get(Prefix ++ ".buffer", Conf, undefined)}, - {nodelay, cuttlefish:conf_get(Prefix ++ ".nodelay", Conf, true)}]) + {nodelay, cuttlefish:conf_get(Prefix ++ ".nodelay", Conf, true)}, + {reuseaddr, cuttlefish:conf_get(Prefix ++ ".reuseaddr", Conf, true)}]) end, SplitFun = fun(undefined) -> undefined; (S) -> string:tokens(S, ",") end, @@ -1378,6 +1399,11 @@ end}. hidden ]}. +{mapping, "listener.api.$name.reuseaddr", "emqttd.listeners", [ + {datatype, {enum, [true, false]}}, + hidden +]}. + {mapping, "listener.api.$name.handshake_timeout", "emqttd.listeners", [ {datatype, {duration, ms}} ]}. From 3146cdda924e61e45c0f2346dfcbb98effed09e1 Mon Sep 17 00:00:00 2001 From: HeeeJianBo Date: Sun, 28 Jan 2018 14:25:41 +0800 Subject: [PATCH 13/14] Fix #1473 for supporting special chars in URL path --- src/emqttd_http.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/emqttd_http.erl b/src/emqttd_http.erl index 2b484038b..c229f4de2 100644 --- a/src/emqttd_http.erl +++ b/src/emqttd_http.erl @@ -45,7 +45,7 @@ http_api() -> %% Handle HTTP Request %%-------------------------------------------------------------------- handle_request(Req, State) -> - Path = Req:get(path), + {Path, _, _} = mochiweb_util:urlsplit_path(Req:get(raw_path)), case Path of "/status" -> handle_request("/status", Req, Req:get(method)); @@ -58,7 +58,7 @@ handle_request(Req, State) -> end. inner_handle_request(Req, State) -> - Path = Req:get(path), + {Path, _, _} = mochiweb_util:urlsplit_path(Req:get(raw_path)), case Path of "/api/v2/auth" -> handle_request(Path, Req, State); _ -> if_authorized(Req, fun() -> handle_request(Path, Req, State) end) @@ -95,7 +95,8 @@ dispatcher(APIs) -> case {check_params(Params, FilterArgs), check_params_type(Params, FilterArgs)} of {true, true} -> - {match, [MatchList]} = re:run(Url, Regexp, [global, {capture, all_but_first, list}]), + {match, [MatchList0]} = re:run(Url, Regexp, [global, {capture, all_but_first, list}]), + MatchList = lists:map(fun mochiweb_util:unquote/1, MatchList0), Args = lists:append([[Method, Params], MatchList]), lager:debug("Mod:~p, Fun:~p, Args:~p", [emqttd_rest_api, Function, Args]), case catch apply(emqttd_rest_api, Function, Args) of From bd0409879b6105e76b16bbd6776a64fc1a8d1273 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Sun, 28 Jan 2018 15:26:56 +0800 Subject: [PATCH 14/14] Add 'proxy_port_address', 'proxy_port_header' options for WebSocket listener --- etc/emq.conf | 22 ++++++++++++++++++---- priv/emq.schema | 8 ++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/etc/emq.conf b/etc/emq.conf index 70fcd762c..a5ca15d9c 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -1084,9 +1084,17 @@ listener.ws.external.max_clients = 102400 ## Value: ACL Rule listener.ws.external.access.1 = allow all -## listener.ws.external.proxy_address_header = x-forwarded-for +## Use X-Forwarded-For header for real source IP if the EMQ cluster is +## deployed behind NGINX or HAProxy. +## +## Value: String +## listener.ws.external.proxy_address_header = X-Forwarded-For -## listener.ws.external.proxy_port_header = x-remote-port +## Use X-Forwarded-Port header for real source port if the EMQ cluster is +## deployed behind NGINX or HAProxy. +## +## Value: String +## listener.ws.external.proxy_port_header = X-Forwarded-Port ## Enable the Proxy Protocol V1/2 if the EMQ cluster is deployed behind ## HAProxy or Nginx. @@ -1204,9 +1212,15 @@ listener.wss.external.max_clients = 64 ## Value: ACL Rule listener.wss.external.access.1 = allow all -## listener.wss.external.proxy_address_header = x-forwarded-for +## See: listener.ws.external.proxy_address_header +## +## Value: String +## listener.wss.external.proxy_address_header = X-Forwarded-For -## listener.wss.external.proxy_port_header = x-remote-port +## See: listener.ws.external.proxy_port_header +## +## Value: String +## listener.wss.external.proxy_port_header = X-Forwarded-Port ## Enable the Proxy Protocol V1/2 support. ## diff --git a/priv/emq.schema b/priv/emq.schema index 9f8dbcf74..8c1e64a9f 100644 --- a/priv/emq.schema +++ b/priv/emq.schema @@ -1029,12 +1029,12 @@ end}. {datatype, string} ]}. -{mapping, "listener.ws.$name.proxy_port_header", "emqttd.listeners", [ +{mapping, "listener.ws.$name.proxy_address_header", "emqttd.listeners", [ {datatype, string}, hidden ]}. -{mapping, "listener.ws.$name.proxy_address_header", "emqttd.listeners", [ +{mapping, "listener.ws.$name.proxy_port_header", "emqttd.listeners", [ {datatype, string}, hidden ]}. @@ -1125,12 +1125,12 @@ end}. {datatype, string} ]}. -{mapping, "listener.wss.$name.proxy_port_header", "emqttd.listeners", [ +{mapping, "listener.wss.$name.proxy_address_header", "emqttd.listeners", [ {datatype, string}, hidden ]}. -{mapping, "listener.wss.$name.proxy_address_header", "emqttd.listeners", [ +{mapping, "listener.wss.$name.proxy_port_header", "emqttd.listeners", [ {datatype, string}, hidden ]}.