浏览代码

ssh流量分析

陈国伟 3 年之前
父节点
当前提交
ce6e4ed600
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      FastGithub.HttpServer/KestrelServerOptionsExtensions.cs

+ 5 - 1
FastGithub.HttpServer/KestrelServerOptionsExtensions.cs

@@ -56,7 +56,11 @@ namespace FastGithub
         public static void ListenSshReverseProxy(this KestrelServerOptions kestrel)
         {
             var sshPort = ReverseProxyPort.Ssh;
-            kestrel.Listen(IPAddress.Loopback, sshPort, listen => listen.UseConnectionHandler<SshReverseProxyHandler>());
+            kestrel.Listen(IPAddress.Loopback, sshPort, listen =>
+            {
+                listen.UseFlowAnalyze();
+                listen.UseConnectionHandler<SshReverseProxyHandler>();
+            });
 
             if (OperatingSystem.IsWindows())
             {