From e004a364856e4c955b7939dd3d171cdd6d9fde3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Thu, 18 Nov 2021 12:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=90=86=E6=A3=80=E6=B5=8B=E6=94=AF?= =?UTF-8?q?=E6=8C=81ipv6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub/AppHostedService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FastGithub/AppHostedService.cs b/FastGithub/AppHostedService.cs index 4cb8f00..7cd58f0 100644 --- a/FastGithub/AppHostedService.cs +++ b/FastGithub/AppHostedService.cs @@ -112,13 +112,13 @@ namespace FastGithub if (IPAddress.TryParse(proxyServer.Host, out var address)) { - return address.Equals(IPAddress.Loopback); + return IPAddress.IsLoopback(address); } try { var addresses = await Dns.GetHostAddressesAsync(proxyServer.Host); - return addresses.Contains(IPAddress.Loopback); + return addresses.Any(item => IPAddress.IsLoopback(item)); } catch (Exception) {