【fix】parse host

This commit is contained in:
springhgui 2020-12-15 11:20:05 +08:00
parent 82c86be727
commit 4f942eab03
5 changed files with 7 additions and 8 deletions

View File

@ -21,7 +21,7 @@
"LocalIp": "127.0.0.1",
//
"LocalPort": 8080,
"LocalPort": 3389,
// , 访url http://{SubDomain}.{Domain}:{ProxyPort_HTTP}/
"SubDomain": "test", // test.test.cc

View File

@ -84,7 +84,7 @@ namespace FastTunnel.Core.Dispatchers
words = Encoding.UTF8.GetString(array, 0, (int)tempBuffer.Length);
collection = Regex.Matches(words, pattern);
if (collection.Count > 0)
if (collection.Count > 0 || count < buffer.Length)
{
break;
}

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
@ -17,9 +17,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="3.1.9" />
<PackageReference Include="NLog" Version="4.7.5" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="5.0.0" />
<PackageReference Include="NLog" Version="4.7.6" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.3" />
</ItemGroup>

View File

@ -13,7 +13,7 @@ namespace FastTunnel.Server
{
public static void Main(string[] args)
{
var logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();
var logger = NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();
try
{
CreateHostBuilder(args).Build().Run();

View File

@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace FastTunnel.Server
{