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()