项目合并与重命名
This commit is contained in:
parent
5093e8974b
commit
bb48f6b760
@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.0.9</Version>
|
<Version>1.1.0</Version>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Description>github加速神器</Description>
|
<Description>github加速神器</Description>
|
||||||
<Copyright>https://github.com/xljiulang/FastGithub</Copyright>
|
<Copyright>https://github.com/xljiulang/FastGithub</Copyright>
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
using FastGithub.DnscryptProxy;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
|
|
||||||
namespace FastGithub
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// DnscryptProxy的服务注册扩展
|
|
||||||
/// </summary>
|
|
||||||
public static class DnscryptProxyServiceCollectionExtensions
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 添加DnscryptProxy
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="services"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static IServiceCollection AddDnscryptProxy(this IServiceCollection services)
|
|
||||||
{
|
|
||||||
return services
|
|
||||||
.AddSingleton<DnscryptProxyService>()
|
|
||||||
.AddHostedService<DnscryptProxyHostedService>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace FastGithub.DnscryptProxy
|
namespace FastGithub.DomainResolve
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 服务控制状态
|
/// 服务控制状态
|
||||||
@ -4,7 +4,7 @@ using System;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace FastGithub.DnscryptProxy
|
namespace FastGithub.DomainResolve
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DnscryptProxy后台服务
|
/// DnscryptProxy后台服务
|
||||||
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace FastGithub.DnscryptProxy
|
namespace FastGithub.DomainResolve
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DnscryptProxy服务
|
/// DnscryptProxy服务
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
using FastGithub.DomainResolve;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
|
||||||
|
namespace FastGithub
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 域名解析相关服务注册扩展
|
||||||
|
/// </summary>
|
||||||
|
public static class DomainResolveServiceCollectionExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 注册域名解析相关服务
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="services"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static IServiceCollection AddDomainResolve(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddMemoryCache();
|
||||||
|
services.TryAddSingleton<IDomainResolver, DomainResolver>();
|
||||||
|
services.AddSingleton<DnscryptProxyService>();
|
||||||
|
services.AddHostedService<DnscryptProxyHostedService>();
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -8,7 +8,7 @@ using System.Net;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace FastGithub.Http
|
namespace FastGithub.DomainResolve
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 域名解析器
|
/// 域名解析器
|
||||||
@ -5,6 +5,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="DNS" Version="6.1.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
|
||||||
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
|
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace FastGithub.Http
|
namespace FastGithub.DomainResolve
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 域名解析器
|
/// 域名解析器
|
||||||
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace FastGithub.DnscryptProxy
|
namespace FastGithub.DomainResolve
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// doml配置工具
|
/// doml配置工具
|
||||||
@ -5,10 +5,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DNS" Version="6.1.0" />
|
|
||||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.10" />
|
<PackageReference Include="Portable.BouncyCastle" Version="1.8.10" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
|
|
||||||
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
|
<ProjectReference Include="..\FastGithub.Core\FastGithub.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\FastGithub.DomainResolve\FastGithub.DomainResolve.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using FastGithub.DomainResolve;
|
||||||
|
using System;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Options;
|
using FastGithub.DomainResolve;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace FastGithub.Http
|
namespace FastGithub.Http
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using FastGithub.DomainResolve;
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@ -16,8 +16,6 @@ namespace FastGithub
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IServiceCollection AddHttpClient(this IServiceCollection services)
|
public static IServiceCollection AddHttpClient(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddMemoryCache();
|
|
||||||
services.TryAddSingleton<IDomainResolver, DomainResolver>();
|
|
||||||
services.TryAddSingleton<IHttpClientFactory, HttpClientFactory>();
|
services.TryAddSingleton<IHttpClientFactory, HttpClientFactory>();
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,6 @@ namespace FastGithub
|
|||||||
return services
|
return services
|
||||||
.AddMemoryCache()
|
.AddMemoryCache()
|
||||||
.AddHttpForwarder()
|
.AddHttpForwarder()
|
||||||
.AddHttpClient()
|
|
||||||
.AddSingleton<RequestLoggingMilldeware>()
|
.AddSingleton<RequestLoggingMilldeware>()
|
||||||
.AddSingleton<ReverseProxyMiddleware>()
|
.AddSingleton<ReverseProxyMiddleware>()
|
||||||
.AddHostedService<ReverseProxyHostedService>();
|
.AddHostedService<ReverseProxyHostedService>();
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using FastGithub.Http;
|
using FastGithub.DomainResolve;
|
||||||
|
using FastGithub.Http;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@ -13,10 +13,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Upgrade", "FastG
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.ReverseProxy", "FastGithub.ReverseProxy\FastGithub.ReverseProxy.csproj", "{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.ReverseProxy", "FastGithub.ReverseProxy\FastGithub.ReverseProxy.csproj", "{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.DnscryptProxy", "FastGithub.DnscryptProxy\FastGithub.DnscryptProxy.csproj", "{26BB826F-4117-4746-9BD0-C6D8043E2808}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Http", "FastGithub.Http\FastGithub.Http.csproj", "{B5DCB3E4-5094-4170-B844-6F395002CA42}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Http", "FastGithub.Http\FastGithub.Http.csproj", "{B5DCB3E4-5094-4170-B844-6F395002CA42}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.DomainResolve", "FastGithub.DomainResolve\FastGithub.DomainResolve.csproj", "{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -43,14 +43,14 @@ Global
|
|||||||
{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}.Release|Any CPU.Build.0 = Release|Any CPU
|
{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{26BB826F-4117-4746-9BD0-C6D8043E2808}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{26BB826F-4117-4746-9BD0-C6D8043E2808}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{26BB826F-4117-4746-9BD0-C6D8043E2808}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{26BB826F-4117-4746-9BD0-C6D8043E2808}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Release|Any CPU.Build.0 = Release|Any CPU
|
{B5DCB3E4-5094-4170-B844-6F395002CA42}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}.Debug|Any CPU.ActiveCfg = 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.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="PInvoke.AdvApi32" Version="0.7.104" />
|
<PackageReference Include="PInvoke.AdvApi32" Version="0.7.104" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
|
||||||
<ProjectReference Include="..\FastGithub.DnscryptProxy\FastGithub.DnscryptProxy.csproj" />
|
|
||||||
<ProjectReference Include="..\FastGithub.Dns\FastGithub.Dns.csproj" />
|
<ProjectReference Include="..\FastGithub.Dns\FastGithub.Dns.csproj" />
|
||||||
|
<ProjectReference Include="..\FastGithub.DomainResolve\FastGithub.DomainResolve.csproj" />
|
||||||
<ProjectReference Include="..\FastGithub.ReverseProxy\FastGithub.ReverseProxy.csproj" />
|
<ProjectReference Include="..\FastGithub.ReverseProxy\FastGithub.ReverseProxy.csproj" />
|
||||||
<ProjectReference Include="..\FastGithub.Upgrade\FastGithub.Upgrade.csproj" />
|
<ProjectReference Include="..\FastGithub.Upgrade\FastGithub.Upgrade.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -42,7 +42,8 @@ namespace FastGithub
|
|||||||
.ConfigureServices((ctx, services) =>
|
.ConfigureServices((ctx, services) =>
|
||||||
{
|
{
|
||||||
services.AddDnsServer();
|
services.AddDnsServer();
|
||||||
services.AddDnscryptProxy();
|
services.AddDomainResolve();
|
||||||
|
services.AddHttpClient();
|
||||||
services.AddAppUpgrade();
|
services.AddAppUpgrade();
|
||||||
services.AddReverseProxy();
|
services.AddReverseProxy();
|
||||||
services.AddSingleton<FastGithubConfig>();
|
services.AddSingleton<FastGithubConfig>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user