From 360b2b3fe6701e60eb2fc903ac596dbf7ee59ba1 Mon Sep 17 00:00:00 2001 From: rmbgame Date: Tue, 1 Jun 2021 19:37:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=20https://?= =?UTF-8?q?appcenter.ms/orgs/BeyondDimension/apps/Steam/crashes/errors/415?= =?UTF-8?q?9743380u/overview=20https://appcenter.ms/orgs/BeyondDimension/a?= =?UTF-8?q?pps/Steam/crashes/errors/54875828u/overview=20https://appcenter?= =?UTF-8?q?.ms/orgs/BeyondDimension/apps/Steam/crashes/errors/1168361231u/?= =?UTF-8?q?overview=20https://appcenter.ms/orgs/BeyondDimension/apps/Steam?= =?UTF-8?q?/crashes/errors/3350267961u/overview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- references/Titanium-Web-Proxy | 2 +- .../Implementation/HttpProxyServiceImpl.cs | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/references/Titanium-Web-Proxy b/references/Titanium-Web-Proxy index a9c896a18..bbe631362 160000 --- a/references/Titanium-Web-Proxy +++ b/references/Titanium-Web-Proxy @@ -1 +1 @@ -Subproject commit a9c896a1876e1eef8c0fe4a8b3b71074f2fbca83 +Subproject commit bbe631362064de5ac7cc70d1a17a7977a8b1f5f9 diff --git a/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs b/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs index 74c534b17..d8cff45df 100644 --- a/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs +++ b/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs @@ -60,7 +60,7 @@ namespace System.Application.Services.Implementation // 可选地设置证书引擎 proxyServer.CertificateManager.CertificateEngine = CertificateEngine; //proxyServer.CertificateManager.PfxPassword = $"{CertificateName}"; - proxyServer.ThreadPoolWorkerThread = Environment.ProcessorCount * 8; + //proxyServer.ThreadPoolWorkerThread = Environment.ProcessorCount * 8; proxyServer.CertificateManager.PfxFilePath = Path.Combine(IOPath.AppDataDirectory, $@"{CertificateName}.Certificate.pfx"); proxyServer.CertificateManager.RootCertificateIssuerName = $"{CertificateName} Certificate Authority"; proxyServer.CertificateManager.RootCertificateName = $"{CertificateName} Certificate"; @@ -403,7 +403,7 @@ namespace System.Application.Services.Implementation if (IsProxyGOG) { WirtePemCertificateToGoGSteamPlugins(); } #region 启动代理 - proxyServer.Enable100ContinueBehaviour = true; + //proxyServer.Enable100ContinueBehaviour = true; proxyServer.EnableHttp2 = true; proxyServer.BeforeRequest += OnRequest; proxyServer.BeforeResponse += OnResponse; @@ -547,8 +547,14 @@ namespace System.Application.Services.Implementation proxyServer.ClientCertificateSelectionCallback -= OnCertificateSelection; proxyServer.Stop(); } - proxyServer.DisableSystemHttpProxy(); - proxyServer.DisableSystemHttpsProxy(); + try + { + proxyServer.DisableAllSystemProxies(); + } + catch + { + //忽略异常导致的崩溃 + } } public bool WirtePemCertificateToGoGSteamPlugins()