Prechádzať zdrojové kódy

Merge pull request #11642 from qzhuyan/dev/william/quicer-0.0.200

quicer 0.0.200
William Yang 2 rokov pred
rodič
commit
3a5227198e

+ 2 - 2
apps/emqx/rebar.config

@@ -45,7 +45,7 @@
             {meck, "0.9.2"},
             {proper, "1.4.0"},
             {bbmustache, "1.10.0"},
-            {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}}
+            {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}}
         ]},
         {extra_src_dirs, [{"test", [recursive]},
                           {"integration_test", [recursive]}]}
@@ -55,7 +55,7 @@
             {meck, "0.9.2"},
             {proper, "1.4.0"},
             {bbmustache, "1.10.0"},
-            {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}}
+            {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}}
         ]},
         {extra_src_dirs, [{"test", [recursive]}]}
     ]}

+ 1 - 1
apps/emqx/rebar.config.script

@@ -24,7 +24,7 @@ IsQuicSupp = fun() ->
 end,
 
 Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}},
-Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.114"}}}.
+Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.200"}}}.
 
 Dialyzer = fun(Config) ->
     {dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config),

+ 2 - 2
apps/emqx/src/emqx_listeners.erl

@@ -335,7 +335,7 @@ do_stop_listener(Type, Id, #{bind := ListenOn}) when Type == ws; Type == wss ->
             Error
     end;
 do_stop_listener(quic, Id, _Conf) ->
-    quicer:stop_listener(Id).
+    quicer:terminate_listener(Id).
 
 wait_listener_stopped(ListenOn) ->
     % NOTE
@@ -461,7 +461,7 @@ do_start_listener(quic, ListenerName, #{bind := Bind} = Opts) ->
 
             Id = listener_id(quic, ListenerName),
             add_limiter_bucket(Id, Limiter),
-            quicer:start_listener(
+            quicer:spawn_listener(
                 Id,
                 ListenOn,
                 {maps:from_list(ListenOpts), ConnectionOpts, StreamOpts}

+ 3 - 4
apps/emqx/src/emqx_quic_connection.erl

@@ -229,10 +229,9 @@ streams_available(_C, {BidirCnt, UnidirCnt}, S) ->
 
 %% @doc callback for handling request when remote wants for more streams
 %%      should cope with rate limiting
-%% @TODO this is not going to get triggered in current version
-%% ref: https://github.com/microsoft/msquic/issues/3120
--spec peer_needs_streams(quicer:connection_handle(), undefined, cb_state()) -> cb_ret().
-peer_needs_streams(_C, undefined, S) ->
+-spec peer_needs_streams(quicer:connection_handle(), atom(), cb_state()) ->
+    cb_ret().
+peer_needs_streams(_C, _StreamType, S) ->
     ?SLOG(info, #{
         msg => "ignore_peer_needs_more_streams", info => maps:with([conn_pid, ctrl_pid], S)
     }),

+ 3 - 0
apps/emqx/test/emqx_broker_SUITE.erl

@@ -86,6 +86,7 @@ init_per_group(quic, Config) ->
                 "\n enable = true"
                 "\n max_connections = 1024000"
                 "\n idle_timeout = 15s"
+                "\n ssl_options.verify = verify_peer"
                 "\n }"}
         ],
         #{work_dir => emqx_cth_suite:work_dir(Config)}
@@ -93,6 +94,8 @@ init_per_group(quic, Config) ->
     [
         {conn_fun, quic_connect},
         {port, emqx_config:get([listeners, quic, test, bind])},
+        {ssl_opts, emqx_common_test_helpers:client_ssl_twoway()},
+        {ssl, true},
         {group_apps, Apps}
         | Config
     ];

+ 1 - 1
apps/emqx_retainer/rebar.config

@@ -30,7 +30,7 @@
 {profiles, [
     {test, [
         {deps, [
-            {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}}
+            {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}}
         ]}
     ]}
 ]}.

+ 1 - 0
changes/ce/feat-11642.en.md

@@ -0,0 +1 @@
+Updated to quicer version 0.0.200 in preparation for enabling openssl3 support for QUIC transport.

+ 1 - 0
changes/ce/feat-11642.zh.md

@@ -0,0 +1 @@
+升级至 quicer 版本 0.0.200,为启用 OpenSSL3 以支持 QUIC 传输做准备。

+ 2 - 2
mix.exs

@@ -64,7 +64,7 @@ defmodule EMQXUmbrella.MixProject do
       {:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true},
       # maybe forbid to fetch quicer
       {:emqtt,
-       github: "emqx/emqtt", tag: "1.8.7", override: true, system_env: maybe_no_quic_env()},
+       github: "emqx/emqtt", tag: "1.9.0", override: true, system_env: maybe_no_quic_env()},
       {:rulesql, github: "emqx/rulesql", tag: "0.1.7"},
       {:observer_cli, "1.7.1"},
       {:system_monitor, github: "ieQu1/system_monitor", tag: "3.0.3"},
@@ -835,7 +835,7 @@ defmodule EMQXUmbrella.MixProject do
   defp quicer_dep() do
     if enable_quicer?(),
       # in conflict with emqx and emqtt
-      do: [{:quicer, github: "emqx/quic", tag: "0.0.114", override: true}],
+      do: [{:quicer, github: "emqx/quic", tag: "0.0.200", override: true}],
       else: []
   end
 

+ 1 - 1
rebar.config

@@ -69,7 +69,7 @@
     , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.4"}}}
     , {replayq, {git, "https://github.com/emqx/replayq.git", {tag, "0.3.7"}}}
     , {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}
-    , {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}}
+    , {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}}
     , {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.7"}}}
     , {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x
     , {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}}

+ 1 - 1
rebar.config.erl

@@ -39,7 +39,7 @@ bcrypt() ->
     {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.1"}}}.
 
 quicer() ->
-    {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.114"}}}.
+    {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.200"}}}.
 
 jq() ->
     {jq, {git, "https://github.com/emqx/jq", {tag, "v0.3.10"}}}.