diff --git a/Directory.Build.props b/Directory.Build.props
index ee4d06f..2b5face 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,6 +1,6 @@
- 1.0.9
+ 1.1.0
enable
github加速神器
https://github.com/xljiulang/FastGithub
diff --git a/FastGithub.DnscryptProxy/DnscryptProxyServiceCollectionExtensions.cs b/FastGithub.DnscryptProxy/DnscryptProxyServiceCollectionExtensions.cs
deleted file mode 100644
index e883139..0000000
--- a/FastGithub.DnscryptProxy/DnscryptProxyServiceCollectionExtensions.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using FastGithub.DnscryptProxy;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace FastGithub
-{
- ///
- /// DnscryptProxy的服务注册扩展
- ///
- public static class DnscryptProxyServiceCollectionExtensions
- {
- ///
- /// 添加DnscryptProxy
- ///
- ///
- ///
- public static IServiceCollection AddDnscryptProxy(this IServiceCollection services)
- {
- return services
- .AddSingleton()
- .AddHostedService();
- }
- }
-}
diff --git a/FastGithub.DnscryptProxy/ControllState.cs b/FastGithub.DomainResolve/ControllState.cs
similarity index 90%
rename from FastGithub.DnscryptProxy/ControllState.cs
rename to FastGithub.DomainResolve/ControllState.cs
index c9b7d5d..877c70e 100644
--- a/FastGithub.DnscryptProxy/ControllState.cs
+++ b/FastGithub.DomainResolve/ControllState.cs
@@ -1,4 +1,4 @@
-namespace FastGithub.DnscryptProxy
+namespace FastGithub.DomainResolve
{
///
/// 服务控制状态
diff --git a/FastGithub.DnscryptProxy/DnscryptProxyHostedService.cs b/FastGithub.DomainResolve/DnscryptProxyHostedService.cs
similarity index 98%
rename from FastGithub.DnscryptProxy/DnscryptProxyHostedService.cs
rename to FastGithub.DomainResolve/DnscryptProxyHostedService.cs
index 94db659..b1e1630 100644
--- a/FastGithub.DnscryptProxy/DnscryptProxyHostedService.cs
+++ b/FastGithub.DomainResolve/DnscryptProxyHostedService.cs
@@ -4,7 +4,7 @@ using System;
using System.Threading;
using System.Threading.Tasks;
-namespace FastGithub.DnscryptProxy
+namespace FastGithub.DomainResolve
{
///
/// DnscryptProxy后台服务
diff --git a/FastGithub.DnscryptProxy/DnscryptProxyService.cs b/FastGithub.DomainResolve/DnscryptProxyService.cs
similarity index 98%
rename from FastGithub.DnscryptProxy/DnscryptProxyService.cs
rename to FastGithub.DomainResolve/DnscryptProxyService.cs
index 886e50a..76c19da 100644
--- a/FastGithub.DnscryptProxy/DnscryptProxyService.cs
+++ b/FastGithub.DomainResolve/DnscryptProxyService.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-namespace FastGithub.DnscryptProxy
+namespace FastGithub.DomainResolve
{
///
/// DnscryptProxy服务
diff --git a/FastGithub.DomainResolve/DomainResolveServiceCollectionExtensions.cs b/FastGithub.DomainResolve/DomainResolveServiceCollectionExtensions.cs
new file mode 100644
index 0000000..3e7c97f
--- /dev/null
+++ b/FastGithub.DomainResolve/DomainResolveServiceCollectionExtensions.cs
@@ -0,0 +1,26 @@
+using FastGithub.DomainResolve;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
+
+namespace FastGithub
+{
+ ///
+ /// 域名解析相关服务注册扩展
+ ///
+ public static class DomainResolveServiceCollectionExtensions
+ {
+ ///
+ /// 注册域名解析相关服务
+ ///
+ ///
+ ///
+ public static IServiceCollection AddDomainResolve(this IServiceCollection services)
+ {
+ services.AddMemoryCache();
+ services.TryAddSingleton();
+ services.AddSingleton();
+ services.AddHostedService();
+ return services;
+ }
+ }
+}
diff --git a/FastGithub.Http/DomainResolver.cs b/FastGithub.DomainResolve/DomainResolver.cs
similarity index 99%
rename from FastGithub.Http/DomainResolver.cs
rename to FastGithub.DomainResolve/DomainResolver.cs
index 98bb782..d04bfbb 100644
--- a/FastGithub.Http/DomainResolver.cs
+++ b/FastGithub.DomainResolve/DomainResolver.cs
@@ -8,7 +8,7 @@ using System.Net;
using System.Threading;
using System.Threading.Tasks;
-namespace FastGithub.Http
+namespace FastGithub.DomainResolve
{
///
/// 域名解析器
diff --git a/FastGithub.DnscryptProxy/FastGithub.DnscryptProxy.csproj b/FastGithub.DomainResolve/FastGithub.DomainResolve.csproj
similarity index 82%
rename from FastGithub.DnscryptProxy/FastGithub.DnscryptProxy.csproj
rename to FastGithub.DomainResolve/FastGithub.DomainResolve.csproj
index d8cfc6c..9de0a44 100644
--- a/FastGithub.DnscryptProxy/FastGithub.DnscryptProxy.csproj
+++ b/FastGithub.DomainResolve/FastGithub.DomainResolve.csproj
@@ -5,6 +5,8 @@
+
+
diff --git a/FastGithub.Http/IDomainResolver.cs b/FastGithub.DomainResolve/IDomainResolver.cs
similarity index 93%
rename from FastGithub.Http/IDomainResolver.cs
rename to FastGithub.DomainResolve/IDomainResolver.cs
index 760e6aa..5d7b609 100644
--- a/FastGithub.Http/IDomainResolver.cs
+++ b/FastGithub.DomainResolve/IDomainResolver.cs
@@ -2,7 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
-namespace FastGithub.Http
+namespace FastGithub.DomainResolve
{
///
/// 域名解析器
diff --git a/FastGithub.DnscryptProxy/TomlUtil.cs b/FastGithub.DomainResolve/TomlUtil.cs
similarity index 98%
rename from FastGithub.DnscryptProxy/TomlUtil.cs
rename to FastGithub.DomainResolve/TomlUtil.cs
index 03b5840..97541b5 100644
--- a/FastGithub.DnscryptProxy/TomlUtil.cs
+++ b/FastGithub.DomainResolve/TomlUtil.cs
@@ -5,7 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
-namespace FastGithub.DnscryptProxy
+namespace FastGithub.DomainResolve
{
///
/// doml配置工具
diff --git a/FastGithub.DnscryptProxy/dnscrypt-proxy b/FastGithub.DomainResolve/dnscrypt-proxy
similarity index 100%
rename from FastGithub.DnscryptProxy/dnscrypt-proxy
rename to FastGithub.DomainResolve/dnscrypt-proxy
diff --git a/FastGithub.DnscryptProxy/dnscrypt-proxy.exe b/FastGithub.DomainResolve/dnscrypt-proxy.exe
similarity index 100%
rename from FastGithub.DnscryptProxy/dnscrypt-proxy.exe
rename to FastGithub.DomainResolve/dnscrypt-proxy.exe
diff --git a/FastGithub.DnscryptProxy/dnscrypt-proxy.toml b/FastGithub.DomainResolve/dnscrypt-proxy.toml
similarity index 100%
rename from FastGithub.DnscryptProxy/dnscrypt-proxy.toml
rename to FastGithub.DomainResolve/dnscrypt-proxy.toml
diff --git a/FastGithub.Http/FastGithub.Http.csproj b/FastGithub.Http/FastGithub.Http.csproj
index e5cca58..2c6e886 100644
--- a/FastGithub.Http/FastGithub.Http.csproj
+++ b/FastGithub.Http/FastGithub.Http.csproj
@@ -5,10 +5,9 @@
-
-
+
diff --git a/FastGithub.Http/HttpClient.cs b/FastGithub.Http/HttpClient.cs
index 498063b..f046e64 100644
--- a/FastGithub.Http/HttpClient.cs
+++ b/FastGithub.Http/HttpClient.cs
@@ -1,4 +1,5 @@
-using System;
+using FastGithub.DomainResolve;
+using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
diff --git a/FastGithub.Http/HttpClientFactory.cs b/FastGithub.Http/HttpClientFactory.cs
index 387388e..7b80701 100644
--- a/FastGithub.Http/HttpClientFactory.cs
+++ b/FastGithub.Http/HttpClientFactory.cs
@@ -1,4 +1,5 @@
-using Microsoft.Extensions.Options;
+using FastGithub.DomainResolve;
+using Microsoft.Extensions.Options;
namespace FastGithub.Http
{
diff --git a/FastGithub.Http/HttpClientHandler.cs b/FastGithub.Http/HttpClientHandler.cs
index 7c50373..8c489a4 100644
--- a/FastGithub.Http/HttpClientHandler.cs
+++ b/FastGithub.Http/HttpClientHandler.cs
@@ -1,4 +1,5 @@
-using System;
+using FastGithub.DomainResolve;
+using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
diff --git a/FastGithub.Http/HttpClientServiceCollectionExtensions.cs b/FastGithub.Http/HttpClientServiceCollectionExtensions.cs
index 6648b3b..0f86f6e 100644
--- a/FastGithub.Http/HttpClientServiceCollectionExtensions.cs
+++ b/FastGithub.Http/HttpClientServiceCollectionExtensions.cs
@@ -16,8 +16,6 @@ namespace FastGithub
///
public static IServiceCollection AddHttpClient(this IServiceCollection services)
{
- services.AddMemoryCache();
- services.TryAddSingleton();
services.TryAddSingleton();
return services;
}
diff --git a/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs b/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs
index c65faef..72858a9 100644
--- a/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs
+++ b/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs
@@ -18,7 +18,6 @@ namespace FastGithub
return services
.AddMemoryCache()
.AddHttpForwarder()
- .AddHttpClient()
.AddSingleton()
.AddSingleton()
.AddHostedService();
diff --git a/FastGithub.Upgrade/UpgradeService.cs b/FastGithub.Upgrade/UpgradeService.cs
index 35813ff..c7faaf0 100644
--- a/FastGithub.Upgrade/UpgradeService.cs
+++ b/FastGithub.Upgrade/UpgradeService.cs
@@ -1,4 +1,5 @@
-using FastGithub.Http;
+using FastGithub.DomainResolve;
+using FastGithub.Http;
using Microsoft.Extensions.Logging;
using System;
using System.Linq;
diff --git a/FastGithub.sln b/FastGithub.sln
index 24bdbd6..11d0ce0 100644
--- a/FastGithub.sln
+++ b/FastGithub.sln
@@ -13,10 +13,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.Upgrade", "FastG
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.ReverseProxy", "FastGithub.ReverseProxy\FastGithub.ReverseProxy.csproj", "{28326D0F-B0FB-4B6B-A65A-C69ACB72CAD8}"
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}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastGithub.DomainResolve", "FastGithub.DomainResolve\FastGithub.DomainResolve.csproj", "{5D26ABDD-F341-4EB7-9D08-FCB80F79B4B4}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
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}.Release|Any CPU.ActiveCfg = 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.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.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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/FastGithub/FastGithub.csproj b/FastGithub/FastGithub.csproj
index edd70a6..4560395 100644
--- a/FastGithub/FastGithub.csproj
+++ b/FastGithub/FastGithub.csproj
@@ -16,8 +16,8 @@
-
+
diff --git a/FastGithub/Program.cs b/FastGithub/Program.cs
index 794216a..12ffe2a 100644
--- a/FastGithub/Program.cs
+++ b/FastGithub/Program.cs
@@ -42,7 +42,8 @@ namespace FastGithub
.ConfigureServices((ctx, services) =>
{
services.AddDnsServer();
- services.AddDnscryptProxy();
+ services.AddDomainResolve();
+ services.AddHttpClient();
services.AddAppUpgrade();
services.AddReverseProxy();
services.AddSingleton();