From 7612e386008e81341cda6bde205afe7700118f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Mon, 26 Jul 2021 10:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89=E9=A1=B9=E7=9B=AE=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=88=B0.net6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Directory.Build.props | 1 + FastGithub.Core/FastGithub.Core.csproj | 7 ++- FastGithub.Dns/FastGithub.Dns.csproj | 5 +- .../FastGithub.DomainResolve.csproj | 46 +++++++++---------- FastGithub.Http/FastGithub.Http.csproj | 6 +-- .../FastGithub.ReverseProxy.csproj | 3 +- .../KestrelServerOptionsExtensions.cs | 4 +- FastGithub.Upgrade/FastGithub.Upgrade.csproj | 8 +--- FastGithub/{zip.sh => pack.sh} | 0 FastGithub/publish.cmd | 4 +- 10 files changed, 35 insertions(+), 49 deletions(-) rename FastGithub/{zip.sh => pack.sh} (100%) diff --git a/Directory.Build.props b/Directory.Build.props index bb80f6a..0d1fa59 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,6 +5,7 @@ github加速神器 https://github.com/xljiulang/FastGithub win-x64 + net6.0 diff --git a/FastGithub.Core/FastGithub.Core.csproj b/FastGithub.Core/FastGithub.Core.csproj index 34da548..76fa498 100644 --- a/FastGithub.Core/FastGithub.Core.csproj +++ b/FastGithub.Core/FastGithub.Core.csproj @@ -1,13 +1,12 @@  - - net5.0 + FastGithub - - + + diff --git a/FastGithub.Dns/FastGithub.Dns.csproj b/FastGithub.Dns/FastGithub.Dns.csproj index 2ebcc65..348268c 100644 --- a/FastGithub.Dns/FastGithub.Dns.csproj +++ b/FastGithub.Dns/FastGithub.Dns.csproj @@ -1,13 +1,12 @@  - - net5.0 + true - + diff --git a/FastGithub.DomainResolve/FastGithub.DomainResolve.csproj b/FastGithub.DomainResolve/FastGithub.DomainResolve.csproj index 83c93fe..cfbab0d 100644 --- a/FastGithub.DomainResolve/FastGithub.DomainResolve.csproj +++ b/FastGithub.DomainResolve/FastGithub.DomainResolve.csproj @@ -1,31 +1,27 @@  - - net5.0 - + + + + + + - - - - - - + + + PreserveNewest + + - - - PreserveNewest - - + + + PreserveNewest + + - - - PreserveNewest - - - - - - PreserveNewest - - + + + PreserveNewest + + diff --git a/FastGithub.Http/FastGithub.Http.csproj b/FastGithub.Http/FastGithub.Http.csproj index 2c6e886..82af854 100644 --- a/FastGithub.Http/FastGithub.Http.csproj +++ b/FastGithub.Http/FastGithub.Http.csproj @@ -1,8 +1,4 @@ - - - - net5.0 - + diff --git a/FastGithub.ReverseProxy/FastGithub.ReverseProxy.csproj b/FastGithub.ReverseProxy/FastGithub.ReverseProxy.csproj index a2f248c..3f33e5c 100644 --- a/FastGithub.ReverseProxy/FastGithub.ReverseProxy.csproj +++ b/FastGithub.ReverseProxy/FastGithub.ReverseProxy.csproj @@ -1,7 +1,6 @@  - - net5.0 + true diff --git a/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs b/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs index 24cfd74..ec1451b 100644 --- a/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs +++ b/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs @@ -108,9 +108,9 @@ namespace FastGithub /// /// /// - private static X509Certificate2 GetDomainCert(string domain, string caPublicCerPath, string caPrivateKeyPath) + private static X509Certificate2 GetDomainCert(string? domain, string caPublicCerPath, string caPrivateKeyPath) { - return domainCerts.GetOrAdd(domain, GetOrCreateCert).Value; + return domainCerts.GetOrAdd(domain ?? string.Empty, GetOrCreateCert).Value; Lazy GetOrCreateCert(string host) { diff --git a/FastGithub.Upgrade/FastGithub.Upgrade.csproj b/FastGithub.Upgrade/FastGithub.Upgrade.csproj index c3cc728..e0e34fc 100644 --- a/FastGithub.Upgrade/FastGithub.Upgrade.csproj +++ b/FastGithub.Upgrade/FastGithub.Upgrade.csproj @@ -1,11 +1,7 @@  - - - net5.0 - - + - + diff --git a/FastGithub/zip.sh b/FastGithub/pack.sh similarity index 100% rename from FastGithub/zip.sh rename to FastGithub/pack.sh diff --git a/FastGithub/publish.cmd b/FastGithub/publish.cmd index ae94116..67a3c86 100644 --- a/FastGithub/publish.cmd +++ b/FastGithub/publish.cmd @@ -1,2 +1,2 @@ -dotnet publish -c Release -f net6.0 /p:PublishSingleFile=true /p:PublishTrimmed=true -r win-x64 -o ./bin/publish/win-x64 -dotnet publish -c Release -f net6.0 /p:PublishSingleFile=true /p:PublishTrimmed=true -r linux-x64 -o ./bin/publish/linux-x64 \ No newline at end of file +dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true -r win-x64 -o ./bin/publish/win-x64 +dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true -r linux-x64 -o ./bin/publish/linux-x64 \ No newline at end of file