diff --git a/.gitignore b/.gitignore index cd61c10..3dce55b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ publish /FastTunnel.Core/*.user /build /FastTunnel.Server/.config +/FastTunnel.Server/logs diff --git a/FastTunnel.Client/appsettings.json b/FastTunnel.Client/appsettings.json index 75f1ea0..b81420f 100644 --- a/FastTunnel.Client/appsettings.json +++ b/FastTunnel.Client/appsettings.json @@ -1,17 +1,16 @@ { - //"Logging": { - // "LogLevel": { - // // Trace Debug Information Warning Error - // "Default": "Information", - // "Microsoft": "Warning", - // "Microsoft.Hosting.Lifetime": "Information" - // } - //}, + "Logging": { + "LogLevel": { + // Trace Debug Information Warning Error + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, "EnableFileLog": false, "ClientSettings": { "Server": { // 服务端ip/域名 - //"ServerAddr": "my.com", "ServerAddr": "127.0.0.1", // 服务端监听的通信端口 "ServerPort": 1270 @@ -27,7 +26,6 @@ { // 本地站点所在内网的ip "LocalIp": "127.0.0.1", - // 站点监听的端口号 "LocalPort": 8090, @@ -36,11 +34,6 @@ // 附加域名,需要解析域名A记录至服务的ip地址) // "WWW": [ "www.abc.com", "test111.test.cc" ] - }, - { - "LocalIp": "127.0.0.1", - "LocalPort": 8091, - "SubDomain": "test1" } ], @@ -53,16 +46,6 @@ "Forwards": [ { "LocalIp": "127.0.0.1", - "LocalPort": 8090, - "RemotePort": 7090 - }, - { - "LocalIp": "127.0.0.1", - "LocalPort": 8091, - "RemotePort": 7091 - }, - { - "LocalIp": "10.70.250.17", "LocalPort": 3389, // windows远程桌面端口为3389 "RemotePort": 1274 // 访问 服务端ip:1274 即可实现远程window桌面 } diff --git a/FastTunnel.Core/Client/FastTunnelClient.cs b/FastTunnel.Core/Client/FastTunnelClient.cs index bc7b300..81a51fc 100644 --- a/FastTunnel.Core/Client/FastTunnelClient.cs +++ b/FastTunnel.Core/Client/FastTunnelClient.cs @@ -75,7 +75,7 @@ namespace FastTunnel.Core.Client { try { - var logMsg = GetLoginMsg(); + var logMsg = GetLoginMsg(cancellationToken); // 连接到的目标IP socket = new ClientWebSocket(); @@ -98,7 +98,7 @@ namespace FastTunnel.Core.Client } } - public virtual string GetLoginMsg() + public virtual string GetLoginMsg(CancellationToken cancellationToken) { Server = ClientConfig.Server; return new LogInMassage diff --git a/FastTunnel.Server/config/appsettings.json b/FastTunnel.Server/config/appsettings.json index e197633..177f566 100644 --- a/FastTunnel.Server/config/appsettings.json +++ b/FastTunnel.Server/config/appsettings.json @@ -23,4 +23,4 @@ // ѡΪʱͻҲЯͬToken,ܾ¼ "Token": "TOKEN_FOR_CLIENT_AUTHENTICATION" } -} +} \ No newline at end of file