From aca4ee031cdef3c190906112a53e6456b49932e5 Mon Sep 17 00:00:00 2001 From: RMBGAME Date: Fri, 10 Dec 2021 20:50:56 +0800 Subject: [PATCH] fix Proxy ex --- .../Services/Implementation/HttpProxyServiceImpl.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs b/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs index 34114d9c4..ffa0c649f 100644 --- a/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs +++ b/src/ST.Client/Services/Implementation/HttpProxyServiceImpl.cs @@ -162,10 +162,10 @@ namespace System.Application.Services.Implementation //e.Ok(respone, new List() { new HttpHeader("Access-Control-Allow-Origin", e.HttpClient.Request.Headers.GetFirstHeader("Origin")?.Value ?? "*") }); } - private static async Task GetReverseProxyIp(string url, IPAddress? proxyDns, bool isIP = false) + private static async Task GetReverseProxyIp(string url, IPAddress? proxyDns, bool isDomain = false) { IPAddress? ip = null; - if (!isIP || !IPAddress.TryParse(url, out ip)) + if (isDomain || !IPAddress.TryParse(url, out ip)) { if (proxyDns != null) { @@ -672,7 +672,7 @@ namespace System.Application.Services.Implementation if (e.HttpClient.Request.Url.Contains(host, StringComparison.OrdinalIgnoreCase)) { e.DecryptSsl = true; - if (item.ProxyType == ProxyType.Local || + if (item.ProxyType == ProxyType.Local || item.ProxyType == ProxyType.ServerAccelerate) { var addres = item.ForwardDomainIsNameOrIP ? item.ForwardDomainName : item.ForwardDomainIP;