From 87289b6698c7ffa3d0a1d66cd94a4937578b586f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E4=B9=9D?= <366193849@qq.com> Date: Wed, 25 Aug 2021 23:12:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=89=E5=85=A8DNS?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub/Controllers/HomeController.cs | 2 +- FastGithub/Models/Home.cs | 5 +++++ FastGithub/Views/Home/Index.cshtml | 20 +++++++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/FastGithub/Controllers/HomeController.cs b/FastGithub/Controllers/HomeController.cs index 557d9fd..3df7c99 100644 --- a/FastGithub/Controllers/HomeController.cs +++ b/FastGithub/Controllers/HomeController.cs @@ -14,7 +14,7 @@ namespace FastGithub.Controllers /// public IActionResult Index() { - var model = new Home(); + var model = new Home { Host = Request.Host.ToString() }; return View(model); } } diff --git a/FastGithub/Models/Home.cs b/FastGithub/Models/Home.cs index dd31dfe..4a5687c 100644 --- a/FastGithub/Models/Home.cs +++ b/FastGithub/Models/Home.cs @@ -11,5 +11,10 @@ namespace FastGithub.Models /// 获取版本号 /// public string? Version { get; } = Assembly.GetEntryAssembly()?.GetCustomAttribute()?.InformationalVersion; + + /// + /// 请求域名或ip + /// + public string? Host { get; set; } } } diff --git a/FastGithub/Views/Home/Index.cshtml b/FastGithub/Views/Home/Index.cshtml index dab6224..6d17651 100644 --- a/FastGithub/Views/Home/Index.cshtml +++ b/FastGithub/Views/Home/Index.cshtml @@ -126,9 +126,9 @@ - hosts + hosts文件 - hosts解析ip + hosts规则冲突 需要从hosts文件移除github相关域名的配置 @@ -136,10 +136,20 @@ - 代理 + 代理(proxy) - 浏览器或系统代理 - 需要将浏览器和系统配置为不代理github相关域名 + 浏览器或系统代理冲突 + 关闭代理,或将浏览器和系统配置为不代理github相关域名 + + + + + + + 浏览器安全DNS + + 浏览器安全DNS冲突 + 关闭浏览器的安全DNS功能或将安全DNS设置为https://@(Model?.Host)
需要从hosts文件移除github相关域名的配置
需要将浏览器和系统配置为不代理github相关域名
关闭代理,或将浏览器和系统配置为不代理github相关域名
关闭浏览器的安全DNS功能或将安全DNS设置为https://@(Model?.Host)