From 99646b8700f2d1c8acb62d5db8f35ff95e2bd319 Mon Sep 17 00:00:00 2001 From: xljiulang <366193849@qq.com> Date: Fri, 16 Jul 2021 20:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A=E4=B8=8E?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub.ReverseProxy/TrustedResolver.cs | 4 +++- FastGithub/appsettings.json | 6 +++--- README.md | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/FastGithub.ReverseProxy/TrustedResolver.cs b/FastGithub.ReverseProxy/TrustedResolver.cs index d050e47..b2ebefc 100644 --- a/FastGithub.ReverseProxy/TrustedResolver.cs +++ b/FastGithub.ReverseProxy/TrustedResolver.cs @@ -65,9 +65,11 @@ namespace FastGithub.ReverseProxy { throw new Exception($"解析不到{domain}的ip"); } + + // 如果解析到的ip为本机ip,会产生反向代理请求死循环 if (address.Equals(IPAddress.Loopback)) { - throw new Exception($"dns受干扰,解析{domain}的ip为{IPAddress.Loopback}"); + throw new Exception($"dns受干扰,解析{domain}的ip为{address}"); } return address; } diff --git a/FastGithub/appsettings.json b/FastGithub/appsettings.json index 0cb14bb..5d8913b 100644 --- a/FastGithub/appsettings.json +++ b/FastGithub/appsettings.json @@ -1,14 +1,14 @@ { "FastGithub": { - "TrustedDns": { // ڽip + "TrustedDns": { // ڽ׼ȷ "IPAddress": "127.0.0.1", "Port": 5533 // 5533ָdnscrypt-proxy }, - "UnTrustedDns": { // ڽǴip + "UnTrustedDns": { // ڽòٶȿ "IPAddress": "114.114.114.114", "Port": 53 }, - "DomainMatches": [ // *ʾ0nַ + "DomainMatches": [ // *ʾ0ַ "github.com", "githubstatus.com", "*.github.com", diff --git a/README.md b/README.md index 6b077e0..8d97cfa 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ github加速神器 ### 加速原理 -* 修改本机的dns指向FastGithub自身 -* 解析github相关域名指向FastGithub自身 -* 使用信任dns服务获取github真实ip,无SNI反向代理到github +* 修改本机的dns服务指向FastGithub自身 +* 解析匹配的域名为FastGithub自身的ip +* 请求信任的dns服务(dnscrypt-proxy)获取域名的ip并进行无SNI的https反向代理 ### 程序下载 [下载最新发布版本](https://gitee.com/jiulang/fast-github)