项目重命名

This commit is contained in:
xljiulang 2021-07-27 20:46:48 +08:00
parent 696c0f9dd8
commit 04f8d77aaf
33 changed files with 118 additions and 69 deletions

View File

@ -2,7 +2,7 @@
using System.Net; using System.Net;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// dns配置 /// dns配置

View File

@ -1,6 +1,6 @@
using System; using System;
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// 域名配置 /// 域名配置
@ -47,11 +47,11 @@ namespace FastGithub
{ {
if (this.TlsSni == false) if (this.TlsSni == false)
{ {
return FastGithub.TlsSniPattern.None; return Configuration.TlsSniPattern.None;
} }
if (string.IsNullOrEmpty(this.TlsSniPattern)) if (string.IsNullOrEmpty(this.TlsSniPattern))
{ {
return FastGithub.TlsSniPattern.Domain; return Configuration.TlsSniPattern.Domain;
} }
return new TlsSniPattern(this.TlsSniPattern); return new TlsSniPattern(this.TlsSniPattern);
} }

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// 表示域名表达式 /// 表示域名表达式

View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0-*" />
</ItemGroup>
</Project>

View File

@ -7,7 +7,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// FastGithub配置 /// FastGithub配置

View File

@ -1,6 +1,6 @@
using System; using System;
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// 表示FastGithub异常 /// 表示FastGithub异常

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// FastGithub的配置 /// FastGithub的配置

View File

@ -1,4 +1,4 @@
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// 响应配置 /// 响应配置

View File

@ -0,0 +1,24 @@
using FastGithub.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
namespace FastGithub
{
/// <summary>
/// 服务注册扩展
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// 添加配置服务
/// </summary>
/// <param name="services"></param>
/// <returns></returns>
public static OptionsBuilder<FastGithubOptions> AddConfiguration(this IServiceCollection services)
{
services.TryAddSingleton<FastGithubConfig>();
return services.AddOptions<FastGithubOptions>();
}
}
}

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Net; using System.Net;
namespace FastGithub namespace FastGithub.Configuration
{ {
/// <summary> /// <summary>
/// Sni自定义值表达式 /// Sni自定义值表达式

View File

@ -1,12 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>FastGithub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0-*" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,5 @@
using Microsoft.Extensions.Hosting; using FastGithub.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using System; using System;

View File

@ -10,6 +10,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" /> <ProjectReference Include="..\FastGithub.Configuration\FastGithub.Configuration.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,5 @@
using Microsoft.Extensions.Logging; using FastGithub.Configuration;
using Microsoft.Extensions.Logging;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;

View File

@ -1,6 +1,7 @@
using DNS.Client.RequestResolver; using DNS.Client.RequestResolver;
using DNS.Protocol; using DNS.Protocol;
using DNS.Protocol.ResourceRecords; using DNS.Protocol.ResourceRecords;
using FastGithub.Configuration;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;
using System.Linq; using System.Linq;

View File

@ -1,12 +1,13 @@
using FastGithub.Dns; using FastGithub.Dns;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace FastGithub namespace FastGithub
{ {
/// <summary> /// <summary>
/// dns服务注册扩展 /// 服务注册扩展
/// </summary> /// </summary>
public static class DnsServiceCollectionExtensions public static class ServiceCollectionExtensions
{ {
/// <summary> /// <summary>
/// 注册dns服务 /// 注册dns服务
@ -15,11 +16,10 @@ namespace FastGithub
/// <returns></returns> /// <returns></returns>
public static IServiceCollection AddDnsServer(this IServiceCollection services) public static IServiceCollection AddDnsServer(this IServiceCollection services)
{ {
return services services.TryAddSingleton<RequestResolver>();
.AddSingleton<RequestResolver>() services.TryAddSingleton<DnsServer>();
.AddSingleton<DnsServer>() services.TryAddSingleton<HostsFileValidator>();
.AddSingleton<HostsFileValidator>() return services.AddHostedService<DnsHostedService>();
.AddHostedService<DnsHostedService>();
} }
} }
} }

View File

@ -1,4 +1,5 @@
using System; using FastGithub.Configuration;
using System;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;

View File

@ -1,5 +1,6 @@
using DNS.Client; using DNS.Client;
using DNS.Protocol; using DNS.Protocol;
using FastGithub.Configuration;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;

View File

@ -4,31 +4,34 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0-*" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-*" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-*" />
<PackageReference Include="DNS" Version="6.1.0" /> <PackageReference Include="DNS" Version="6.1.0" />
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="../@dnscrypt-proxy/dnscrypt-proxy.toml" Link="dnscrypt-proxy.toml" > <None Include="../@dnscrypt-proxy/dnscrypt-proxy.toml" Link="dnscrypt-proxy.toml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-x64'"> <ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<None Include="../@dnscrypt-proxy/windows-x64/dnscrypt-proxy.exe" Link="dnscrypt-proxy.exe" > <None Include="../@dnscrypt-proxy/windows-x64/dnscrypt-proxy.exe" Link="dnscrypt-proxy.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64'"> <ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64'">
<None Include="../@dnscrypt-proxy/linux-x64/dnscrypt-proxy" Link="dnscrypt-proxy" > <None Include="../@dnscrypt-proxy/linux-x64/dnscrypt-proxy" Link="dnscrypt-proxy">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64'"> <ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64'">
<None Include="../@dnscrypt-proxy/osx-x64/dnscrypt-proxy" Link="dnscrypt-proxy" > <None Include="../@dnscrypt-proxy/osx-x64/dnscrypt-proxy" Link="dnscrypt-proxy">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FastGithub.Configuration\FastGithub.Configuration.csproj" />
</ItemGroup>
</Project> </Project>

View File

@ -5,9 +5,9 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
namespace FastGithub namespace FastGithub
{ {
/// <summary> /// <summary>
/// 域名解析相关服务注册扩展 /// 服务注册扩展
/// </summary> /// </summary>
public static class DomainResolveServiceCollectionExtensions public static class ServiceCollectionExtensions
{ {
/// <summary> /// <summary>
/// 注册域名解析相关服务 /// 注册域名解析相关服务
@ -19,8 +19,7 @@ namespace FastGithub
services.AddMemoryCache(); services.AddMemoryCache();
services.TryAddSingleton<IDomainResolver, DomainResolver>(); services.TryAddSingleton<IDomainResolver, DomainResolver>();
services.TryAddSingleton<DnscryptProxyService>(); services.TryAddSingleton<DnscryptProxyService>();
services.AddHostedService<DnscryptProxyHostedService>(); return services.AddHostedService<DnscryptProxyHostedService>();
return services;
} }
} }
} }

View File

@ -2,7 +2,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Portable.BouncyCastle" Version="1.8.10" /> <PackageReference Include="Portable.BouncyCastle" Version="1.8.10" />
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
<ProjectReference Include="..\FastGithub.DomainResolve\FastGithub.DomainResolve.csproj" /> <ProjectReference Include="..\FastGithub.DomainResolve\FastGithub.DomainResolve.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -1,4 +1,5 @@
using FastGithub.DomainResolve; using FastGithub.Configuration;
using FastGithub.DomainResolve;
using System; using System;
using System.Net.Http; using System.Net.Http;
using System.Threading; using System.Threading;

View File

@ -1,4 +1,5 @@
using FastGithub.DomainResolve; using FastGithub.Configuration;
using FastGithub.DomainResolve;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace FastGithub.Http namespace FastGithub.Http

View File

@ -1,4 +1,6 @@
namespace FastGithub.Http using FastGithub.Configuration;
namespace FastGithub.Http
{ {
/// <summary> /// <summary>
/// httpClient工厂 /// httpClient工厂

View File

@ -1,4 +1,6 @@
namespace FastGithub.Http using FastGithub.Configuration;
namespace FastGithub.Http
{ {
/// <summary> /// <summary>
/// 表示请求上下文 /// 表示请求上下文

View File

@ -5,9 +5,9 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
namespace FastGithub namespace FastGithub
{ {
/// <summary> /// <summary>
/// httpClient的服务注册扩展 /// 服务注册扩展
/// </summary> /// </summary>
public static class HttpClientServiceCollectionExtensions public static class ServiceCollectionExtensions
{ {
/// <summary> /// <summary>
/// 添加HttpClient相关服务 /// 添加HttpClient相关服务

View File

@ -11,7 +11,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
<ProjectReference Include="..\FastGithub.Http\FastGithub.Http.csproj" /> <ProjectReference Include="..\FastGithub.Http\FastGithub.Http.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -1,4 +1,5 @@
using FastGithub.Http; using FastGithub.Configuration;
using FastGithub.Http;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;
@ -22,7 +23,7 @@ namespace FastGithub.ReverseProxy
IHttpClientFactory httpClientFactory, IHttpClientFactory httpClientFactory,
FastGithubConfig fastGithubConfig, FastGithubConfig fastGithubConfig,
ILogger<ReverseProxyMiddleware> logger) ILogger<ReverseProxyMiddleware> logger)
{ {
this.httpForwarder = httpForwarder; this.httpForwarder = httpForwarder;
this.httpClientFactory = httpClientFactory; this.httpClientFactory = httpClientFactory;
this.fastGithubConfig = fastGithubConfig; this.fastGithubConfig = fastGithubConfig;

View File

@ -5,7 +5,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
<ProjectReference Include="..\FastGithub.Http\FastGithub.Http.csproj" /> <ProjectReference Include="..\FastGithub.Http\FastGithub.Http.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -0,0 +1,23 @@
using FastGithub.Upgrade;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace FastGithub
{
/// <summary>
/// 服务注册扩展
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// 添加升级服务
/// </summary>
/// <param name="services"></param>
/// <returns></returns>
public static IServiceCollection AddUpgrade(this IServiceCollection services)
{
services.TryAddSingleton<UpgradeService>();
return services;
}
}
}

View File

@ -1,4 +1,5 @@
using FastGithub.DomainResolve; using FastGithub.Configuration;
using FastGithub.DomainResolve;
using FastGithub.Http; using FastGithub.Http;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;

View File

@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.31320.298
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub", "FastGithub\FastGithub.csproj", "{C1099390-6103-4917-A740-A3002B542FE0}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub", "FastGithub\FastGithub.csproj", "{C1099390-6103-4917-A740-A3002B542FE0}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Core", "FastGithub.Core\FastGithub.Core.csproj", "{4E4841D2-F743-40BB-BE28-729DB53775CC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Dns", "FastGithub.Dns\FastGithub.Dns.csproj", "{43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Dns", "FastGithub.Dns\FastGithub.Dns.csproj", "{43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Upgrade", "FastGithub.Upgrade\FastGithub.Upgrade.csproj", "{8239A077-A84C-4FDF-A204-02A2DE4243F3}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Upgrade", "FastGithub.Upgrade\FastGithub.Upgrade.csproj", "{8239A077-A84C-4FDF-A204-02A2DE4243F3}"
@ -17,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Http", "FastGith
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.DomainResolve", "FastGithub.DomainResolve\FastGithub.DomainResolve.csproj", "{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.DomainResolve", "FastGithub.DomainResolve\FastGithub.DomainResolve.csproj", "{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Configuration", "FastGithub.Configuration\FastGithub.Configuration.csproj", "{C63CEBB1-56DA-4AC3-BDC9-52424EC292A0}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -27,10 +27,6 @@ Global
{C1099390-6103-4917-A740-A3002B542FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU {C1099390-6103-4917-A740-A3002B542FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1099390-6103-4917-A740-A3002B542FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU {C1099390-6103-4917-A740-A3002B542FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C1099390-6103-4917-A740-A3002B542FE0}.Release|Any CPU.Build.0 = Release|Any CPU {C1099390-6103-4917-A740-A3002B542FE0}.Release|Any CPU.Build.0 = Release|Any CPU
{4E4841D2-F743-40BB-BE28-729DB53775CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E4841D2-F743-40BB-BE28-729DB53775CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4841D2-F743-40BB-BE28-729DB53775CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4841D2-F743-40BB-BE28-729DB53775CC}.Release|Any CPU.Build.0 = Release|Any CPU
{43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}.Debug|Any CPU.Build.0 = Debug|Any CPU {43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}.Release|Any CPU.ActiveCfg = Release|Any CPU {43FF9C79-51D5-4037-AA0B-CA3006E2A7E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -51,6 +47,10 @@ Global
{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}.Debug|Any CPU.Build.0 = Debug|Any CPU {5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}.Release|Any CPU.ActiveCfg = Release|Any CPU {5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}.Release|Any CPU.Build.0 = Release|Any CPU {5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}.Release|Any CPU.Build.0 = Release|Any CPU
{C63CEBB1-56DA-4AC3-BDC9-52424EC292A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C63CEBB1-56DA-4AC3-BDC9-52424EC292A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C63CEBB1-56DA-4AC3-BDC9-52424EC292A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C63CEBB1-56DA-4AC3-BDC9-52424EC292A0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -1,4 +1,3 @@
using FastGithub.Upgrade;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -27,15 +26,12 @@ namespace FastGithub
/// <param name="services"></param> /// <param name="services"></param>
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
services.AddConfiguration().Bind(this.Configuration.GetSection(nameof(FastGithub)));
services.AddDnsServer(); services.AddDnsServer();
services.AddDomainResolve(); services.AddDomainResolve();
services.AddHttpClient(); services.AddHttpClient();
services.AddReverseProxy(); services.AddReverseProxy();
services.AddUpgrade();
services.AddSingleton<FastGithubConfig>();
services.Configure<FastGithubOptions>(this.Configuration.GetSection(nameof(FastGithub)));
services.AddSingleton<UpgradeService>();
services.AddHostedService<HostedService>(); services.AddHostedService<HostedService>();
services.AddControllersWithViews(); services.AddControllersWithViews();
@ -53,9 +49,7 @@ namespace FastGithub
app.UseRouting(); app.UseRouting();
app.UseEndpoints(endpoints => app.UseEndpoints(endpoints =>
{ {
endpoints.MapControllerRoute( endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
}); });
} }
} }