Skip to content

Commit

Permalink
修改注释与说明
Browse files Browse the repository at this point in the history
  • Loading branch information
xljiulang committed Jul 16, 2021
1 parent c00430d commit 99646b8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion FastGithub.ReverseProxy/TrustedResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ private async Task<IPAddress> LookupAsync(string domain, CancellationToken cance
{
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;
}
Expand Down
6 changes: 3 additions & 3 deletions FastGithub/appsettings.json
Original file line number Diff line number Diff line change
@@ -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": [ // *表示0到n个任意字符
"DomainMatches": [ // *表示0到多个任意字符
"github.com",
"githubstatus.com",
"*.github.com",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 99646b8

Please sign in to comment.