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)